commit | a8d9cc870593d3e915ac9184dc0daf1783d4f8a4 | [log] [tgz] |
---|---|---|
author | Chris Lattner <sabre@nondot.org> | Tue Jan 11 04:25:13 2005 +0000 |
committer | Chris Lattner <sabre@nondot.org> | Tue Jan 11 04:25:13 2005 +0000 |
tree | 1c56cb31ad8a9dad35b5af82d12cef9c6ca3a185 | |
parent | 6c07aee7c993ff83a744d1fa3c6e0539250e5ef7 [diff] [blame] |
shift X, 0 -> X git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19453 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index d173a95..ef0b076 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -612,6 +612,12 @@ } 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())