[PATCH] D111066: Disable "[SCEV] Prove implications of different type via truncation"

Bjorn Pettersson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 4 08:59:23 PDT 2021


bjope created this revision.
bjope added reviewers: uabelho, mkazantsev.
Herald added subscribers: javed.absar, hiraditya.
bjope requested review of this revision.
Herald added a project: LLVM.

This disables the feature added in commit 5ef84688fba28b9f0f <https://reviews.llvm.org/rG5ef84688fba28b9f0f69ddc9a5beb75b10696798> that
proved implications of different type via truncations. This due to
problems seen (and reported in PR51869) about infinite loops that
started to happen after that commit.

It was not trivial to just revert the offending commit, so I added
an option to make it possible to enable/disable the feature from the
command line instead. With the default currently being that the
feature is disabled.

Some things worth mentioning:

- test/Analysis/ScalarEvolution/srem.ll was impacted by the original patch, but nowadays we get the same result regardless of scalar-evolution-prove-implications-via-truncation.
- test/Transforms/IndVarSimplify/widen-loop-comp.ll did not exist(?) when the feature was introduced. The test case was already a bit special as it uses scalar-evolution-use-expensive-range-sharpening. Now it also use scalar-evolution-prove-implications-via-truncation, so it is not testing the default setting.
- The ProveImplicationViaNarrowing unittest test case for SCEV that was added in commit 5ef84688fba28b9f0f <https://reviews.llvm.org/rG5ef84688fba28b9f0f69ddc9a5beb75b10696798> still passes even when disabling the feature. So this patch simply leaves that test case as is.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D111066

Files:
  llvm/lib/Analysis/ScalarEvolution.cpp
  llvm/test/Analysis/ScalarEvolution/pr51869-scalar-evolution-prove-implications-via-truncation.ll
  llvm/test/Transforms/IndVarSimplify/widen-loop-comp.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D111066.376915.patch
Type: text/x-patch
Size: 288338 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211004/b40ebe53/attachment-0001.bin>


More information about the llvm-commits mailing list