aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/ConstantFold.cpp
diff options
context:
space:
mode:
authorYingwei Zheng <dtcxzyw2333@gmail.com>2024-11-01 22:18:44 +0800
committerGitHub <noreply@github.com>2024-11-01 22:18:44 +0800
commite577f14b670ee2ae6bb717133310b215be4331b3 (patch)
tree41f1f99263231835ee6f1adbe4748883e061513e /llvm/lib/IR/ConstantFold.cpp
parentc752efbdcc1ebd81f879633d6b798248064e2ae2 (diff)
downloadllvm-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