[PATCH] D18777: [ValueTracking] An improvement to IR ValueTracking on Non-negative Integers
Li Huang via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 8 12:22:58 PDT 2016
lihuang added inline comments.
================
Comment at: lib/Analysis/ValueTracking.cpp:796
@@ +795,3 @@
+ cast<OverflowingBinaryOperator>(I)->hasNoSignedWrap()) {
+ if (KnownZero2.isNegative())
+ KnownZero |= APInt::getSignBit(BitWidth);
----------------
sanjoy wrote:
> Why can't this be folded into the `KZF` and `KOF` for the `Instruction::Shl` case?
Thank you for suggesting this, will fold this logic to KZF and KOF
================
Comment at: lib/Analysis/ValueTracking.cpp:1288
@@ +1287,3 @@
+ }
+
+ // (sub nsw non-negative, negative) --> non-negative
----------------
sanjoy wrote:
> What does this bit have to do with the changes to how we handle shifts? If they're not related, they should definitely be reviewed/tested/committed separately.
Will separate out the shift part
https://reviews.llvm.org/D18777
More information about the llvm-commits
mailing list