@@ -6,9 +6,9 @@ define void @replace_int_memcpy_test() #0 {
66; CHECK-SAME: ) #[[ATTR0:[0-9]+]] {
77; CHECK-NEXT: [[TMP1:%.*]] = alloca [1 x i32], align 4
88; CHECK-NEXT: [[TMP2:%.*]] = alloca [1 x i32], align 4
9- ; CHECK-NEXT: [[GEP:%.*]] = getelementptr inbounds i32, ptr [[TMP1]], i32 0
9+ ; CHECK-NEXT: [[GEP:%.*]] = getelementptr inbounds [1 x i32] , ptr [[TMP1]], i32 0 , i32 0
1010; CHECK-NEXT: [[TMP3:%.*]] = load i32, ptr [[GEP]], align 4
11- ; CHECK-NEXT: [[GEP1:%.*]] = getelementptr inbounds i32, ptr [[TMP2]], i32 0
11+ ; CHECK-NEXT: [[GEP1:%.*]] = getelementptr inbounds [1 x i32] , ptr [[TMP2]], i32 0 , i32 0
1212; CHECK-NEXT: store i32 [[TMP3]], ptr [[GEP1]], align 4
1313; CHECK-NEXT: ret void
1414;
@@ -23,17 +23,17 @@ define void @replace_3int_memcpy_test() #0 {
2323; CHECK-SAME: ) #[[ATTR0]] {
2424; CHECK-NEXT: [[TMP1:%.*]] = alloca [3 x i32], align 4
2525; CHECK-NEXT: [[TMP2:%.*]] = alloca [3 x i32], align 4
26- ; CHECK-NEXT: [[GEP:%.*]] = getelementptr inbounds i32, ptr [[TMP1]], i32 0
26+ ; CHECK-NEXT: [[GEP:%.*]] = getelementptr inbounds [3 x i32] , ptr [[TMP1]], i32 0 , i32 0
2727; CHECK-NEXT: [[TMP3:%.*]] = load i32, ptr [[GEP]], align 4
28- ; CHECK-NEXT: [[GEP1:%.*]] = getelementptr inbounds i32, ptr [[TMP2]], i32 0
28+ ; CHECK-NEXT: [[GEP1:%.*]] = getelementptr inbounds [3 x i32] , ptr [[TMP2]], i32 0 , i32 0
2929; CHECK-NEXT: store i32 [[TMP3]], ptr [[GEP1]], align 4
30- ; CHECK-NEXT: [[GEP2:%.*]] = getelementptr inbounds i32, ptr [[TMP1]], i32 1
30+ ; CHECK-NEXT: [[GEP2:%.*]] = getelementptr inbounds [3 x i32] , ptr [[TMP1]], i32 0 , i32 1
3131; CHECK-NEXT: [[TMP4:%.*]] = load i32, ptr [[GEP2]], align 4
32- ; CHECK-NEXT: [[GEP3:%.*]] = getelementptr inbounds i32, ptr [[TMP2]], i32 1
32+ ; CHECK-NEXT: [[GEP3:%.*]] = getelementptr inbounds [3 x i32] , ptr [[TMP2]], i32 0 , i32 1
3333; CHECK-NEXT: store i32 [[TMP4]], ptr [[GEP3]], align 4
34- ; CHECK-NEXT: [[GEP4:%.*]] = getelementptr inbounds i32, ptr [[TMP1]], i32 2
34+ ; CHECK-NEXT: [[GEP4:%.*]] = getelementptr inbounds [3 x i32] , ptr [[TMP1]], i32 0 , i32 2
3535; CHECK-NEXT: [[TMP5:%.*]] = load i32, ptr [[GEP4]], align 4
36- ; CHECK-NEXT: [[GEP5:%.*]] = getelementptr inbounds i32, ptr [[TMP2]], i32 2
36+ ; CHECK-NEXT: [[GEP5:%.*]] = getelementptr inbounds [3 x i32] , ptr [[TMP2]], i32 0 , i32 2
3737; CHECK-NEXT: store i32 [[TMP5]], ptr [[GEP5]], align 4
3838; CHECK-NEXT: ret void
3939;
@@ -48,13 +48,13 @@ define void @replace_mismatched_size_int_memcpy_test() #0 {
4848; CHECK-SAME: ) #[[ATTR0]] {
4949; CHECK-NEXT: [[TMP1:%.*]] = alloca [2 x i32], align 4
5050; CHECK-NEXT: [[TMP2:%.*]] = alloca [3 x i32], align 4
51- ; CHECK-NEXT: [[GEP:%.*]] = getelementptr inbounds i32, ptr [[TMP1]], i32 0
51+ ; CHECK-NEXT: [[GEP:%.*]] = getelementptr inbounds [2 x i32] , ptr [[TMP1]], i32 0 , i32 0
5252; CHECK-NEXT: [[TMP3:%.*]] = load i32, ptr [[GEP]], align 4
53- ; CHECK-NEXT: [[GEP1:%.*]] = getelementptr inbounds i32, ptr [[TMP2]], i32 0
53+ ; CHECK-NEXT: [[GEP1:%.*]] = getelementptr inbounds [3 x i32] , ptr [[TMP2]], i32 0 , i32 0
5454; CHECK-NEXT: store i32 [[TMP3]], ptr [[GEP1]], align 4
55- ; CHECK-NEXT: [[GEP2:%.*]] = getelementptr inbounds i32, ptr [[TMP1]], i32 1
55+ ; CHECK-NEXT: [[GEP2:%.*]] = getelementptr inbounds [2 x i32] , ptr [[TMP1]], i32 0 , i32 1
5656; CHECK-NEXT: [[TMP4:%.*]] = load i32, ptr [[GEP2]], align 4
57- ; CHECK-NEXT: [[GEP3:%.*]] = getelementptr inbounds i32, ptr [[TMP2]], i32 1
57+ ; CHECK-NEXT: [[GEP3:%.*]] = getelementptr inbounds [3 x i32] , ptr [[TMP2]], i32 0 , i32 1
5858; CHECK-NEXT: store i32 [[TMP4]], ptr [[GEP3]], align 4
5959; CHECK-NEXT: ret void
6060;
@@ -69,13 +69,13 @@ define void @replace_int16_memcpy_test() #0 {
6969; CHECK-SAME: ) #[[ATTR0]] {
7070; CHECK-NEXT: [[TMP1:%.*]] = alloca [2 x i16], align 2
7171; CHECK-NEXT: [[TMP2:%.*]] = alloca [2 x i16], align 2
72- ; CHECK-NEXT: [[GEP:%.*]] = getelementptr inbounds i16, ptr [[TMP1]], i32 0
72+ ; CHECK-NEXT: [[GEP:%.*]] = getelementptr inbounds [2 x i16] , ptr [[TMP1]], i32 0 , i32 0
7373; CHECK-NEXT: [[TMP3:%.*]] = load i16, ptr [[GEP]], align 2
74- ; CHECK-NEXT: [[GEP1:%.*]] = getelementptr inbounds i16, ptr [[TMP2]], i32 0
74+ ; CHECK-NEXT: [[GEP1:%.*]] = getelementptr inbounds [2 x i16] , ptr [[TMP2]], i32 0 , i32 0
7575; CHECK-NEXT: store i16 [[TMP3]], ptr [[GEP1]], align 2
76- ; CHECK-NEXT: [[GEP2:%.*]] = getelementptr inbounds i16, ptr [[TMP1]], i32 1
76+ ; CHECK-NEXT: [[GEP2:%.*]] = getelementptr inbounds [2 x i16] , ptr [[TMP1]], i32 0 , i32 1
7777; CHECK-NEXT: [[TMP4:%.*]] = load i16, ptr [[GEP2]], align 2
78- ; CHECK-NEXT: [[GEP3:%.*]] = getelementptr inbounds i16, ptr [[TMP2]], i32 1
78+ ; CHECK-NEXT: [[GEP3:%.*]] = getelementptr inbounds [2 x i16] , ptr [[TMP2]], i32 0 , i32 1
7979; CHECK-NEXT: store i16 [[TMP4]], ptr [[GEP3]], align 2
8080; CHECK-NEXT: ret void
8181;
@@ -90,13 +90,13 @@ define void @replace_float_memcpy_test() #0 {
9090; CHECK-SAME: ) #[[ATTR0]] {
9191; CHECK-NEXT: [[TMP1:%.*]] = alloca [2 x float], align 4
9292; CHECK-NEXT: [[TMP2:%.*]] = alloca [2 x float], align 4
93- ; CHECK-NEXT: [[GEP:%.*]] = getelementptr inbounds float, ptr [[TMP1]], i32 0
93+ ; CHECK-NEXT: [[GEP:%.*]] = getelementptr inbounds [2 x float] , ptr [[TMP1]], i32 0 , i32 0
9494; CHECK-NEXT: [[TMP3:%.*]] = load float, ptr [[GEP]], align 4
95- ; CHECK-NEXT: [[GEP1:%.*]] = getelementptr inbounds float, ptr [[TMP2]], i32 0
95+ ; CHECK-NEXT: [[GEP1:%.*]] = getelementptr inbounds [2 x float] , ptr [[TMP2]], i32 0 , i32 0
9696; CHECK-NEXT: store float [[TMP3]], ptr [[GEP1]], align 4
97- ; CHECK-NEXT: [[GEP2:%.*]] = getelementptr inbounds float, ptr [[TMP1]], i32 1
97+ ; CHECK-NEXT: [[GEP2:%.*]] = getelementptr inbounds [2 x float] , ptr [[TMP1]], i32 0 , i32 1
9898; CHECK-NEXT: [[TMP4:%.*]] = load float, ptr [[GEP2]], align 4
99- ; CHECK-NEXT: [[GEP3:%.*]] = getelementptr inbounds float, ptr [[TMP2]], i32 1
99+ ; CHECK-NEXT: [[GEP3:%.*]] = getelementptr inbounds [2 x float] , ptr [[TMP2]], i32 0 , i32 1
100100; CHECK-NEXT: store float [[TMP4]], ptr [[GEP3]], align 4
101101; CHECK-NEXT: ret void
102102;
@@ -111,13 +111,13 @@ define void @replace_double_memcpy_test() #0 {
111111; CHECK-SAME: ) #[[ATTR0]] {
112112; CHECK-NEXT: [[TMP1:%.*]] = alloca [2 x double], align 4
113113; CHECK-NEXT: [[TMP2:%.*]] = alloca [2 x double], align 4
114- ; CHECK-NEXT: [[GEP:%.*]] = getelementptr inbounds double, ptr [[TMP1]], i32 0
114+ ; CHECK-NEXT: [[GEP:%.*]] = getelementptr inbounds [2 x double] , ptr [[TMP1]], i32 0 , i32 0
115115; CHECK-NEXT: [[TMP3:%.*]] = load double, ptr [[GEP]], align 8
116- ; CHECK-NEXT: [[GEP1:%.*]] = getelementptr inbounds double, ptr [[TMP2]], i32 0
116+ ; CHECK-NEXT: [[GEP1:%.*]] = getelementptr inbounds [2 x double] , ptr [[TMP2]], i32 0 , i32 0
117117; CHECK-NEXT: store double [[TMP3]], ptr [[GEP1]], align 8
118- ; CHECK-NEXT: [[GEP2:%.*]] = getelementptr inbounds double, ptr [[TMP1]], i32 1
118+ ; CHECK-NEXT: [[GEP2:%.*]] = getelementptr inbounds [2 x double] , ptr [[TMP1]], i32 0 , i32 1
119119; CHECK-NEXT: [[TMP4:%.*]] = load double, ptr [[GEP2]], align 8
120- ; CHECK-NEXT: [[GEP3:%.*]] = getelementptr inbounds double, ptr [[TMP2]], i32 1
120+ ; CHECK-NEXT: [[GEP3:%.*]] = getelementptr inbounds [2 x double] , ptr [[TMP2]], i32 0 , i32 1
121121; CHECK-NEXT: store double [[TMP4]], ptr [[GEP3]], align 8
122122; CHECK-NEXT: ret void
123123;
@@ -132,13 +132,13 @@ define void @replace_half_memcpy_test() #0 {
132132; CHECK-SAME: ) #[[ATTR0]] {
133133; CHECK-NEXT: [[TMP1:%.*]] = alloca [2 x half], align 2
134134; CHECK-NEXT: [[TMP2:%.*]] = alloca [2 x half], align 2
135- ; CHECK-NEXT: [[GEP:%.*]] = getelementptr inbounds half, ptr [[TMP1]], i32 0
135+ ; CHECK-NEXT: [[GEP:%.*]] = getelementptr inbounds [2 x half] , ptr [[TMP1]], i32 0 , i32 0
136136; CHECK-NEXT: [[TMP3:%.*]] = load half, ptr [[GEP]], align 2
137- ; CHECK-NEXT: [[GEP1:%.*]] = getelementptr inbounds half, ptr [[TMP2]], i32 0
137+ ; CHECK-NEXT: [[GEP1:%.*]] = getelementptr inbounds [2 x half] , ptr [[TMP2]], i32 0 , i32 0
138138; CHECK-NEXT: store half [[TMP3]], ptr [[GEP1]], align 2
139- ; CHECK-NEXT: [[GEP2:%.*]] = getelementptr inbounds half, ptr [[TMP1]], i32 1
139+ ; CHECK-NEXT: [[GEP2:%.*]] = getelementptr inbounds [2 x half] , ptr [[TMP1]], i32 0 , i32 1
140140; CHECK-NEXT: [[TMP4:%.*]] = load half, ptr [[GEP2]], align 2
141- ; CHECK-NEXT: [[GEP3:%.*]] = getelementptr inbounds half, ptr [[TMP2]], i32 1
141+ ; CHECK-NEXT: [[GEP3:%.*]] = getelementptr inbounds [2 x half] , ptr [[TMP2]], i32 0 , i32 1
142142; CHECK-NEXT: store half [[TMP4]], ptr [[GEP3]], align 2
143143; CHECK-NEXT: ret void
144144;
0 commit comments