[all-commits] [llvm/llvm-project] aad3a1: [ValueTracking] Respect `samesign` flag in `isKnow...
Yingwei Zheng via All-commits
all-commits at lists.llvm.org
Wed Oct 16 09:27:43 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: aad3a1630e385a6834f92a5f1d6045451ba21e4e
https://github.com/llvm/llvm-project/commit/aad3a1630e385a6834f92a5f1d6045451ba21e4e
Author: Yingwei Zheng <dtcxzyw2333 at gmail.com>
Date: 2024-10-17 (Thu, 17 Oct 2024)
Changed paths:
M llvm/lib/Analysis/ValueTracking.cpp
M llvm/test/Transforms/InstCombine/select-cmp.ll
Log Message:
-----------
[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.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list