@@ -36,8 +36,8 @@ define <4 x double> @fadd_v4f64_poison_idx(<4 x double> %a, <4 x double> %b) {
3636 ret <4 x double > %post
3737}
3838
39- define <4 x double > @fadd_mixed_types (<4 x double > %a , <2 x double > %b ) {
40- ; CHECK-LABEL: define <4 x double> @fadd_mixed_types (
39+ define <4 x double > @fadd_v4f64_mixed_types (<4 x double > %a , <2 x double > %b ) {
40+ ; CHECK-LABEL: define <4 x double> @fadd_v4f64_mixed_types (
4141; CHECK-SAME: <4 x double> [[A:%.*]], <2 x double> [[B:%.*]]) #[[ATTR0]] {
4242; CHECK-NEXT: [[TMP1:%.*]] = shufflevector <4 x double> [[A]], <4 x double> poison, <4 x i32> <i32 2, i32 3, i32 0, i32 1>
4343; CHECK-NEXT: [[TMP2:%.*]] = shufflevector <2 x double> [[B]], <2 x double> poison, <4 x i32> <i32 0, i32 1, i32 0, i32 1>
@@ -51,6 +51,19 @@ define <4 x double> @fadd_mixed_types(<4 x double> %a, <2 x double> %b) {
5151 ret <4 x double > %post
5252}
5353
54+ define <4 x float > @fadd_v4f32_mixed_types (<4 x float > %a0 ) {
55+ ; CHECK-LABEL: define <4 x float> @fadd_v4f32_mixed_types(
56+ ; CHECK-SAME: <4 x float> [[A0:%.*]]) #[[ATTR0]] {
57+ ; CHECK-NEXT: [[TMP1:%.*]] = shufflevector <4 x float> [[A0]], <4 x float> zeroinitializer, <4 x i32> <i32 1, i32 5, i32 poison, i32 poison>
58+ ; CHECK-NEXT: [[POST:%.*]] = fmul <4 x float> [[TMP1]], <float 0.000000e+00, float 0.000000e+00, float undef, float undef>
59+ ; CHECK-NEXT: ret <4 x float> [[POST]]
60+ ;
61+ %pre = shufflevector <4 x float > %a0 , <4 x float > zeroinitializer , <2 x i32 > <i32 1 , i32 5 >
62+ %op = fmul <2 x float > %pre , zeroinitializer
63+ %post = shufflevector <2 x float > %op , <2 x float > poison, <4 x i32 > <i32 0 , i32 1 , i32 poison, i32 poison>
64+ ret <4 x float > %post
65+ }
66+
5467; Negative test - multiple use of fadd
5568define <4 x double > @fadd_v4f64_multiuse_op (<4 x double > %a , <4 x double > %b ) {
5669; CHECK-LABEL: define <4 x double> @fadd_v4f64_multiuse_op(
0 commit comments