Skip to content

Commit 6d9e28e

Browse files
author
git apple-llvm automerger
committed
Merge commit '8f465a0cfb7b' from llvm.org/main into next
2 parents 3921034 + 8f465a0 commit 6d9e28e

File tree

1 file changed

+34
-0
lines changed
  • llvm/test/Transforms/SLPVectorizer/X86

1 file changed

+34
-0
lines changed

llvm/test/Transforms/SLPVectorizer/X86/sitofp.ll

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1096,6 +1096,40 @@ define <4 x double> @sitofp_4xi32_4f64(i32 %a0, i32 %a1, i32 %a2, i32 %a3) #0 {
10961096
ret <4 x double> %res3
10971097
}
10981098

1099+
define <4 x double> @sitofp_with_const_4xi32_4f64(i32 %a2, i32 %a3) #0 {
1100+
; CHECK-LABEL: @sitofp_with_const_4xi32_4f64(
1101+
; CHECK-NEXT: [[TMP1:%.*]] = insertelement <2 x i32> poison, i32 [[A2:%.*]], i32 0
1102+
; CHECK-NEXT: [[TMP2:%.*]] = insertelement <2 x i32> [[TMP1]], i32 [[A3:%.*]], i32 1
1103+
; CHECK-NEXT: [[TMP3:%.*]] = sitofp <2 x i32> [[TMP2]] to <2 x double>
1104+
; CHECK-NEXT: [[RES0:%.*]] = insertelement <4 x double> undef, double 1.000000e+00, i32 3
1105+
; CHECK-NEXT: [[TMP4:%.*]] = shufflevector <2 x double> [[TMP3]], <2 x double> poison, <4 x i32> <i32 0, i32 1, i32 undef, i32 undef>
1106+
; CHECK-NEXT: [[RES31:%.*]] = shufflevector <4 x double> [[RES0]], <4 x double> [[TMP4]], <4 x i32> <i32 4, i32 5, i32 2, i32 3>
1107+
; CHECK-NEXT: ret <4 x double> [[RES31]]
1108+
;
1109+
%cvt2 = sitofp i32 %a2 to double
1110+
%cvt3 = sitofp i32 %a3 to double
1111+
%res0 = insertelement <4 x double> undef, double 1.0, i32 3
1112+
%res2 = insertelement <4 x double> %res0, double %cvt2, i32 0
1113+
%res3 = insertelement <4 x double> %res2, double %cvt3, i32 1
1114+
ret <4 x double> %res3
1115+
}
1116+
1117+
define <4 x double> @sitofp_with_undef_4xi32_4f64(i32 %a2, i32 %a3) #0 {
1118+
; CHECK-LABEL: @sitofp_with_undef_4xi32_4f64(
1119+
; CHECK-NEXT: [[TMP1:%.*]] = insertelement <2 x i32> poison, i32 [[A2:%.*]], i32 0
1120+
; CHECK-NEXT: [[TMP2:%.*]] = insertelement <2 x i32> [[TMP1]], i32 [[A3:%.*]], i32 1
1121+
; CHECK-NEXT: [[TMP3:%.*]] = sitofp <2 x i32> [[TMP2]] to <2 x double>
1122+
; CHECK-NEXT: [[TMP4:%.*]] = shufflevector <2 x double> [[TMP3]], <2 x double> poison, <4 x i32> <i32 0, i32 1, i32 undef, i32 undef>
1123+
; CHECK-NEXT: [[RES31:%.*]] = shufflevector <4 x double> undef, <4 x double> [[TMP4]], <4 x i32> <i32 4, i32 5, i32 2, i32 3>
1124+
; CHECK-NEXT: ret <4 x double> [[RES31]]
1125+
;
1126+
%cvt2 = sitofp i32 %a2 to double
1127+
%cvt3 = sitofp i32 %a3 to double
1128+
%res2 = insertelement <4 x double> undef, double %cvt2, i32 0
1129+
%res3 = insertelement <4 x double> %res2, double %cvt3, i32 1
1130+
ret <4 x double> %res3
1131+
}
1132+
10991133
define <4 x float> @sitofp_4xi32_4f32(i32 %a0, i32 %a1, i32 %a2, i32 %a3) #0 {
11001134
; CHECK-LABEL: @sitofp_4xi32_4f32(
11011135
; CHECK-NEXT: [[TMP1:%.*]] = insertelement <4 x i32> poison, i32 [[A0:%.*]], i32 0

0 commit comments

Comments
 (0)