diff options
author | Chris Lattner <sabre@nondot.org> | 2005-01-11 04:25:13 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2005-01-11 04:25:13 +0000 |
commit | a86fa4455b22e4633118a6e4b5b0aa4c3dc9f24c (patch) | |
tree | 476aec41807cb4a698074e5823d720dc73476132 /llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp | |
parent | 37ed28558f79e63251be4e59e4bfd55c39a4a3e4 (diff) | |
download | bcm5719-llvm-a86fa4455b22e4633118a6e4b5b0aa4c3dc9f24c.tar.gz bcm5719-llvm-a86fa4455b22e4633118a6e4b5b0aa4c3dc9f24c.zip |
shift X, 0 -> X
llvm-svn: 19453
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index d173a95fcd4..ef0b0769a06 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -612,6 +612,12 @@ SDOperand SelectionDAG::getNode(unsigned Opcode, MVT::ValueType VT, } break; + case ISD::SHL: + case ISD::SRL: + case ISD::SRA: + if (C2 == 0) return N1; + break; + case ISD::AND: if (!C2) return N2; // X and 0 -> 0 if (N2C->isAllOnesValue()) |