[PATCH] D11886: [InstCombine] Move SSE2/AVX2 arithmetic vector shift folding to instcombiner

David Majnemer via llvm-commits llvm-commits at lists.llvm.org
Sun Aug 9 08:39:17 PDT 2015


majnemer added a subscriber: majnemer.

================
Comment at: lib/Transforms/InstCombine/InstCombineCalls.cpp:202
@@ -201,3 +201,3 @@
                                   InstCombiner::BuilderTy &Builder,
-                                  bool ShiftLeft) {
+                                  bool LogicalShift, bool ShiftLeft) {
   // Simplify if count is constant.
----------------
Would it make sense to assert `(LogicalShift || !ShiftLeft)` seeing as how there is no arithmetic left shift.  Alternatively, you could make that state impossible by construction by using an enum for the three states.


Repository:
  rL LLVM

http://reviews.llvm.org/D11886





More information about the llvm-commits mailing list