[PATCH] D55480: [CostModel][X86][AArch64] Adjust cost of the scalarization part of min/max reduction.
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Dec 9 09:29:43 PST 2018
RKSimon accepted this revision.
RKSimon added a comment.
This revision is now accepted and ready to land.
LGTM
================
Comment at: test/Transforms/SLPVectorizer/X86/horizontal-minmax.ll:1097
+; SSE-NEXT: [[RDX_MINMAX_SELECT:%.*]] = select <4 x i1> [[RDX_MINMAX_CMP]], <4 x i32> [[TMP6]], <4 x i32> [[RDX_SHUF]]
+; SSE-NEXT: [[RDX_SHUF1:%.*]] = shufflevector <4 x i32> [[RDX_MINMAX_SELECT]], <4 x i32> undef, <4 x i32> <i32 1, i32 undef, i32 undef, i32 undef>
+; SSE-NEXT: [[RDX_MINMAX_CMP2:%.*]] = icmp sgt <4 x i32> [[RDX_MINMAX_SELECT]], [[RDX_SHUF1]]
----------------
craig.topper wrote:
> Isn’t this shuffle and the vector cmp+sel after it the last part of a reduction for elements 0 and 1.
Yes, you're right - I mis-read the test IR. It has to a do a <4 x i32> reduction, then a min/max with the remaining 4 scalar elements (2 in the previous block + 2 in this block).
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D55480/new/
https://reviews.llvm.org/D55480
More information about the llvm-commits
mailing list