[PATCH] D18777: [ValueTracking] An improvement to IR ValueTracking on Non-negative Integers

Mitch Bodart via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 21 13:51:55 PDT 2016


mbodart added inline comments.

================
Comment at: lib/Analysis/ValueTracking.cpp:1292
@@ +1291,3 @@
+            // (sub nsw negative, non-negative) --> negative
+            if (Opcode == Instruction::Sub && LL == I) {
+              if (KnownZero2.isNegative() && KnownOne3.isNegative())
----------------
This "if", and the one below for Mul, should be "else if".

Otherwise LGTM!


http://reviews.llvm.org/D18777





More information about the llvm-commits mailing list