You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: llvm/test/Transforms/InstSimplify/vp-reverse.ll
+6-13Lines changed: 6 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -3,9 +3,7 @@
3
3
4
4
define <vscale x 4 x i32> @rev_of_rev(<vscale x 4 x i32> %a, i32%evl) {
5
5
; CHECK-LABEL: @rev_of_rev(
6
-
; CHECK-NEXT: [[A_REV:%.*]] = tail call <vscale x 4 x i32> @llvm.experimental.vp.reverse.nxv4i32(<vscale x 4 x i32> [[A:%.*]], <vscale x 4 x i1> splat (i1 true), i32 [[EVL:%.*]])
7
-
; CHECK-NEXT: [[RES:%.*]] = tail call <vscale x 4 x i32> @llvm.experimental.vp.reverse.nxv4i32(<vscale x 4 x i32> [[A_REV]], <vscale x 4 x i1> splat (i1 true), i32 [[EVL]])
8
-
; CHECK-NEXT: ret <vscale x 4 x i32> [[RES]]
6
+
; CHECK-NEXT: ret <vscale x 4 x i32> [[A:%.*]]
9
7
;
10
8
%a.rev = tailcall <vscale x 4 x i32> @llvm.experimental.vp.reverse(<vscale x 4 x i32> %a, <vscale x 4 x i1> splat (i1true), i32%evl)
11
9
%res = tailcall <vscale x 4 x i32> @llvm.experimental.vp.reverse(<vscale x 4 x i32> %a.rev, <vscale x 4 x i1> splat (i1true), i32%evl)
@@ -25,26 +23,23 @@ define <vscale x 4 x i32> @rev_of_rev_diffevl(<vscale x 4 x i32> %a, i32 %evl) {
25
23
26
24
define <vscale x 4 x i32> @rev_of_poison(i32%evl) {
27
25
; CHECK-LABEL: @rev_of_poison(
28
-
; CHECK-NEXT: [[REV:%.*]] = tail call <vscale x 4 x i32> @llvm.experimental.vp.reverse.nxv4i32(<vscale x 4 x i32> poison, <vscale x 4 x i1> splat (i1 true), i32 [[EVL:%.*]])
29
-
; CHECK-NEXT: ret <vscale x 4 x i32> [[REV]]
26
+
; CHECK-NEXT: ret <vscale x 4 x i32> poison
30
27
;
31
28
%rev = tailcall <vscale x 4 x i32> @llvm.experimental.vp.reverse(<vscale x 4 x i32> poison, <vscale x 4 x i1> splat (i1true), i32%evl)
32
29
ret <vscale x 4 x i32> %rev
33
30
}
34
31
35
32
define <vscale x 4 x i32> @rev_of_undef(i32%evl) {
36
33
; CHECK-LABEL: @rev_of_undef(
37
-
; CHECK-NEXT: [[REV:%.*]] = tail call <vscale x 4 x i32> @llvm.experimental.vp.reverse.nxv4i32(<vscale x 4 x i32> undef, <vscale x 4 x i1> splat (i1 true), i32 [[EVL:%.*]])
38
-
; CHECK-NEXT: ret <vscale x 4 x i32> [[REV]]
34
+
; CHECK-NEXT: ret <vscale x 4 x i32> undef
39
35
;
40
36
%rev = tailcall <vscale x 4 x i32> @llvm.experimental.vp.reverse(<vscale x 4 x i32> undef, <vscale x 4 x i1> splat (i1true), i32%evl)
41
37
ret <vscale x 4 x i32> %rev
42
38
}
43
39
44
40
define <vscale x 4 x i32> @rev_of_zero(i32%evl) {
45
41
; CHECK-LABEL: @rev_of_zero(
46
-
; CHECK-NEXT: [[REV:%.*]] = tail call <vscale x 4 x i32> @llvm.experimental.vp.reverse.nxv4i32(<vscale x 4 x i32> zeroinitializer, <vscale x 4 x i1> splat (i1 true), i32 [[EVL:%.*]])
47
-
; CHECK-NEXT: ret <vscale x 4 x i32> [[REV]]
42
+
; CHECK-NEXT: ret <vscale x 4 x i32> zeroinitializer
48
43
;
49
44
%rev = tailcall <vscale x 4 x i32> @llvm.experimental.vp.reverse(<vscale x 4 x i32> zeroinitializer, <vscale x 4 x i1> splat (i1true), i32%evl)
50
45
ret <vscale x 4 x i32> %rev
@@ -54,8 +49,7 @@ define <vscale x 4 x i32> @rev_of_splat(i32 %a, i32 %evl) {
54
49
; CHECK-LABEL: @rev_of_splat(
55
50
; CHECK-NEXT: [[A_INS:%.*]] = insertelement <vscale x 4 x i32> poison, i32 [[A:%.*]], i32 0
56
51
; CHECK-NEXT: [[A_VEC:%.*]] = shufflevector <vscale x 4 x i32> [[A_INS]], <vscale x 4 x i32> poison, <vscale x 4 x i32> zeroinitializer
57
-
; CHECK-NEXT: [[REV:%.*]] = tail call <vscale x 4 x i32> @llvm.experimental.vp.reverse.nxv4i32(<vscale x 4 x i32> [[A_VEC]], <vscale x 4 x i1> splat (i1 true), i32 [[EVL:%.*]])
58
-
; CHECK-NEXT: ret <vscale x 4 x i32> [[REV]]
52
+
; CHECK-NEXT: ret <vscale x 4 x i32> [[A_VEC]]
59
53
;
60
54
%a.ins = insertelement <vscale x 4 x i32> poison, i32%a, i320
61
55
%a.vec = shufflevector <vscale x 4 x i32> %a.ins, <vscale x 4 x i32> poison, <vscale x 4 x i32> zeroinitializer
@@ -67,8 +61,7 @@ define <vscale x 4 x i32> @rev_of_splat2(i32 %a, <vscale x 4 x i1> %m, i32 %evl)
67
61
; CHECK-LABEL: @rev_of_splat2(
68
62
; CHECK-NEXT: [[A_INS:%.*]] = insertelement <vscale x 4 x i32> poison, i32 [[A:%.*]], i32 0
69
63
; CHECK-NEXT: [[A_VEC:%.*]] = shufflevector <vscale x 4 x i32> [[A_INS]], <vscale x 4 x i32> poison, <vscale x 4 x i32> zeroinitializer
70
-
; CHECK-NEXT: [[REV:%.*]] = tail call <vscale x 4 x i32> @llvm.experimental.vp.reverse.nxv4i32(<vscale x 4 x i32> [[A_VEC]], <vscale x 4 x i1> [[M:%.*]], i32 [[EVL:%.*]])
71
-
; CHECK-NEXT: ret <vscale x 4 x i32> [[REV]]
64
+
; CHECK-NEXT: ret <vscale x 4 x i32> [[A_VEC]]
72
65
;
73
66
%a.ins = insertelement <vscale x 4 x i32> poison, i32%a, i320
74
67
%a.vec = shufflevector <vscale x 4 x i32> %a.ins, <vscale x 4 x i32> poison, <vscale x 4 x i32> zeroinitializer
0 commit comments