diff options
| author | Chris Lattner <sabre@nondot.org> | 2008-01-26 01:05:42 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2008-01-26 01:05:42 +0000 |
| commit | 720d8999c7f3ca9b26c83a95fb3bd8598e29c0d4 (patch) | |
| tree | 04a09a3017fca6656cef00f25ee7f0a0dd3e2a37 /llvm/lib/CodeGen | |
| parent | 2df73ea849d375e7afa74031418a2a55cae43504 (diff) | |
| download | bcm5719-llvm-720d8999c7f3ca9b26c83a95fb3bd8598e29c0d4.tar.gz bcm5719-llvm-720d8999c7f3ca9b26c83a95fb3bd8598e29c0d4.zip | |
don't bother making x&-1 only to simplify it in dag combine. This commonly occurs expanding i64 ops.
llvm-svn: 46383
Diffstat (limited to 'llvm/lib/CodeGen')
| -rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index efbaa5a7f6d..ad6cd1ba3db 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -1877,6 +1877,8 @@ SDOperand SelectionDAG::getNode(unsigned Opcode, MVT::ValueType VT, // worth handling here. if (N2C && N2C->getValue() == 0) return N2; + if (N2C && N2C->isAllOnesValue()) // X & -1 -> X + return N1; break; case ISD::OR: case ISD::XOR: |

