[PATCH] D144861: [SCEV][IndVars][WIP] Check outer loop invariant when cononicalize comparision

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 27 05:51:40 PST 2023


nikic requested changes to this revision.
nikic added a comment.
This revision now requires changes to proceed.

It would be easier to say with a reduced test case, but this is very likely not the right fix. SCEV nowrap flags must hold unconditionally (i.e., on any well-defined execution, nowrap flags must hold at any point where the SCEV expression is defined). In this context, we only know that the expression does not wrap at that particular use. We should not be setting the flag in this case.

Though I think we should just revert D118090 <https://reviews.llvm.org/D118090> entirely. It also has a number of regressions reported on the review, and together with this issue, I think it's best to revert.



================
Comment at: llvm/test/Transforms/IndVarSimplify/pr60944.ll:1
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
 ; RUN: opt -passes='indvars' -S %s | FileCheck %s
----------------
Please reduce the test case.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D144861/new/

https://reviews.llvm.org/D144861



More information about the llvm-commits mailing list