Changeset View
Changeset View
Standalone View
Standalone View
test/Transforms/SLPVectorizer/X86/fptosi.ll
Show First 20 Lines • Show All 101 Lines • ▼ Show 20 Lines | ; | ||||
store i64 %cvt4, i64* getelementptr inbounds ([8 x i64], [8 x i64]* @dst64, i32 0, i64 4), align 8 | store i64 %cvt4, i64* getelementptr inbounds ([8 x i64], [8 x i64]* @dst64, i32 0, i64 4), align 8 | ||||
store i64 %cvt5, i64* getelementptr inbounds ([8 x i64], [8 x i64]* @dst64, i32 0, i64 5), align 8 | store i64 %cvt5, i64* getelementptr inbounds ([8 x i64], [8 x i64]* @dst64, i32 0, i64 5), align 8 | ||||
store i64 %cvt6, i64* getelementptr inbounds ([8 x i64], [8 x i64]* @dst64, i32 0, i64 6), align 8 | store i64 %cvt6, i64* getelementptr inbounds ([8 x i64], [8 x i64]* @dst64, i32 0, i64 6), align 8 | ||||
store i64 %cvt7, i64* getelementptr inbounds ([8 x i64], [8 x i64]* @dst64, i32 0, i64 7), align 8 | store i64 %cvt7, i64* getelementptr inbounds ([8 x i64], [8 x i64]* @dst64, i32 0, i64 7), align 8 | ||||
ret void | ret void | ||||
} | } | ||||
define void @fptosi_8f64_8i32() #0 { | define void @fptosi_8f64_8i32() #0 { | ||||
; SSE-LABEL: @fptosi_8f64_8i32( | ; CHECK-LABEL: @fptosi_8f64_8i32( | ||||
; SSE-NEXT: [[TMP1:%.*]] = load <4 x double>, <4 x double>* bitcast ([8 x double]* @src64 to <4 x double>*), align 8 | ; CHECK-NEXT: [[TMP1:%.*]] = load <8 x double>, <8 x double>* bitcast ([8 x double]* @src64 to <8 x double>*), align 8 | ||||
; SSE-NEXT: [[TMP2:%.*]] = load <4 x double>, <4 x double>* bitcast (double* getelementptr inbounds ([8 x double], [8 x double]* @src64, i32 0, i64 4) to <4 x double>*), align 8 | ; CHECK-NEXT: [[TMP2:%.*]] = fptosi <8 x double> [[TMP1]] to <8 x i32> | ||||
; SSE-NEXT: [[TMP3:%.*]] = fptosi <4 x double> [[TMP1]] to <4 x i32> | ; CHECK-NEXT: store <8 x i32> [[TMP2]], <8 x i32>* bitcast ([16 x i32]* @dst32 to <8 x i32>*), align 4 | ||||
; SSE-NEXT: [[TMP4:%.*]] = fptosi <4 x double> [[TMP2]] to <4 x i32> | ; CHECK-NEXT: ret void | ||||
; SSE-NEXT: store <4 x i32> [[TMP3]], <4 x i32>* bitcast ([16 x i32]* @dst32 to <4 x i32>*), align 4 | |||||
; SSE-NEXT: store <4 x i32> [[TMP4]], <4 x i32>* bitcast (i32* getelementptr inbounds ([16 x i32], [16 x i32]* @dst32, i32 0, i64 4) to <4 x i32>*), align 4 | |||||
; SSE-NEXT: ret void | |||||
; | |||||
; AVX-LABEL: @fptosi_8f64_8i32( | |||||
; AVX-NEXT: [[TMP1:%.*]] = load <8 x double>, <8 x double>* bitcast ([8 x double]* @src64 to <8 x double>*), align 8 | |||||
; AVX-NEXT: [[TMP2:%.*]] = fptosi <8 x double> [[TMP1]] to <8 x i32> | |||||
; AVX-NEXT: store <8 x i32> [[TMP2]], <8 x i32>* bitcast ([16 x i32]* @dst32 to <8 x i32>*), align 4 | |||||
; AVX-NEXT: ret void | |||||
; | ; | ||||
%a0 = load double, double* getelementptr inbounds ([8 x double], [8 x double]* @src64, i32 0, i64 0), align 8 | %a0 = load double, double* getelementptr inbounds ([8 x double], [8 x double]* @src64, i32 0, i64 0), align 8 | ||||
%a1 = load double, double* getelementptr inbounds ([8 x double], [8 x double]* @src64, i32 0, i64 1), align 8 | %a1 = load double, double* getelementptr inbounds ([8 x double], [8 x double]* @src64, i32 0, i64 1), align 8 | ||||
%a2 = load double, double* getelementptr inbounds ([8 x double], [8 x double]* @src64, i32 0, i64 2), align 8 | %a2 = load double, double* getelementptr inbounds ([8 x double], [8 x double]* @src64, i32 0, i64 2), align 8 | ||||
%a3 = load double, double* getelementptr inbounds ([8 x double], [8 x double]* @src64, i32 0, i64 3), align 8 | %a3 = load double, double* getelementptr inbounds ([8 x double], [8 x double]* @src64, i32 0, i64 3), align 8 | ||||
%a4 = load double, double* getelementptr inbounds ([8 x double], [8 x double]* @src64, i32 0, i64 4), align 8 | %a4 = load double, double* getelementptr inbounds ([8 x double], [8 x double]* @src64, i32 0, i64 4), align 8 | ||||
%a5 = load double, double* getelementptr inbounds ([8 x double], [8 x double]* @src64, i32 0, i64 5), align 8 | %a5 = load double, double* getelementptr inbounds ([8 x double], [8 x double]* @src64, i32 0, i64 5), align 8 | ||||
%a6 = load double, double* getelementptr inbounds ([8 x double], [8 x double]* @src64, i32 0, i64 6), align 8 | %a6 = load double, double* getelementptr inbounds ([8 x double], [8 x double]* @src64, i32 0, i64 6), align 8 | ||||
▲ Show 20 Lines • Show All 221 Lines • ▼ Show 20 Lines | ; | ||||
store i64 %cvt4, i64* getelementptr inbounds ([8 x i64], [8 x i64]* @dst64, i32 0, i64 4), align 8 | store i64 %cvt4, i64* getelementptr inbounds ([8 x i64], [8 x i64]* @dst64, i32 0, i64 4), align 8 | ||||
store i64 %cvt5, i64* getelementptr inbounds ([8 x i64], [8 x i64]* @dst64, i32 0, i64 5), align 8 | store i64 %cvt5, i64* getelementptr inbounds ([8 x i64], [8 x i64]* @dst64, i32 0, i64 5), align 8 | ||||
store i64 %cvt6, i64* getelementptr inbounds ([8 x i64], [8 x i64]* @dst64, i32 0, i64 6), align 8 | store i64 %cvt6, i64* getelementptr inbounds ([8 x i64], [8 x i64]* @dst64, i32 0, i64 6), align 8 | ||||
store i64 %cvt7, i64* getelementptr inbounds ([8 x i64], [8 x i64]* @dst64, i32 0, i64 7), align 8 | store i64 %cvt7, i64* getelementptr inbounds ([8 x i64], [8 x i64]* @dst64, i32 0, i64 7), align 8 | ||||
ret void | ret void | ||||
} | } | ||||
define void @fptosi_8f32_8i32() #0 { | define void @fptosi_8f32_8i32() #0 { | ||||
; SSE-LABEL: @fptosi_8f32_8i32( | ; CHECK-LABEL: @fptosi_8f32_8i32( | ||||
; SSE-NEXT: [[TMP1:%.*]] = load <4 x float>, <4 x float>* bitcast ([16 x float]* @src32 to <4 x float>*), align 4 | ; CHECK-NEXT: [[TMP1:%.*]] = load <8 x float>, <8 x float>* bitcast ([16 x float]* @src32 to <8 x float>*), align 4 | ||||
; SSE-NEXT: [[TMP2:%.*]] = load <4 x float>, <4 x float>* bitcast (float* getelementptr inbounds ([16 x float], [16 x float]* @src32, i32 0, i64 4) to <4 x float>*), align 4 | ; CHECK-NEXT: [[TMP2:%.*]] = fptosi <8 x float> [[TMP1]] to <8 x i32> | ||||
; SSE-NEXT: [[TMP3:%.*]] = fptosi <4 x float> [[TMP1]] to <4 x i32> | ; CHECK-NEXT: store <8 x i32> [[TMP2]], <8 x i32>* bitcast ([16 x i32]* @dst32 to <8 x i32>*), align 4 | ||||
; SSE-NEXT: [[TMP4:%.*]] = fptosi <4 x float> [[TMP2]] to <4 x i32> | ; CHECK-NEXT: ret void | ||||
; SSE-NEXT: store <4 x i32> [[TMP3]], <4 x i32>* bitcast ([16 x i32]* @dst32 to <4 x i32>*), align 4 | |||||
; SSE-NEXT: store <4 x i32> [[TMP4]], <4 x i32>* bitcast (i32* getelementptr inbounds ([16 x i32], [16 x i32]* @dst32, i32 0, i64 4) to <4 x i32>*), align 4 | |||||
; SSE-NEXT: ret void | |||||
; | |||||
; AVX-LABEL: @fptosi_8f32_8i32( | |||||
; AVX-NEXT: [[TMP1:%.*]] = load <8 x float>, <8 x float>* bitcast ([16 x float]* @src32 to <8 x float>*), align 4 | |||||
; AVX-NEXT: [[TMP2:%.*]] = fptosi <8 x float> [[TMP1]] to <8 x i32> | |||||
; AVX-NEXT: store <8 x i32> [[TMP2]], <8 x i32>* bitcast ([16 x i32]* @dst32 to <8 x i32>*), align 4 | |||||
; AVX-NEXT: ret void | |||||
; | ; | ||||
%a0 = load float, float* getelementptr inbounds ([16 x float], [16 x float]* @src32, i32 0, i64 0), align 4 | %a0 = load float, float* getelementptr inbounds ([16 x float], [16 x float]* @src32, i32 0, i64 0), align 4 | ||||
%a1 = load float, float* getelementptr inbounds ([16 x float], [16 x float]* @src32, i32 0, i64 1), align 4 | %a1 = load float, float* getelementptr inbounds ([16 x float], [16 x float]* @src32, i32 0, i64 1), align 4 | ||||
%a2 = load float, float* getelementptr inbounds ([16 x float], [16 x float]* @src32, i32 0, i64 2), align 4 | %a2 = load float, float* getelementptr inbounds ([16 x float], [16 x float]* @src32, i32 0, i64 2), align 4 | ||||
%a3 = load float, float* getelementptr inbounds ([16 x float], [16 x float]* @src32, i32 0, i64 3), align 4 | %a3 = load float, float* getelementptr inbounds ([16 x float], [16 x float]* @src32, i32 0, i64 3), align 4 | ||||
%a4 = load float, float* getelementptr inbounds ([16 x float], [16 x float]* @src32, i32 0, i64 4), align 4 | %a4 = load float, float* getelementptr inbounds ([16 x float], [16 x float]* @src32, i32 0, i64 4), align 4 | ||||
%a5 = load float, float* getelementptr inbounds ([16 x float], [16 x float]* @src32, i32 0, i64 5), align 4 | %a5 = load float, float* getelementptr inbounds ([16 x float], [16 x float]* @src32, i32 0, i64 5), align 4 | ||||
%a6 = load float, float* getelementptr inbounds ([16 x float], [16 x float]* @src32, i32 0, i64 6), align 4 | %a6 = load float, float* getelementptr inbounds ([16 x float], [16 x float]* @src32, i32 0, i64 6), align 4 | ||||
▲ Show 20 Lines • Show All 107 Lines • ▼ Show 20 Lines | |||||
} | } | ||||
; | ; | ||||
; FPTOSI BUILDVECTOR | ; FPTOSI BUILDVECTOR | ||||
; | ; | ||||
define <4 x i32> @fptosi_4xf64_4i32(double %a0, double %a1, double %a2, double %a3) #0 { | define <4 x i32> @fptosi_4xf64_4i32(double %a0, double %a1, double %a2, double %a3) #0 { | ||||
; CHECK-LABEL: @fptosi_4xf64_4i32( | ; CHECK-LABEL: @fptosi_4xf64_4i32( | ||||
; CHECK-NEXT: [[CVT0:%.*]] = fptosi double %a0 to i32 | ; CHECK-NEXT: [[CVT0:%.*]] = fptosi double [[A0:%.*]] to i32 | ||||
; CHECK-NEXT: [[CVT1:%.*]] = fptosi double %a1 to i32 | ; CHECK-NEXT: [[CVT1:%.*]] = fptosi double [[A1:%.*]] to i32 | ||||
; CHECK-NEXT: [[CVT2:%.*]] = fptosi double %a2 to i32 | ; CHECK-NEXT: [[CVT2:%.*]] = fptosi double [[A2:%.*]] to i32 | ||||
; CHECK-NEXT: [[CVT3:%.*]] = fptosi double %a3 to i32 | ; CHECK-NEXT: [[CVT3:%.*]] = fptosi double [[A3:%.*]] to i32 | ||||
; CHECK-NEXT: [[RES0:%.*]] = insertelement <4 x i32> undef, i32 [[CVT0]], i32 0 | ; CHECK-NEXT: [[RES0:%.*]] = insertelement <4 x i32> undef, i32 [[CVT0]], i32 0 | ||||
; CHECK-NEXT: [[RES1:%.*]] = insertelement <4 x i32> [[RES0]], i32 [[CVT1]], i32 1 | ; CHECK-NEXT: [[RES1:%.*]] = insertelement <4 x i32> [[RES0]], i32 [[CVT1]], i32 1 | ||||
; CHECK-NEXT: [[RES2:%.*]] = insertelement <4 x i32> [[RES1]], i32 [[CVT2]], i32 2 | ; CHECK-NEXT: [[RES2:%.*]] = insertelement <4 x i32> [[RES1]], i32 [[CVT2]], i32 2 | ||||
; CHECK-NEXT: [[RES3:%.*]] = insertelement <4 x i32> [[RES2]], i32 [[CVT3]], i32 3 | ; CHECK-NEXT: [[RES3:%.*]] = insertelement <4 x i32> [[RES2]], i32 [[CVT3]], i32 3 | ||||
; CHECK-NEXT: ret <4 x i32> [[RES3]] | ; CHECK-NEXT: ret <4 x i32> [[RES3]] | ||||
; | ; | ||||
%cvt0 = fptosi double %a0 to i32 | %cvt0 = fptosi double %a0 to i32 | ||||
%cvt1 = fptosi double %a1 to i32 | %cvt1 = fptosi double %a1 to i32 | ||||
%cvt2 = fptosi double %a2 to i32 | %cvt2 = fptosi double %a2 to i32 | ||||
%cvt3 = fptosi double %a3 to i32 | %cvt3 = fptosi double %a3 to i32 | ||||
%res0 = insertelement <4 x i32> undef, i32 %cvt0, i32 0 | %res0 = insertelement <4 x i32> undef, i32 %cvt0, i32 0 | ||||
%res1 = insertelement <4 x i32> %res0, i32 %cvt1, i32 1 | %res1 = insertelement <4 x i32> %res0, i32 %cvt1, i32 1 | ||||
%res2 = insertelement <4 x i32> %res1, i32 %cvt2, i32 2 | %res2 = insertelement <4 x i32> %res1, i32 %cvt2, i32 2 | ||||
%res3 = insertelement <4 x i32> %res2, i32 %cvt3, i32 3 | %res3 = insertelement <4 x i32> %res2, i32 %cvt3, i32 3 | ||||
ret <4 x i32> %res3 | ret <4 x i32> %res3 | ||||
} | } | ||||
define <4 x i32> @fptosi_4xf32_4i32(float %a0, float %a1, float %a2, float %a3) #0 { | define <4 x i32> @fptosi_4xf32_4i32(float %a0, float %a1, float %a2, float %a3) #0 { | ||||
; CHECK-LABEL: @fptosi_4xf32_4i32( | ; CHECK-LABEL: @fptosi_4xf32_4i32( | ||||
; CHECK-NEXT: [[CVT0:%.*]] = fptosi float %a0 to i32 | ; CHECK-NEXT: [[CVT0:%.*]] = fptosi float [[A0:%.*]] to i32 | ||||
; CHECK-NEXT: [[CVT1:%.*]] = fptosi float %a1 to i32 | ; CHECK-NEXT: [[CVT1:%.*]] = fptosi float [[A1:%.*]] to i32 | ||||
; CHECK-NEXT: [[CVT2:%.*]] = fptosi float %a2 to i32 | ; CHECK-NEXT: [[CVT2:%.*]] = fptosi float [[A2:%.*]] to i32 | ||||
; CHECK-NEXT: [[CVT3:%.*]] = fptosi float %a3 to i32 | ; CHECK-NEXT: [[CVT3:%.*]] = fptosi float [[A3:%.*]] to i32 | ||||
; CHECK-NEXT: [[RES0:%.*]] = insertelement <4 x i32> undef, i32 [[CVT0]], i32 0 | ; CHECK-NEXT: [[RES0:%.*]] = insertelement <4 x i32> undef, i32 [[CVT0]], i32 0 | ||||
; CHECK-NEXT: [[RES1:%.*]] = insertelement <4 x i32> [[RES0]], i32 [[CVT1]], i32 1 | ; CHECK-NEXT: [[RES1:%.*]] = insertelement <4 x i32> [[RES0]], i32 [[CVT1]], i32 1 | ||||
; CHECK-NEXT: [[RES2:%.*]] = insertelement <4 x i32> [[RES1]], i32 [[CVT2]], i32 2 | ; CHECK-NEXT: [[RES2:%.*]] = insertelement <4 x i32> [[RES1]], i32 [[CVT2]], i32 2 | ||||
; CHECK-NEXT: [[RES3:%.*]] = insertelement <4 x i32> [[RES2]], i32 [[CVT3]], i32 3 | ; CHECK-NEXT: [[RES3:%.*]] = insertelement <4 x i32> [[RES2]], i32 [[CVT3]], i32 3 | ||||
; CHECK-NEXT: ret <4 x i32> [[RES3]] | ; CHECK-NEXT: ret <4 x i32> [[RES3]] | ||||
; | ; | ||||
%cvt0 = fptosi float %a0 to i32 | %cvt0 = fptosi float %a0 to i32 | ||||
%cvt1 = fptosi float %a1 to i32 | %cvt1 = fptosi float %a1 to i32 | ||||
Show All 10 Lines |