[PATCH] D26000: [InstCombine] Folding of shifts by the sum of positive values

David Majnemer via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 26 11:06:56 PDT 2016


majnemer added inline comments.


================
Comment at: lib/Transforms/InstCombine/InstCombineShifts.cpp:48-52
+    bool AOne, AZero, COne, CZero;
+    ComputeSignBit(A, AZero, AOne);
+    ComputeSignBit(C, CZero, COne);
+
+    if (AZero && CZero) {
----------------
I think this could be simplified a little by using `isKnownNonNegative`.


Repository:
  rL LLVM

https://reviews.llvm.org/D26000





More information about the llvm-commits mailing list