2019-08-26 21:53:29 +08:00
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc < %s -mtriple=x86_64-- -mcpu=core2 | FileCheck %s --implicit-check-not unpcklps
Fix a problem with DAGCombine on 64b targets where folding
extracts + build_vector into a shuffle would fail, because the
type of the new build_vector would not be legal. Try harder to
create a legal build_vector type. Note: this will be totally
irrelevant once vector_shuffle no longer takes a build_vector for
shuffle mask.
New:
_foo:
xorps %xmm0, %xmm0
xorps %xmm1, %xmm1
subps %xmm1, %xmm1
mulps %xmm0, %xmm1
addps %xmm0, %xmm1
movaps %xmm1, 0
Old:
_foo:
xorps %xmm0, %xmm0
movss %xmm0, %xmm1
xorps %xmm2, %xmm2
unpcklps %xmm1, %xmm2
pshufd $80, %xmm1, %xmm1
unpcklps %xmm1, %xmm2
pslldq $16, %xmm2
pshufd $57, %xmm2, %xmm1
subps %xmm0, %xmm1
mulps %xmm0, %xmm1
addps %xmm0, %xmm1
movaps %xmm1, 0
llvm-svn: 65791
2009-03-02 07:44:07 +08:00
define i32 @foo ( ) nounwind {
2019-08-26 21:53:29 +08:00
; CHECK-LABEL: foo:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: xorps %xmm0, %xmm0
; CHECK-NEXT: movaps %xmm0, 0
Fix a problem with DAGCombine on 64b targets where folding
extracts + build_vector into a shuffle would fail, because the
type of the new build_vector would not be legal. Try harder to
create a legal build_vector type. Note: this will be totally
irrelevant once vector_shuffle no longer takes a build_vector for
shuffle mask.
New:
_foo:
xorps %xmm0, %xmm0
xorps %xmm1, %xmm1
subps %xmm1, %xmm1
mulps %xmm0, %xmm1
addps %xmm0, %xmm1
movaps %xmm1, 0
Old:
_foo:
xorps %xmm0, %xmm0
movss %xmm0, %xmm1
xorps %xmm2, %xmm2
unpcklps %xmm1, %xmm2
pshufd $80, %xmm1, %xmm1
unpcklps %xmm1, %xmm2
pslldq $16, %xmm2
pshufd $57, %xmm2, %xmm1
subps %xmm0, %xmm1
mulps %xmm0, %xmm1
addps %xmm0, %xmm1
movaps %xmm1, 0
llvm-svn: 65791
2009-03-02 07:44:07 +08:00
entry:
%tmp74.i25762 = shufflevector < 16 x float > zeroinitializer , < 16 x float > zeroinitializer , < 16 x i32 > < i32 0 , i32 1 , i32 2 , i32 3 , i32 4 , i32 5 , i32 6 , i32 7 , i32 8 , i32 9 , i32 10 , i32 11 , i32 16 , i32 17 , i32 18 , i32 19 > ; <<16 x float>> [#uses=1]
%tmp518 = shufflevector < 16 x float > %tmp74.i25762 , < 16 x float > undef , < 4 x i32 > < i32 12 , i32 13 , i32 14 , i32 15 > ; <<4 x float>> [#uses=1]
%movss.i25611 = shufflevector < 4 x float > zeroinitializer , < 4 x float > %tmp518 , < 4 x i32 > < i32 4 , i32 1 , i32 2 , i32 3 > ; <<4 x float>> [#uses=1]
%conv3.i25615 = shufflevector < 4 x float > %movss.i25611 , < 4 x float > undef , < 4 x i32 > < i32 1 , i32 2 , i32 3 , i32 0 > ; <<4 x float>> [#uses=1]
2009-06-05 06:49:04 +08:00
%sub.i25620 = fsub < 4 x float > %conv3.i25615 , zeroinitializer ; <<4 x float>> [#uses=1]
%mul.i25621 = fmul < 4 x float > zeroinitializer , %sub.i25620 ; <<4 x float>> [#uses=1]
%add.i25622 = fadd < 4 x float > zeroinitializer , %mul.i25621 ; <<4 x float>> [#uses=1]
Fix a problem with DAGCombine on 64b targets where folding
extracts + build_vector into a shuffle would fail, because the
type of the new build_vector would not be legal. Try harder to
create a legal build_vector type. Note: this will be totally
irrelevant once vector_shuffle no longer takes a build_vector for
shuffle mask.
New:
_foo:
xorps %xmm0, %xmm0
xorps %xmm1, %xmm1
subps %xmm1, %xmm1
mulps %xmm0, %xmm1
addps %xmm0, %xmm1
movaps %xmm1, 0
Old:
_foo:
xorps %xmm0, %xmm0
movss %xmm0, %xmm1
xorps %xmm2, %xmm2
unpcklps %xmm1, %xmm2
pshufd $80, %xmm1, %xmm1
unpcklps %xmm1, %xmm2
pslldq $16, %xmm2
pshufd $57, %xmm2, %xmm1
subps %xmm0, %xmm1
mulps %xmm0, %xmm1
addps %xmm0, %xmm1
movaps %xmm1, 0
llvm-svn: 65791
2009-03-02 07:44:07 +08:00
store < 4 x float > %add.i25622 , < 4 x float > * null
unreachable
}