diff options
author | Yingwei Zheng <dtcxzyw2333@gmail.com> | 2024-11-01 22:18:44 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-01 22:18:44 +0800 |
commit | e577f14b670ee2ae6bb717133310b215be4331b3 (patch) | |
tree | 41f1f99263231835ee6f1adbe4748883e061513e /llvm/lib/IR/ConstantFold.cpp | |
parent | c752efbdcc1ebd81f879633d6b798248064e2ae2 (diff) | |
download | llvm-e577f14b670ee2ae6bb717133310b215be4331b3.zip llvm-e577f14b670ee2ae6bb717133310b215be4331b3.tar.gz llvm-e577f14b670ee2ae6bb717133310b215be4331b3.tar.bz2 |
[InstCombine] Use `m_NotForbidPoison` when folding `(X u< Y) ? -1 : (~X + Y) --> uadd.sat(~X, Y)` (#114345)
Alive2: https://alive2.llvm.org/ce/z/mTGCo-
We cannot reuse `~X` if `m_AllOnes` matches a vector constant with some
poison elts. An alternative solution is to create a new not instead of
reusing `~X`. But it doesn't worth the effort because we need to add a
one-use check.
Fixes https://github.com/llvm/llvm-project/issues/113869.
Diffstat (limited to 'llvm/lib/IR/ConstantFold.cpp')
0 files changed, 0 insertions, 0 deletions