[PATCH] D30379: [SelectionDAG] Make SelectionDAG aware of the known bits in UADDO and SADDO.
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 10 06:10:54 PST 2017
RKSimon accepted this revision.
RKSimon added a comment.
This revision is now accepted and ready to land.
LGTM with a couple of minors
================
Comment at: lib/CodeGen/SelectionDAG/SelectionDAG.cpp:2579
- // With ADDE, a carry bit may be added in, so we can only use this
- // information if we know (at least) that the low two bits are clear. We
- // then return to the caller that the low bit is unknown but that other bits
- // are known zero.
- if (KnownZeroLow >= 2) // ADDE
- KnownZero |= APInt::getBitsSet(BitWidth, 1, KnownZeroLow);
+ KnownZero.setBits(0, KnownZeroLow);
+ if (KnownZeroHigh > 1)
----------------
KnownZero.setLowBits ?
================
Comment at: lib/CodeGen/SelectionDAG/SelectionDAG.cpp:2581
+ if (KnownZeroHigh > 1)
+ KnownZero.setBits(BitWidth - KnownZeroHigh + 1, BitWidth);
break;
----------------
KnownZero.setHighBits ?
https://reviews.llvm.org/D30379
More information about the llvm-commits
mailing list