[PATCH] D101836: [LoopVectorize] Enable strict reductions when allowReordering() returns false
Sander de Smalen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 19 01:35:36 PDT 2021
sdesmalen added inline comments.
================
Comment at: llvm/test/Transforms/LoopVectorize/AArch64/scalable-strict-fadd.ll:74
+; CHECK-VF8: %[[STEPVEC1:.*]] = call <vscale x 8 x i64> @llvm.experimental.stepvector.nxv8i64()
+; CHECK-VF8: %[[STEPVEC_ADD1:.*]] = add <vscale x 8 x i64> %[[STEPVEC1]], shufflevector (<vscale x 8 x i64> insertelement (<vscale x 8 x i64> poison, i64 0, i32 0), <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer)
+; CHECK-VF8: %[[STEPVEC_MUL:.*]] = mul <vscale x 8 x i64> %[[STEPVEC_ADD1]], shufflevector (<vscale x 8 x i64> insertelement (<vscale x 8 x i64> poison, i64 2, i32 0), <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer)
----------------
kmclaughlin wrote:
> sdesmalen wrote:
> > Why does this test need to be vectorized with VF=vscale x 8 instead of VF=vscale x 4? Is that because it needs to be driven using the cmdline flags to circumvent the "hint allows reordering" behaviour? (and so that the 1 RUN line covers all tests?) If that's the case, can you do a NFC patch where you first change the test to use the new VF, and then rebase this patch on top?
> Hi @sdesmalen, it is the case that I changed the VF so that the test could be covered by one RUN line, and to try and circumvent the hints allow reordering behaviour. I will move changes to the RUN lines into a new patch so that this patch only adds new tests.
I think it's worth adding a flag to the vectorizer to disable this weird behaviour for testing purposes, so that we don't need to change this test, and so that you don't need the multiple RUN lines in the other test in favour of using metadata to control the VF per individual test.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D101836/new/
https://reviews.llvm.org/D101836
More information about the llvm-commits
mailing list