[PATCH] D95452: [LoopVectorize] use IR fast-math-flags exclusively (not function attributes)
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 26 09:13:10 PST 2021
spatel created this revision.
spatel added reviewers: fhahn, dmgreen, SjoerdMeijer.
Herald added subscribers: rogfer01, hiraditya, mcrosier.
spatel requested review of this revision.
Herald added a subscriber: vkmr.
Herald added a project: LLVM.
I am trying to untangle the fast-math-flags propagation logic in the vectorizers (see a6f022127 <https://reviews.llvm.org/rGa6f02212764a76935ec5fb704fe86a1a76f65745> for SLP).
The loop vectorizer has a mix of checking FP function attributes, IR-level FMF, and just wrong assumptions.
I am trying to avoid regressions while fixing this, and I think the IR-level logic is good enough for that, but it's hard to say for sure. This would be the 1st step in the clean-up.
The existing test that I changed to include 'fast' actually shows a miscompile: the function only had the equivalent of `nnan`, but we created new instructions that had `fast` (all FMF set). This is similar to the example in https://llvm.org/PR35538
https://reviews.llvm.org/D95452
Files:
llvm/include/llvm/Transforms/Vectorize/LoopVectorizationLegality.h
llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
llvm/lib/Transforms/Vectorize/VPlan.h
llvm/test/Transforms/LoopVectorize/X86/float-induction-x86.ll
llvm/unittests/Transforms/Vectorize/VPlanTest.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D95452.319319.patch
Type: text/x-patch
Size: 7144 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210126/5c14736d/attachment.bin>
More information about the llvm-commits
mailing list