blob: 45d53c84c870ddf313a31e93d8b449262b35faa8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
; 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
}
|