[PATCH] D19675: [InstCombine][AVX2] Add support for simplifying AVX2 per-element shifts to native shifts
    David Majnemer via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Mon May 16 12:53:10 PDT 2016
    
    
  
majnemer added a subscriber: majnemer.
================
Comment at: lib/Transforms/InstCombine/InstCombineCalls.cpp:339-354
@@ +338,18 @@
+    return nullptr;
+  case Intrinsic::x86_avx2_psrav_d:
+  case Intrinsic::x86_avx2_psrav_d_256:
+    LogicalShift = false;
+    ShiftLeft = false;
+    break;
+  case Intrinsic::x86_avx2_psrlv_d:
+  case Intrinsic::x86_avx2_psrlv_d_256:
+  case Intrinsic::x86_avx2_psrlv_q:
+  case Intrinsic::x86_avx2_psrlv_q_256:
+    LogicalShift = true;
+    ShiftLeft = false;
+    break;
+  case Intrinsic::x86_avx2_psllv_d:
+  case Intrinsic::x86_avx2_psllv_d_256:
+  case Intrinsic::x86_avx2_psllv_q:
+  case Intrinsic::x86_avx2_psllv_q_256:
+    LogicalShift = true;
----------------
Er, why do we even have these intrinsics?
They seem sorta pointless, it seems way better to get rid of these and replace their use in clang's headers with a generic shift which sanitizes the shift amount.
Repository:
  rL LLVM
http://reviews.llvm.org/D19675
    
    
More information about the llvm-commits
mailing list