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

Davide Italiano via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 26 11:04:34 PDT 2016


davide added inline comments.


================
Comment at: lib/Transforms/InstCombine/InstCombineShifts.cpp:53-54
+    if (AZero && CZero) {
+      auto Inner = Builder->CreateBinOp(I.getOpcode(), Op0, C);
+      return BinaryOperator::Create(I.getOpcode(), Inner, A);
+    }
----------------
Can probably fold `Inner` (and so avoid the braces for the if)


Repository:
  rL LLVM

https://reviews.llvm.org/D26000





More information about the llvm-commits mailing list