diff options
author | Hans Wennborg <hans@chromium.org> | 2021-01-19 11:37:50 +0100 |
---|---|---|
committer | Hans Wennborg <hans@chromium.org> | 2021-01-19 11:50:56 +0100 |
commit | 58bdfcfac048563e0dbcecc7c75e4e7897c8da18 (patch) | |
tree | 95a81ecaba96ce495636ba8022f651b0ae25185a /flang/lib/Frontend/CompilerInvocation.cpp | |
parent | 49dce85584e34ee7fb973da9ba617169fd0f103c (diff) | |
download | llvm-58bdfcfac048563e0dbcecc7c75e4e7897c8da18.zip llvm-58bdfcfac048563e0dbcecc7c75e4e7897c8da18.tar.gz llvm-58bdfcfac048563e0dbcecc7c75e4e7897c8da18.tar.bz2 |
Revert 5238e7b302 "[InstCombine] Replace one-use select operand based on condition"
This caused a miscompile in Chromium, see comments on the codereview for
discussion and pointer to a reproducer.
> InstCombine already performs a fold where X == Y ? f(X) : Z is
> transformed to X == Y ? f(Y) : Z if f(Y) simplifies. However,
> if f(X) only has one use, then we can always directly replace the
> use inside the instruction. To actually be profitable, limit it to
> the case where Y is a non-expr constant.
>
> This could be further extended to replace uses further up a one-use
> instruction chain, but for now this only looks one level up.
>
> Among other things, this also subsumes D94860.
>
> Differential Revision: https://reviews.llvm.org/D94862
This also reverts the follow-up
a003f26539cf4db744655e76c41f4c4a8913f116:
> [llvm] Prevent infinite loop in InstCombine of select statements
>
> This fixes an issue where the RHS and LHS the comparison operation
> creating the predicate were swapped back and forth forever.
>
> Differential Revision: https://reviews.llvm.org/D94934
Diffstat (limited to 'flang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions