diff options
author | Yingwei Zheng <dtcxzyw2333@gmail.com> | 2025-02-19 09:22:15 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-02-19 09:22:15 +0800 |
commit | b2659ca44b2e26b558fce66689792709411c7d38 (patch) | |
tree | 6aa5052b974ac903fd40a9cd1b708e382b1b05a0 /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | 2207e3e32549306bf563c6987f790cabe8d4ea78 (diff) | |
download | llvm-b2659ca44b2e26b558fce66689792709411c7d38.zip llvm-b2659ca44b2e26b558fce66689792709411c7d38.tar.gz llvm-b2659ca44b2e26b558fce66689792709411c7d38.tar.bz2 |
[InstCombine] Propagate flags in `foldSelectICmpAndBinOp` (#127437)
It is always safe to add poison-generating flags for `BinOp Y,
Identity`.
Proof: https://alive2.llvm.org/ce/z/8BLEpq
and https://alive2.llvm.org/ce/z/584Bb4
Then we can propagate flags from one of the arms:
```
select Cond, Y, (BinOp flags Y, Z) ->
select Cond, (BinOp flags Y, Identity), (BinOp flags Y, Z) ->
BinOp flags Y, (select Cond, Identity, Z)
```
This patch is proposed to avoid information loss caused by
https://github.com/llvm/llvm-project/pull/127390.
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions