[PATCH] D23296: [ValueTracking] Improve ValueTracking on left shift with nsw flag

Li Huang via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 22 14:03:10 PDT 2016


lihuang added inline comments.

================
Comment at: lib/Analysis/ValueTracking.cpp:803
@@ -798,1 +802,3 @@
+      KnownOne &= ~KnownZero;
+    
     return;
----------------
You are right that's too pessimistic. I changed it to KnownOne &= ~KnownZero. 

I just copied the logic at the end of this function, looks like we could also change that. 


https://reviews.llvm.org/D23296





More information about the llvm-commits mailing list