[llvm] [ConstraintElim] Check the other signedness when hasSameSign (PR #128168)
Yingwei Zheng via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 21 07:49:02 PST 2025
================
@@ -1460,6 +1460,13 @@ static bool checkAndReplaceCondition(
checkCondition(Cmp->getPredicate(), Cmp->getOperand(0),
Cmp->getOperand(1), Cmp, Info))
return ReplaceCmpWithConstant(Cmp, *ImpliedCondition);
+
+ if (Cmp->hasSameSign())
----------------
dtcxzyw wrote:
Is it necessary to handle eq/ne predicates? We have added eq/ne facts into both constraint systems in https://github.com/llvm/llvm-project/pull/121423. Can you add some tests to demonstrate its necessity?
https://github.com/llvm/llvm-project/pull/128168
More information about the llvm-commits
mailing list