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

Michael Kuperstein via llvm-commits llvm-commits at lists.llvm.org
Sun Aug 9 08:32:57 PDT 2015


mkuper added inline comments.

================
Comment at: lib/Transforms/InstCombine/InstCombineCalls.cpp:261
@@ -253,1 +260,3 @@
+
+  return Builder.CreateAShr(Vec, ShiftVec);
 }
----------------
RKSimon wrote:
> mkuper wrote:
> > Do we have an ISel test that these AShrs get lowered correctly? If we don't, should we?
> We have the tests in test\CodeGen\X86\vector-shift-ashr-*.ll
Ok.

================
Comment at: test/CodeGen/X86/combine-avx2-intrinsics.ll:6
@@ -5,3 +5,1 @@
 
-define <8 x i32> @test_psra_1(<8 x i32> %A) {
-  %1 = tail call <8 x i32> @llvm.x86.avx2.psrai.d(<8 x i32> %A, i32 3)
----------------
RKSimon wrote:
> mkuper wrote:
> > We still want to test these combines, right? (Only as part of InstCombine, not ISel)
> I can add these shift accumulation tests as well if you wish but I will keep the simple tests in there too. The x86-vector-shifts.ll test file already has some general constant folding tests at the end that do various forms of accumulation.
I'm just against removing (working) regression tests on principle. :-)
But yes, I meant in addition, not instead of the simple test.


Repository:
  rL LLVM

http://reviews.llvm.org/D11886





More information about the llvm-commits mailing list