[PATCH] D110620: [SCEV] Infer ranges for SCC consisting of cycled Phis
Max Kazantsev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 13 02:02:22 PDT 2022
mkazantsev added a comment.
In D110620#3361521 <https://reviews.llvm.org/D110620#3361521>, @aeubanks wrote:
> I'm seeing a miscompile caused by assuming the entire SCC has the same range. One phi in the SCC has a corresponding `llvm.assume` limiting its range, but that assume doesn't apply to another phi in the SCC.
>
> I apologize for the fairly large repro (at least it's only one function!).
> `$ opt -passes=indvars test.ll -S`
> You'll see that the `br` condition right before the `invoke i32 @wobble.7` becomes `false`. That's because `%tmp951` has a corresponding assume that it's non-negative. However, `%tmp298`, which is in the same phi SCC, is not under that assumption, but this patch still updates its range to be non-negative.
>
> F22331869: test.ll <https://reviews.llvm.org/F22331869>
Taking a look...
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D110620/new/
https://reviews.llvm.org/D110620
More information about the llvm-commits
mailing list