[PATCH] D132022: [SCEVExpander] Drop poison-generating flags on hoisting. PR57187

Max Kazantsev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 17 04:08:53 PDT 2022


mkazantsev created this revision.
mkazantsev added reviewers: fhahn, nikic, skatkov, lebedev.ri.
Herald added a subscriber: hiraditya.
Herald added a project: All.
mkazantsev requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Instruction being hoisted could have nuw/nsw flags inferred from the old
context, and we cannot simply move it to the new location keeping them.

Example in https://github.com/llvm/llvm-project/issues/57187 shows how
this can produce branch by poison from initially well-defined program.


https://reviews.llvm.org/D132022

Files:
  llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp
  llvm/test/Transforms/IndVarSimplify/AArch64/widen-loop-comp.ll
  llvm/test/Transforms/IndVarSimplify/X86/eliminate-congruent-ivs.ll
  llvm/test/Transforms/IndVarSimplify/X86/pr35406.ll
  llvm/test/Transforms/IndVarSimplify/pr57187.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D132022.453254.patch
Type: text/x-patch
Size: 10132 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220817/d466464c/attachment.bin>


More information about the llvm-commits mailing list