[PATCH] D66106: [LV] fold-tail predication should be respected even with assume_safety
Dorit Nuzman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 12 13:04:14 PDT 2019
dorit created this revision.
dorit added reviewers: Ayal, hsaito, fhahn.
dorit added a project: LLVM.
Herald added a subscriber: rkruppe.
assume_safety implies that loads under "if's" can be safely executed speculatively (unguarded, unmasked). However this assumption holds only for the original user "if's", not those introduced by the compiler, such as the fold-tail "if" that guards us from loading beyond the original loop trip-count. Currently the combination of fold-tail and assume-safety pragmas results in ignoring the fold-tail predicate that guards the loads, generating unmasked loads. This patch fixes this behavior.
https://reviews.llvm.org/D66106
Files:
include/llvm/Transforms/Vectorize/LoopVectorizationLegality.h
lib/Transforms/Vectorize/LoopVectorizationLegality.cpp
lib/Transforms/Vectorize/LoopVectorize.cpp
test/Transforms/LoopVectorize/X86/tail_folding_and_assume_safety.ll
test/Transforms/LoopVectorize/X86/vect.omp.force.small-tc.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D66106.214689.patch
Type: text/x-patch
Size: 13536 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190812/d9c7f31c/attachment.bin>
More information about the llvm-commits
mailing list