[PATCH] D98981: [SLP] allow matching integer min/max intrinsics as reduction ops

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 19 12:54:00 PDT 2021


spatel created this revision.
spatel added reviewers: ABataev, nikic, vdmitrie, RKSimon.
Herald added subscribers: pengfei, hiraditya, mcrosier.
spatel requested review of this revision.
Herald added a project: LLVM.

As noted in D98152 <https://reviews.llvm.org/D98152>, we need to patch SLP to avoid regressions when we start canonicalizing to integer min/max intrinsics.
Most of the real work to make this possible was in 7202f47508 <https://reviews.llvm.org/rG7202f4750823ace4f67fdc441bf3d3e3d4eaede8> .
But I am posting this for review just in case anyone sees or knows of other problems that may result from the switch to intrinsics.

I suspect that we will need to adjust the cost models or tests because the PhaseOrdering test in D98152 <https://reviews.llvm.org/D98152> still doesn't vectorize with only x86 SSE2 (it does change if I add an attribute for SSE4.1).


https://reviews.llvm.org/D98981

Files:
  llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
  llvm/test/Transforms/SLPVectorizer/X86/horizontal-minmax.ll
  llvm/test/Transforms/SLPVectorizer/X86/horizontal-smax.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D98981.331981.patch
Type: text/x-patch
Size: 20528 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210319/3f8e986b/attachment.bin>


More information about the llvm-commits mailing list