[PATCH] D137588: [ScalarEvolution] Skip values from unreachable bbs for phi ranges.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 7 14:17:44 PST 2022


fhahn created this revision.
fhahn added reviewers: nikic, efriedma, reames.
Herald added subscribers: javed.absar, hiraditya.
Herald added a project: All.
fhahn requested review of this revision.
Herald added a subscriber: pcwang-thead.
Herald added a project: LLVM.

Skip incoming value from unreachable blocks when computing ranges for
phis. Constructing SCEVs for values from unreachable blocks may lead to
violating assumptions based on dominance.

One example is the added LV test case. Here an assertion in GroupByComplexity
is triggered when constructing a SCEV for the incoming value from the unreachable
block because there's no dominance relation between 2 AddRecs.

It removes pr49856.ll because it is already part of
shift-recurrences.ll and needs updating.

Fixes #58811.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D137588

Files:
  llvm/lib/Analysis/ScalarEvolution.cpp
  llvm/test/Analysis/ScalarEvolution/pr49856.ll
  llvm/test/Analysis/ScalarEvolution/shift-recurrences.ll
  llvm/test/Transforms/LoopIdiom/X86/memset-size-compute.ll
  llvm/test/Transforms/LoopVectorize/scev-expansion-unreachable.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D137588.473792.patch
Type: text/x-patch
Size: 10352 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221107/40fd4095/attachment.bin>


More information about the llvm-commits mailing list