[all-commits] [llvm/llvm-project] 7a9e41: [InstCombine] Fix assertion failure in issue80597 ...
Yingwei Zheng via All-commits
all-commits at lists.llvm.org
Tue Feb 6 15:41:26 PST 2024
Branch: refs/heads/release/18.x
Home: https://github.com/llvm/llvm-project
Commit: 7a9e4184fbb17d31265253f69b3bf5217c0d967c
https://github.com/llvm/llvm-project/commit/7a9e4184fbb17d31265253f69b3bf5217c0d967c
Author: Yingwei Zheng <dtcxzyw2333 at gmail.com>
Date: 2024-02-06 (Tue, 06 Feb 2024)
Changed paths:
M llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
A llvm/test/Transforms/InstCombine/pr80597.ll
Log Message:
-----------
[InstCombine] Fix assertion failure in issue80597 (#80614)
The assertion in #80597 failed when we were trying to compute known bits
of a value in an unreachable BB.
https://github.com/llvm/llvm-project/blob/859b09da08c2a47026ba0a7d2f21b7dca705864d/llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp#L749-L810
In this case, `SignBits` is 30 (deduced from instr info), but `Known` is
`10000101010111010011110101000?0?00000000000000000000000000000000`
(deduced from dom cond). Setting high bits of `lshr Known, 1` will lead
to conflict.
This patch masks out high bits of `Known.Zero` to address this problem.
Fixes #80597.
(cherry picked from commit cb8d83a77c25e529f58eba17bb1ec76069a04e90)
More information about the All-commits
mailing list