aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorYingwei Zheng <dtcxzyw2333@gmail.com>2024-10-17 00:27:21 +0800
committerGitHub <noreply@github.com>2024-10-17 00:27:21 +0800
commitaad3a1630e385a6834f92a5f1d6045451ba21e4e (patch)
treea7df76128a6f2a45339ca2ad0bca936a3a3f9f17 /clang/lib/CodeGen/CodeGenModule.cpp
parent35e937b4de1890186347a382f7727ba86441dbda (diff)
downloadllvm-aad3a1630e385a6834f92a5f1d6045451ba21e4e.zip
llvm-aad3a1630e385a6834f92a5f1d6045451ba21e4e.tar.gz
llvm-aad3a1630e385a6834f92a5f1d6045451ba21e4e.tar.bz2
[ValueTracking] Respect `samesign` flag in `isKnownInversion` (#112390)
In https://github.com/llvm/llvm-project/pull/93591 we introduced `isKnownInversion` and assumes `X` is poison implies `Y` is poison because they share common operands. But after introducing `samesign` this assumption no longer hold if `X` is an icmp has `samesign` flag. Alive2 link: https://alive2.llvm.org/ce/z/rj3EwQ (Please run it locally with this patch and https://github.com/AliveToolkit/alive2/pull/1098). This approach is the most conservative way in my mind to address this problem. If `X` has `samesign` flag, it will check if `Y` also has this flag and make sure constant RHS operands have the same sign. Fixes https://github.com/llvm/llvm-project/issues/112350.
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions