don't bother making x&-1 only to simplify it in dag combine. This commonly occurs expanding i64 ops.
llvm-svn: 46383
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index efbaa5a..ad6cd1b 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -1877,6 +1877,8 @@
// 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: