[llvm-commits] CVS: llvm/lib/Target/X86/X86ISelLowering.cpp

Evan Cheng evan.cheng at apple.com
Thu Jul 20 16:10:00 PDT 2006



Changes in directory llvm/lib/Target/X86:

X86ISelLowering.cpp updated: 1.237 -> 1.238
---
Log message:

A splat of a vector constant of all zero or all one is the vector constant.


---
Diffs of the changes:  (+2 -0)

 X86ISelLowering.cpp |    2 ++
 1 files changed, 2 insertions(+)


Index: llvm/lib/Target/X86/X86ISelLowering.cpp
diff -u llvm/lib/Target/X86/X86ISelLowering.cpp:1.237 llvm/lib/Target/X86/X86ISelLowering.cpp:1.238
--- llvm/lib/Target/X86/X86ISelLowering.cpp:1.237	Wed Jul 12 11:59:49 2006
+++ llvm/lib/Target/X86/X86ISelLowering.cpp	Thu Jul 20 18:09:47 2006
@@ -2393,6 +2393,8 @@
   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);






More information about the llvm-commits mailing list