diff options
author | Evan Cheng <evan.cheng@apple.com> | 2006-07-20 23:09:47 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2006-07-20 23:09:47 +0000 |
commit | 1e1a88e8cc6c51d0f00ecdbdbcf40bd23e124d27 (patch) | |
tree | e529313b8cb6a1fa6cbd8ecdf3c108d8a6354fe5 | |
parent | 3c62934268a048a069de5d01b6b40f64ae8b2443 (diff) | |
download | external_llvm-1e1a88e8cc6c51d0f00ecdbdbcf40bd23e124d27.zip external_llvm-1e1a88e8cc6c51d0f00ecdbdbcf40bd23e124d27.tar.gz external_llvm-1e1a88e8cc6c51d0f00ecdbdbcf40bd23e124d27.tar.bz2 |
A splat of a vector constant of all zero or all one is the vector constant.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29234 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Target/X86/X86ISelLowering.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Target/X86/X86ISelLowering.cpp b/lib/Target/X86/X86ISelLowering.cpp index 4ebe4ca..2ae607c 100644 --- a/lib/Target/X86/X86ISelLowering.cpp +++ b/lib/Target/X86/X86ISelLowering.cpp @@ -2393,6 +2393,8 @@ X86TargetLowering::LowerVECTOR_SHUFFLE(SDOperand Op, SelectionDAG &DAG) { bool V2IsUndef = V2.getOpcode() == ISD::UNDEF; if (isSplatMask(PermMask.Val)) { + if (ISD::isBuildVectorAllZeros(V1.Val) || ISD::isBuildVectorAllOnes(V1.Val)) + return V1; if (NumElems <= 4) return Op; // Promote it to a v4i32 splat. return PromoteSplat(Op, DAG); |