diff options
author | Chris Lattner <sabre@nondot.org> | 2008-03-09 00:29:42 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-03-09 00:29:42 +0000 |
commit | f9d95c8835bc4f9072c33e1f9ebaa581a4d3268d (patch) | |
tree | 75c9d8c580279a177adf03a0f0e16a5cff6e9730 /lib/Transforms/Utils/CloneLoop.cpp | |
parent | f3ba434781daa1c2b16f77a91e5209c21ce12428 (diff) |
Fix two problems in SelectionDAGLegalize::ExpandBUILD_VECTOR's handling
of BUILD_VECTORS that only have two unique elements:
1. The previous code was nondeterminstic, because it walked a map in
SDOperand order, which isn't determinstic.
2. The previous code didn't handle the case when one element was undef
very well. Now we ensure that the generated shuffle mask has the
undef vector on the RHS (instead of potentially being on the LHS)
and that any elements that refer to it are themselves undef. This
allows us to compile CodeGen/X86/vec_set-9.ll into:
_test3:
movd %rdi, %xmm0
punpcklqdq %xmm0, %xmm0
ret
instead of:
_test3:
movd %rdi, %xmm1
#IMPLICIT_DEF %xmm0
punpcklqdq %xmm1, %xmm0
ret
... saving a register.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48060 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Utils/CloneLoop.cpp')
0 files changed, 0 insertions, 0 deletions