| ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5 |
| ; RUN: opt < %s -S -p vector-combine | FileCheck %s |
| |
| define <4 x float> @fneg_fixed(float %x) { |
| ; CHECK-LABEL: define <4 x float> @fneg_fixed( |
| ; CHECK-SAME: float [[X:%.*]]) { |
| ; CHECK-NEXT: [[V_SCALAR:%.*]] = fneg float [[X]] |
| ; CHECK-NEXT: [[V:%.*]] = insertelement <4 x float> poison, float [[V_SCALAR]], i64 0 |
| ; CHECK-NEXT: ret <4 x float> [[V]] |
| ; |
| %x.insert = insertelement <4 x float> poison, float %x, i32 0 |
| %v = fneg <4 x float> %x.insert |
| ret <4 x float> %v |
| } |
| |
| define <vscale x 4 x float> @fneg_scalable(float %x) { |
| ; CHECK-LABEL: define <vscale x 4 x float> @fneg_scalable( |
| ; CHECK-SAME: float [[X:%.*]]) { |
| ; CHECK-NEXT: [[V_SCALAR:%.*]] = fneg float [[X]] |
| ; CHECK-NEXT: [[V:%.*]] = insertelement <vscale x 4 x float> poison, float [[V_SCALAR]], i64 0 |
| ; CHECK-NEXT: ret <vscale x 4 x float> [[V]] |
| ; |
| %x.insert = insertelement <vscale x 4 x float> poison, float %x, i32 0 |
| %v = fneg <vscale x 4 x float> %x.insert |
| ret <vscale x 4 x float> %v |
| } |