[llvm] ConstraintElim: teach fact-transfer about samesign (PR #115893)
Antonio Frighetto via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 18 02:28:11 PST 2024
================
@@ -1794,7 +1803,17 @@ 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 (ICmpInst::isRelational(Pred)) {
+ // If samesign is present on the ICmp, simply transfer the signed system
+ // to the unsigned system, and viceversa.
----------------
antoniofrighetto wrote:
```suggestion
// If samesign is present on the ICmp, simply flip sign predicate and transfer such an information from the signed system
// to the unsigned system, and viceversa.
```
https://github.com/llvm/llvm-project/pull/115893
More information about the llvm-commits
mailing list