@@ -1203,8 +1203,8 @@ define float @test_fneg_ninf_mul_nsz_with_const(float %a) {
12031203 ret float %f2
12041204}
12051205
1206- define <2 x float > @test_fneg_ninf_mul_nnan_with_vec_const (<2 x float > %a ) {
1207- ; CHECK-LABEL: @test_fneg_ninf_mul_nnan_with_vec_const (
1206+ define <2 x float > @test_fneg_mul_combine_nnan_ninf_with_vec_const (<2 x float > %a ) {
1207+ ; CHECK-LABEL: @test_fneg_mul_combine_nnan_ninf_with_vec_const (
12081208; CHECK-NEXT: [[F2:%.*]] = fmul nnan <2 x float> [[A:%.*]], <float -0.000000e+00, float 0.000000e+00>
12091209; CHECK-NEXT: ret <2 x float> [[F2]]
12101210;
@@ -1213,8 +1213,8 @@ define <2 x float> @test_fneg_ninf_mul_nnan_with_vec_const(<2 x float> %a) {
12131213 ret <2 x float > %f2
12141214}
12151215
1216- define <2 x float > @test_fneg_ninf_mul_nsz_with_vec_const (<2 x float > %a ) {
1217- ; CHECK-LABEL: @test_fneg_ninf_mul_nsz_with_vec_const (
1216+ define <2 x float > @test_fneg_mul_combine_nsz_ninf_with_vec_const (<2 x float > %a ) {
1217+ ; CHECK-LABEL: @test_fneg_mul_combine_nsz_ninf_with_vec_const (
12181218; CHECK-NEXT: [[F2:%.*]] = fmul nsz <2 x float> [[A:%.*]], <float -0.000000e+00, float 0.000000e+00>
12191219; CHECK-NEXT: ret <2 x float> [[F2]]
12201220;
@@ -1223,8 +1223,8 @@ define <2 x float> @test_fneg_ninf_mul_nsz_with_vec_const(<2 x float> %a) {
12231223 ret <2 x float > %f2
12241224}
12251225
1226- define <2 x float > @test_fneg_nnan_ninf_mul_with_vec_const (<2 x float > %a ) {
1227- ; CHECK-LABEL: @test_fneg_nnan_ninf_mul_with_vec_const (
1226+ define <2 x float > @test_fneg_ninf_nnan_mul_with_vec_const (<2 x float > %a ) {
1227+ ; CHECK-LABEL: @test_fneg_ninf_nnan_mul_with_vec_const (
12281228; CHECK-NEXT: [[F2:%.*]] = fmul nnan <2 x float> [[A:%.*]], <float -0.000000e+00, float 0.000000e+00>
12291229; CHECK-NEXT: ret <2 x float> [[F2]]
12301230;
@@ -1233,8 +1233,8 @@ define <2 x float> @test_fneg_nnan_ninf_mul_with_vec_const(<2 x float> %a) {
12331233 ret <2 x float > %f2
12341234}
12351235
1236- define <2 x float > @test_fneg_nnan_ninf_mul_ninf_with_vec_const (<2 x float > %a ) {
1237- ; CHECK-LABEL: @test_fneg_nnan_ninf_mul_ninf_with_vec_const (
1236+ define <2 x float > @test_fneg_mul_combine_nnan_ninf_with_vec_const2 (<2 x float > %a ) {
1237+ ; CHECK-LABEL: @test_fneg_mul_combine_nnan_ninf_with_vec_const2 (
12381238; CHECK-NEXT: [[F2:%.*]] = fmul nnan ninf <2 x float> [[A:%.*]], <float -0.000000e+00, float 0.000000e+00>
12391239; CHECK-NEXT: ret <2 x float> [[F2]]
12401240;
@@ -1243,4 +1243,64 @@ define <2 x float> @test_fneg_nnan_ninf_mul_ninf_with_vec_const(<2 x float> %a)
12431243 ret <2 x float > %f2
12441244}
12451245
1246+ define <2 x float > @test_fneg_mul_combine_reassoc_ninf_with_vec_const1 (<2 x float > %a ) {
1247+ ; CHECK-LABEL: @test_fneg_mul_combine_reassoc_ninf_with_vec_const1(
1248+ ; CHECK-NEXT: [[F2:%.*]] = fmul <2 x float> [[A:%.*]], <float -0.000000e+00, float 0.000000e+00>
1249+ ; CHECK-NEXT: ret <2 x float> [[F2]]
1250+ ;
1251+ %f1 = fmul reassoc <2 x float > %a , <float 0 .000000 , float -0 .000000 >
1252+ %f2 = fneg ninf <2 x float > %f1
1253+ ret <2 x float > %f2
1254+ }
1255+
1256+ define <2 x float > @test_fneg_mul_combine_reassoc_ninf_with_vec_const2 (<2 x float > %a ) {
1257+ ; CHECK-LABEL: @test_fneg_mul_combine_reassoc_ninf_with_vec_const2(
1258+ ; CHECK-NEXT: [[F2:%.*]] = fmul ninf <2 x float> [[A:%.*]], <float -0.000000e+00, float 0.000000e+00>
1259+ ; CHECK-NEXT: ret <2 x float> [[F2]]
1260+ ;
1261+ %f1 = fmul ninf <2 x float > %a , <float 0 .000000 , float -0 .000000 >
1262+ %f2 = fneg reassoc ninf <2 x float > %f1
1263+ ret <2 x float > %f2
1264+ }
1265+
1266+ define <2 x float > @test_fneg_mul_combine_reassoc_ninf_with_vec_const3 (<2 x float > %a ) {
1267+ ; CHECK-LABEL: @test_fneg_mul_combine_reassoc_ninf_with_vec_const3(
1268+ ; CHECK-NEXT: [[F2:%.*]] = fmul reassoc <2 x float> [[A:%.*]], <float -0.000000e+00, float 0.000000e+00>
1269+ ; CHECK-NEXT: ret <2 x float> [[F2]]
1270+ ;
1271+ %f1 = fmul reassoc <2 x float > %a , <float 0 .000000 , float -0 .000000 >
1272+ %f2 = fneg reassoc ninf <2 x float > %f1
1273+ ret <2 x float > %f2
1274+ }
1275+
1276+ define <2 x float > @test_fneg_mul_combine_contract_ninf_with_vec_const1 (<2 x float > %a ) {
1277+ ; CHECK-LABEL: @test_fneg_mul_combine_contract_ninf_with_vec_const1(
1278+ ; CHECK-NEXT: [[F2:%.*]] = fmul <2 x float> [[A:%.*]], <float -0.000000e+00, float 0.000000e+00>
1279+ ; CHECK-NEXT: ret <2 x float> [[F2]]
1280+ ;
1281+ %f1 = fmul contract <2 x float > %a , <float 0 .000000 , float -0 .000000 >
1282+ %f2 = fneg ninf <2 x float > %f1
1283+ ret <2 x float > %f2
1284+ }
1285+
1286+ define <2 x float > @test_fneg_mul_combine_contract_ninf_with_vec_const2 (<2 x float > %a ) {
1287+ ; CHECK-LABEL: @test_fneg_mul_combine_contract_ninf_with_vec_const2(
1288+ ; CHECK-NEXT: [[F2:%.*]] = fmul ninf <2 x float> [[A:%.*]], <float -0.000000e+00, float 0.000000e+00>
1289+ ; CHECK-NEXT: ret <2 x float> [[F2]]
1290+ ;
1291+ %f1 = fmul ninf <2 x float > %a , <float 0 .000000 , float -0 .000000 >
1292+ %f2 = fneg contract ninf <2 x float > %f1
1293+ ret <2 x float > %f2
1294+ }
1295+
1296+ define <2 x float > @test_fneg_mul_combine_contract_ninf_with_vec_const3 (<2 x float > %a ) {
1297+ ; CHECK-LABEL: @test_fneg_mul_combine_contract_ninf_with_vec_const3(
1298+ ; CHECK-NEXT: [[F2:%.*]] = fmul contract <2 x float> [[A:%.*]], <float -0.000000e+00, float 0.000000e+00>
1299+ ; CHECK-NEXT: ret <2 x float> [[F2]]
1300+ ;
1301+ %f1 = fmul contract <2 x float > %a , <float 0 .000000 , float -0 .000000 >
1302+ %f2 = fneg contract ninf <2 x float > %f1
1303+ ret <2 x float > %f2
1304+ }
1305+
12461306!0 = !{}
0 commit comments