@@ -14,10 +14,10 @@ target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128"
14
14
define <4 x i8 > @test_ret_const () #0 {
15
15
; CHECK-LABEL: test_ret_const(
16
16
; CHECK: {
17
- ; CHECK-NEXT: .reg .b32 %r<3 >;
17
+ ; CHECK-NEXT: .reg .b32 %r<2 >;
18
18
; CHECK-EMPTY:
19
19
; CHECK-NEXT: // %bb.0:
20
- ; CHECK-NEXT: mov.u32 %r1, -66911489;
20
+ ; CHECK-NEXT: mov.b32 %r1, -66911489;
21
21
; CHECK-NEXT: st.param.b32 [func_retval0+0], %r1;
22
22
; CHECK-NEXT: ret;
23
23
ret <4 x i8 > <i8 -1 , i8 2 , i8 3 , i8 -4 >
@@ -1110,40 +1110,71 @@ define <4 x i64> @test_zext_2xi64(<4 x i8> %a) #0 {
1110
1110
ret <4 x i64 > %r
1111
1111
}
1112
1112
1113
- define <4 x i8 > @test_bitcast_i32_to_2xi8 (i32 %a ) #0 {
1114
- ; CHECK-LABEL: test_bitcast_i32_to_2xi8 (
1113
+ define <4 x i8 > @test_bitcast_i32_to_4xi8 (i32 %a ) #0 {
1114
+ ; CHECK-LABEL: test_bitcast_i32_to_4xi8 (
1115
1115
; CHECK: {
1116
1116
; CHECK-NEXT: .reg .b32 %r<3>;
1117
1117
; CHECK-EMPTY:
1118
1118
; CHECK-NEXT: // %bb.0:
1119
- ; CHECK-NEXT: ld.param.u32 %r1, [test_bitcast_i32_to_2xi8_param_0 ];
1119
+ ; CHECK-NEXT: ld.param.u32 %r1, [test_bitcast_i32_to_4xi8_param_0 ];
1120
1120
; CHECK-NEXT: st.param.b32 [func_retval0+0], %r1;
1121
1121
; CHECK-NEXT: ret;
1122
1122
%r = bitcast i32 %a to <4 x i8 >
1123
1123
ret <4 x i8 > %r
1124
1124
}
1125
1125
1126
- define i32 @test_bitcast_2xi8_to_i32 (<4 x i8 > %a ) #0 {
1127
- ; CHECK-LABEL: test_bitcast_2xi8_to_i32(
1126
+ define <4 x i8 > @test_bitcast_float_to_4xi8 (float %a ) #0 {
1127
+ ; CHECK-LABEL: test_bitcast_float_to_4xi8(
1128
+ ; CHECK: {
1129
+ ; CHECK-NEXT: .reg .b32 %r<2>;
1130
+ ; CHECK-NEXT: .reg .f32 %f<2>;
1131
+ ; CHECK-EMPTY:
1132
+ ; CHECK-NEXT: // %bb.0:
1133
+ ; CHECK-NEXT: ld.param.f32 %f1, [test_bitcast_float_to_4xi8_param_0];
1134
+ ; CHECK-NEXT: mov.b32 %r1, %f1;
1135
+ ; CHECK-NEXT: st.param.b32 [func_retval0+0], %r1;
1136
+ ; CHECK-NEXT: ret;
1137
+ %r = bitcast float %a to <4 x i8 >
1138
+ ret <4 x i8 > %r
1139
+ }
1140
+
1141
+ define i32 @test_bitcast_4xi8_to_i32 (<4 x i8 > %a ) #0 {
1142
+ ; CHECK-LABEL: test_bitcast_4xi8_to_i32(
1128
1143
; CHECK: {
1129
1144
; CHECK-NEXT: .reg .b32 %r<3>;
1130
1145
; CHECK-EMPTY:
1131
1146
; CHECK-NEXT: // %bb.0:
1132
- ; CHECK-NEXT: ld.param.u32 %r2, [test_bitcast_2xi8_to_i32_param_0 ];
1147
+ ; CHECK-NEXT: ld.param.u32 %r2, [test_bitcast_4xi8_to_i32_param_0 ];
1133
1148
; CHECK-NEXT: st.param.b32 [func_retval0+0], %r2;
1134
1149
; CHECK-NEXT: ret;
1135
1150
%r = bitcast <4 x i8 > %a to i32
1136
1151
ret i32 %r
1137
1152
}
1138
1153
1139
- define <2 x half > @test_bitcast_2xi8_to_2xhalf (i8 %a ) #0 {
1140
- ; CHECK-LABEL: test_bitcast_2xi8_to_2xhalf(
1154
+ define float @test_bitcast_4xi8_to_float (<4 x i8 > %a ) #0 {
1155
+ ; CHECK-LABEL: test_bitcast_4xi8_to_float(
1156
+ ; CHECK: {
1157
+ ; CHECK-NEXT: .reg .b32 %r<3>;
1158
+ ; CHECK-NEXT: .reg .f32 %f<2>;
1159
+ ; CHECK-EMPTY:
1160
+ ; CHECK-NEXT: // %bb.0:
1161
+ ; CHECK-NEXT: ld.param.u32 %r2, [test_bitcast_4xi8_to_float_param_0];
1162
+ ; CHECK-NEXT: mov.b32 %f1, %r2;
1163
+ ; CHECK-NEXT: st.param.f32 [func_retval0+0], %f1;
1164
+ ; CHECK-NEXT: ret;
1165
+ %r = bitcast <4 x i8 > %a to float
1166
+ ret float %r
1167
+ }
1168
+
1169
+
1170
+ define <2 x half > @test_bitcast_4xi8_to_2xhalf (i8 %a ) #0 {
1171
+ ; CHECK-LABEL: test_bitcast_4xi8_to_2xhalf(
1141
1172
; CHECK: {
1142
1173
; CHECK-NEXT: .reg .b16 %rs<2>;
1143
1174
; CHECK-NEXT: .reg .b32 %r<6>;
1144
1175
; CHECK-EMPTY:
1145
1176
; CHECK-NEXT: // %bb.0:
1146
- ; CHECK-NEXT: ld.param.u8 %rs1, [test_bitcast_2xi8_to_2xhalf_param_0 ];
1177
+ ; CHECK-NEXT: ld.param.u8 %rs1, [test_bitcast_4xi8_to_2xhalf_param_0 ];
1147
1178
; CHECK-NEXT: cvt.u32.u16 %r1, %rs1;
1148
1179
; CHECK-NEXT: bfi.b32 %r2, 5, %r1, 8, 8;
1149
1180
; CHECK-NEXT: bfi.b32 %r3, 6, %r2, 16, 8;
@@ -1207,14 +1238,14 @@ define <4 x i8> @test_insertelement(<4 x i8> %a, i8 %x) #0 {
1207
1238
ret <4 x i8 > %i
1208
1239
}
1209
1240
1210
- define <4 x i8 > @test_fptosi_2xhalf_to_2xi8 (<4 x half > %a ) #0 {
1211
- ; CHECK-LABEL: test_fptosi_2xhalf_to_2xi8 (
1241
+ define <4 x i8 > @test_fptosi_4xhalf_to_4xi8 (<4 x half > %a ) #0 {
1242
+ ; CHECK-LABEL: test_fptosi_4xhalf_to_4xi8 (
1212
1243
; CHECK: {
1213
1244
; CHECK-NEXT: .reg .b16 %rs<13>;
1214
1245
; CHECK-NEXT: .reg .b32 %r<15>;
1215
1246
; CHECK-EMPTY:
1216
1247
; CHECK-NEXT: // %bb.0:
1217
- ; CHECK-NEXT: ld.param.v2.u32 {%r3, %r4}, [test_fptosi_2xhalf_to_2xi8_param_0 ];
1248
+ ; CHECK-NEXT: ld.param.v2.u32 {%r3, %r4}, [test_fptosi_4xhalf_to_4xi8_param_0 ];
1218
1249
; CHECK-NEXT: mov.b32 {%rs1, %rs2}, %r3;
1219
1250
; CHECK-NEXT: cvt.rzi.s16.f16 %rs3, %rs2;
1220
1251
; CHECK-NEXT: cvt.rzi.s16.f16 %rs4, %rs1;
@@ -1238,14 +1269,14 @@ define <4 x i8> @test_fptosi_2xhalf_to_2xi8(<4 x half> %a) #0 {
1238
1269
ret <4 x i8 > %r
1239
1270
}
1240
1271
1241
- define <4 x i8 > @test_fptoui_2xhalf_to_2xi8 (<4 x half > %a ) #0 {
1242
- ; CHECK-LABEL: test_fptoui_2xhalf_to_2xi8 (
1272
+ define <4 x i8 > @test_fptoui_4xhalf_to_4xi8 (<4 x half > %a ) #0 {
1273
+ ; CHECK-LABEL: test_fptoui_4xhalf_to_4xi8 (
1243
1274
; CHECK: {
1244
1275
; CHECK-NEXT: .reg .b16 %rs<13>;
1245
1276
; CHECK-NEXT: .reg .b32 %r<15>;
1246
1277
; CHECK-EMPTY:
1247
1278
; CHECK-NEXT: // %bb.0:
1248
- ; CHECK-NEXT: ld.param.v2.u32 {%r3, %r4}, [test_fptoui_2xhalf_to_2xi8_param_0 ];
1279
+ ; CHECK-NEXT: ld.param.v2.u32 {%r3, %r4}, [test_fptoui_4xhalf_to_4xi8_param_0 ];
1249
1280
; CHECK-NEXT: mov.b32 {%rs1, %rs2}, %r3;
1250
1281
; CHECK-NEXT: cvt.rzi.u16.f16 %rs3, %rs2;
1251
1282
; CHECK-NEXT: cvt.rzi.u16.f16 %rs4, %rs1;
0 commit comments