[llvm] ConstraintElim: teach fact-transfer about samesign (PR #115893)
Yingwei Zheng via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 14 17:18:48 PST 2024
================
@@ -1794,7 +1803,14 @@ static bool eliminateConstraints(Function &F, DominatorTree &DT, LoopInfo &LI,
if (ReproducerModule && DFSInStack.size() > ReproducerCondStack.size())
ReproducerCondStack.emplace_back(Pred, A, B);
- Info.transferToOtherSystem(Pred, A, B, CB.NumIn, CB.NumOut, DFSInStack);
+ // If samesign is present on the ICmp, simply transfer the signed system
+ // to the unsigned system, and viceversa.
+ if (HasSameSign)
+ Info.addFact(CmpInst::getFlippedSignednessPredicate(Pred), A, B,
----------------
dtcxzyw wrote:
It is allowed by spec.
https://github.com/llvm/llvm-project/pull/115893
More information about the llvm-commits
mailing list