[PATCH] D21493: [ValueTracking] Teach computeKnownBits for PHI nodes to compute sign bit for a recurrence with a NSW addition.

Sanjoy Das via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 20 11:50:22 PDT 2016


sanjoy requested changes to this revision.
This revision now requires changes to proceed.

================
Comment at: lib/Analysis/ValueTracking.cpp:1251
@@ +1250,3 @@
+              KnownZero.setBit(BitWidth-1);
+            if (KnownOne2.isNegative() && KnownOne3.isNegative())
+              KnownOne.setBit(BitWidth-1);
----------------
Can you please add a test for this second bit (i.e. negative stays negative)?


http://reviews.llvm.org/D21493





More information about the llvm-commits mailing list