diff options
author | Nadav Rotem <nadav.rotem@intel.com> | 2012-07-15 08:38:23 +0000 |
---|---|---|
committer | Nadav Rotem <nadav.rotem@intel.com> | 2012-07-15 08:38:23 +0000 |
commit | b87bdac6a3de4ab83e23bf808f990e4bb7eade5e (patch) | |
tree | 4b6d565bbdbb5946bef17337c65c3914e1ac3f79 /include/llvm/CodeGen/SelectionDAGNodes.h | |
parent | 7d532c8d0742ebd107e5fd58ae23ecea5c55d19e (diff) |
Refactor the code that checks that all operands of a node are UNDEFs.
Add a micro-optimization to getNode of CONCAT_VECTORS when both operands are undefs.
Can't find a testcase for this because VECTOR_SHUFFLE already handles undef operands, but Duncan suggested that we add this.
Together with Michael Kuperstein <michael.m.kuperstein@intel.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160229 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/SelectionDAGNodes.h')
-rw-r--r-- | include/llvm/CodeGen/SelectionDAGNodes.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/SelectionDAGNodes.h b/include/llvm/CodeGen/SelectionDAGNodes.h index f8248b8453..41407f1565 100644 --- a/include/llvm/CodeGen/SelectionDAGNodes.h +++ b/include/llvm/CodeGen/SelectionDAGNodes.h @@ -74,6 +74,10 @@ namespace ISD { /// ISD::SCALAR_TO_VECTOR node or a BUILD_VECTOR node where only the low /// element is not an undef. bool isScalarToVector(const SDNode *N); + + /// allOperandsUndef - Return true if the node has at least one operand + /// and all operands of the specified node are ISD::UNDEF. + bool allOperandsUndef(const SDNode *N); } // end llvm:ISD namespace //===----------------------------------------------------------------------===// |