[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
Chris Lattner
lattner at cs.uiuc.edu
Sat Apr 15 16:38:12 PDT 2006
Changes in directory llvm/lib/CodeGen/SelectionDAG:
SelectionDAG.cpp updated: 1.299 -> 1.300
---
Log message:
Make these predicates return true for bit_convert(buildvector)'s as well as
buildvectors.
---
Diffs of the changes: (+8 -0)
SelectionDAG.cpp | 8 ++++++++
1 files changed, 8 insertions(+)
Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.299 llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.300
--- llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.299 Wed Apr 12 11:20:43 2006
+++ llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Sat Apr 15 18:38:00 2006
@@ -73,6 +73,10 @@
/// isBuildVectorAllOnes - Return true if the specified node is a
/// BUILD_VECTOR where all of the elements are ~0 or undef.
bool ISD::isBuildVectorAllOnes(const SDNode *N) {
+ // Look through a bit convert.
+ if (N->getOpcode() == ISD::BIT_CONVERT)
+ N = N->getOperand(0).Val;
+
if (N->getOpcode() != ISD::BUILD_VECTOR) return false;
unsigned i = 0, e = N->getNumOperands();
@@ -117,6 +121,10 @@
/// isBuildVectorAllZeros - Return true if the specified node is a
/// BUILD_VECTOR where all of the elements are 0 or undef.
bool ISD::isBuildVectorAllZeros(const SDNode *N) {
+ // Look through a bit convert.
+ if (N->getOpcode() == ISD::BIT_CONVERT)
+ N = N->getOperand(0).Val;
+
if (N->getOpcode() != ISD::BUILD_VECTOR) return false;
unsigned i = 0, e = N->getNumOperands();
More information about the llvm-commits
mailing list