[PATCH] D11886: [InstCombine] Move SSE2/AVX2 arithmetic vector shift folding to instcombiner
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Sun Aug 9 08:30:34 PDT 2015
RKSimon added inline comments.
================
Comment at: lib/Transforms/InstCombine/InstCombineCalls.cpp:261
@@ -253,1 +260,3 @@
+
+ return Builder.CreateAShr(Vec, ShiftVec);
}
----------------
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
================
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)
----------------
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.
Repository:
rL LLVM
http://reviews.llvm.org/D11886
More information about the llvm-commits
mailing list