summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index 5dbe29f5fbd..cd6d33ffa9e 100644
--- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -3104,7 +3104,7 @@ SDValue DAGCombiner::visitSUB(SDNode *N) {
DAG.getNode(ISD::SUB, DL, VT, N1.getOperand(1),
N1.getOperand(0)));
- // A - (A & (B - 1)) -> A & (0 - B)
+ // A - (A & (B - 1)) -> A & (~(B - 1)) -> A & (0 - B)
if (N1.getOpcode() == ISD::AND && N1.hasOneUse()) {
SDValue A = N1.getOperand(0);
SDValue BDec = N1.getOperand(1);
OpenPOWER on IntegriCloud