[PATCH] D55232: [SCEV] Suppress hoisting insertion point of binops when unsafe
Warren Ristow via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 3 12:49:58 PST 2018
wristow created this revision.
wristow added reviewers: sanjoy, skatkov, mkazantsev, sebpop.
Herald added a subscriber: hiraditya.
InsertBinop tries to move insertion-points out of loops for expressions that are loop-invariant. This patch adds a new parameter, IsSafeToHost (default true), to guard that hoisting. This allows callers to suppress that hoisting for unsafe situations, such as divisions that may have a zero denominator.
This fixes PR38697.
https://reviews.llvm.org/D55232
Files:
llvm/include/llvm/Analysis/ScalarEvolutionExpander.h
llvm/lib/Analysis/ScalarEvolutionExpander.cpp
llvm/test/Transforms/LoopVectorize/pr38697.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D55232.176457.patch
Type: text/x-patch
Size: 6374 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181203/9b0af59a/attachment.bin>
More information about the llvm-commits
mailing list