aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2006-07-20 23:09:47 +0000
committerEvan Cheng <evan.cheng@apple.com>2006-07-20 23:09:47 +0000
commit1e1a88e8cc6c51d0f00ecdbdbcf40bd23e124d27 (patch)
treee529313b8cb6a1fa6cbd8ecdf3c108d8a6354fe5
parent3c62934268a048a069de5d01b6b40f64ae8b2443 (diff)
downloadexternal_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.cpp2
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);