Changeset View
Changeset View
Standalone View
Standalone View
llvm/test/Transforms/SLPVectorizer/X86/cmp_commute.ll
Show First 20 Lines • Show All 230 Lines • ▼ Show 20 Lines | ; | ||||
%d2 = insertelement <4 x i1> %d1, i1 %c2, i32 2 | %d2 = insertelement <4 x i1> %d1, i1 %c2, i32 2 | ||||
%d3 = insertelement <4 x i1> %d2, i1 %c3, i32 3 | %d3 = insertelement <4 x i1> %d2, i1 %c3, i32 3 | ||||
%r = sext <4 x i1> %d3 to <4 x i32> | %r = sext <4 x i1> %d3 to <4 x i32> | ||||
ret <4 x i32> %r | ret <4 x i32> %r | ||||
} | } | ||||
define <4 x i32> @fcmp_ord_uno_v4i32(<4 x float> %a, float* %b) { | define <4 x i32> @fcmp_ord_uno_v4i32(<4 x float> %a, float* %b) { | ||||
; CHECK-LABEL: @fcmp_ord_uno_v4i32( | ; CHECK-LABEL: @fcmp_ord_uno_v4i32( | ||||
; CHECK-NEXT: [[A0:%.*]] = extractelement <4 x float> [[A:%.*]], i32 0 | |||||
; CHECK-NEXT: [[A3:%.*]] = extractelement <4 x float> [[A]], i32 3 | |||||
; CHECK-NEXT: [[P1:%.*]] = getelementptr inbounds float, float* [[B:%.*]], i64 1 | ; CHECK-NEXT: [[P1:%.*]] = getelementptr inbounds float, float* [[B:%.*]], i64 1 | ||||
; CHECK-NEXT: [[P3:%.*]] = getelementptr inbounds float, float* [[B]], i64 3 | ; CHECK-NEXT: [[P3:%.*]] = getelementptr inbounds float, float* [[B]], i64 3 | ||||
; CHECK-NEXT: [[B0:%.*]] = load float, float* [[B]], align 4 | ; CHECK-NEXT: [[B0:%.*]] = load float, float* [[B]], align 4 | ||||
; CHECK-NEXT: [[TMP1:%.*]] = bitcast float* [[P1]] to <2 x float>* | ; CHECK-NEXT: [[TMP1:%.*]] = bitcast float* [[P1]] to <2 x float>* | ||||
; CHECK-NEXT: [[TMP2:%.*]] = load <2 x float>, <2 x float>* [[TMP1]], align 4 | ; CHECK-NEXT: [[TMP2:%.*]] = load <2 x float>, <2 x float>* [[TMP1]], align 4 | ||||
; CHECK-NEXT: [[B3:%.*]] = load float, float* [[P3]], align 4 | ; CHECK-NEXT: [[B3:%.*]] = load float, float* [[P3]], align 4 | ||||
; CHECK-NEXT: [[C0:%.*]] = fcmp ord float [[A0]], [[B0]] | ; CHECK-NEXT: [[TMP3:%.*]] = shufflevector <4 x float> [[A:%.*]], <4 x float> undef, <2 x i32> <i32 1, i32 2> | ||||
; CHECK-NEXT: [[TMP3:%.*]] = shufflevector <4 x float> [[A]], <4 x float> undef, <2 x i32> <i32 1, i32 2> | |||||
; CHECK-NEXT: [[TMP4:%.*]] = fcmp uno <2 x float> [[TMP2]], [[TMP3]] | ; CHECK-NEXT: [[TMP4:%.*]] = fcmp uno <2 x float> [[TMP2]], [[TMP3]] | ||||
; CHECK-NEXT: [[C3:%.*]] = fcmp ord float [[A3]], [[B3]] | ; CHECK-NEXT: [[TMP5:%.*]] = shufflevector <4 x float> [[A]], <4 x float> undef, <2 x i32> <i32 3, i32 0> | ||||
; CHECK-NEXT: [[D0:%.*]] = insertelement <4 x i1> undef, i1 [[C0]], i32 0 | ; CHECK-NEXT: [[TMP6:%.*]] = insertelement <2 x float> poison, float [[B3]], i32 0 | ||||
; CHECK-NEXT: [[TMP5:%.*]] = shufflevector <2 x i1> [[TMP4]], <2 x i1> poison, <4 x i32> <i32 0, i32 1, i32 undef, i32 undef> | ; CHECK-NEXT: [[TMP7:%.*]] = insertelement <2 x float> [[TMP6]], float [[B0]], i32 1 | ||||
; CHECK-NEXT: [[D21:%.*]] = shufflevector <4 x i1> [[D0]], <4 x i1> [[TMP5]], <4 x i32> <i32 0, i32 4, i32 5, i32 undef> | ; CHECK-NEXT: [[TMP8:%.*]] = fcmp ord <2 x float> [[TMP5]], [[TMP7]] | ||||
; CHECK-NEXT: [[D3:%.*]] = insertelement <4 x i1> [[D21]], i1 [[C3]], i32 3 | ; CHECK-NEXT: [[TMP9:%.*]] = shufflevector <2 x i1> [[TMP8]], <2 x i1> poison, <4 x i32> <i32 0, i32 undef, i32 undef, i32 undef> | ||||
; CHECK-NEXT: [[D0:%.*]] = shufflevector <2 x i1> [[TMP8]], <2 x i1> undef, <4 x i32> <i32 1, i32 undef, i32 undef, i32 undef> | |||||
; CHECK-NEXT: [[TMP10:%.*]] = shufflevector <2 x i1> [[TMP4]], <2 x i1> poison, <4 x i32> <i32 0, i32 1, i32 undef, i32 undef> | |||||
; CHECK-NEXT: [[D21:%.*]] = shufflevector <4 x i1> [[D0]], <4 x i1> [[TMP10]], <4 x i32> <i32 0, i32 4, i32 5, i32 undef> | |||||
; CHECK-NEXT: [[D3:%.*]] = shufflevector <4 x i1> [[D21]], <4 x i1> [[TMP9]], <4 x i32> <i32 0, i32 1, i32 2, i32 4> | |||||
; CHECK-NEXT: [[R:%.*]] = sext <4 x i1> [[D3]] to <4 x i32> | ; CHECK-NEXT: [[R:%.*]] = sext <4 x i1> [[D3]] to <4 x i32> | ||||
; CHECK-NEXT: ret <4 x i32> [[R]] | ; CHECK-NEXT: ret <4 x i32> [[R]] | ||||
; | ; | ||||
%a0 = extractelement <4 x float> %a, i32 0 | %a0 = extractelement <4 x float> %a, i32 0 | ||||
%a1 = extractelement <4 x float> %a, i32 1 | %a1 = extractelement <4 x float> %a, i32 1 | ||||
%a2 = extractelement <4 x float> %a, i32 2 | %a2 = extractelement <4 x float> %a, i32 2 | ||||
%a3 = extractelement <4 x float> %a, i32 3 | %a3 = extractelement <4 x float> %a, i32 3 | ||||
%p0 = getelementptr inbounds float, float* %b, i32 0 | %p0 = getelementptr inbounds float, float* %b, i32 0 | ||||
Show All 18 Lines |