@@ -54,3 +54,57 @@ entry:
54
54
store i32 %conv27 , ptr getelementptr inbounds ([4 x i32 ], ptr null , i64 8 , i64 3 ), align 4
55
55
ret void
56
56
}
57
+
58
+ define void @test1 () {
59
+ ; CHECK-LABEL: define void @test1(
60
+ ; CHECK-SAME: ) #[[ATTR0]] {
61
+ ; CHECK-NEXT: entry:
62
+ ; CHECK-NEXT: [[ARRAYIDX22:%.*]] = getelementptr i32, ptr null, i64 60
63
+ ; CHECK-NEXT: [[TMP0:%.*]] = call <4 x i32> @llvm.masked.gather.v4i32.v4p0(<4 x ptr> getelementptr (i32, <4 x ptr> zeroinitializer, <4 x i64> <i64 1, i64 33, i64 7, i64 0>), i32 4, <4 x i1> <i1 true, i1 true, i1 true, i1 true>, <4 x i32> poison)
64
+ ; CHECK-NEXT: [[TMP1:%.*]] = load <4 x i32>, ptr [[ARRAYIDX22]], align 4
65
+ ; CHECK-NEXT: [[TMP2:%.*]] = shufflevector <4 x i32> [[TMP1]], <4 x i32> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
66
+ ; CHECK-NEXT: [[TMP3:%.*]] = mul <4 x i32> [[TMP2]], [[TMP0]]
67
+ ; CHECK-NEXT: [[TMP4:%.*]] = sext <4 x i32> [[TMP3]] to <4 x i64>
68
+ ; CHECK-NEXT: [[TMP5:%.*]] = lshr <4 x i64> [[TMP4]], zeroinitializer
69
+ ; CHECK-NEXT: [[TMP6:%.*]] = trunc <4 x i64> [[TMP5]] to <4 x i32>
70
+ ; CHECK-NEXT: store <4 x i32> [[TMP6]], ptr getelementptr inbounds ([4 x i32], ptr null, i64 8, i64 0), align 16
71
+ ; CHECK-NEXT: ret void
72
+ ;
73
+ entry:
74
+ %arrayidx1 = getelementptr i32 , ptr null , i64 1
75
+ %0 = load i32 , ptr %arrayidx1 , align 4
76
+ %arrayidx2 = getelementptr i32 , ptr null , i64 63
77
+ %1 = load i32 , ptr %arrayidx2 , align 4
78
+ %mul = mul i32 %1 , %0
79
+ %conv = sext i32 %mul to i64
80
+ %shr = lshr i64 %conv , 0
81
+ %conv3 = trunc i64 %shr to i32
82
+ store i32 %conv3 , ptr getelementptr inbounds ([4 x i32 ], ptr null , i64 8 , i64 0 ), align 16
83
+ %arrayidx5 = getelementptr i32 , ptr null , i64 33
84
+ %2 = load i32 , ptr %arrayidx5 , align 4
85
+ %arrayidx6 = getelementptr i32 , ptr null , i64 62
86
+ %3 = load i32 , ptr %arrayidx6 , align 4
87
+ %mul7 = mul i32 %3 , %2
88
+ %conv8 = sext i32 %mul7 to i64
89
+ %shr10 = lshr i64 %conv8 , 0
90
+ %conv11 = trunc i64 %shr10 to i32
91
+ store i32 %conv11 , ptr getelementptr inbounds ([4 x i32 ], ptr null , i64 8 , i64 1 ), align 4
92
+ %arrayidx13 = getelementptr i32 , ptr null , i64 7
93
+ %4 = load i32 , ptr %arrayidx13 , align 4
94
+ %arrayidx14 = getelementptr i32 , ptr null , i64 61
95
+ %5 = load i32 , ptr %arrayidx14 , align 4
96
+ %mul15 = mul i32 %5 , %4
97
+ %conv16 = sext i32 %mul15 to i64
98
+ %shr18 = lshr i64 %conv16 , 0
99
+ %conv19 = trunc i64 %shr18 to i32
100
+ store i32 %conv19 , ptr getelementptr inbounds ([4 x i32 ], ptr null , i64 8 , i64 2 ), align 8
101
+ %6 = load i32 , ptr null , align 4
102
+ %arrayidx22 = getelementptr i32 , ptr null , i64 60
103
+ %7 = load i32 , ptr %arrayidx22 , align 4
104
+ %mul23 = mul i32 %7 , %6
105
+ %conv24 = sext i32 %mul23 to i64
106
+ %shr26 = lshr i64 %conv24 , 0
107
+ %conv27 = trunc i64 %shr26 to i32
108
+ store i32 %conv27 , ptr getelementptr inbounds ([4 x i32 ], ptr null , i64 8 , i64 3 ), align 4
109
+ ret void
110
+ }
0 commit comments