[llvm] [CVP] Infer nneg on existing zext (PR #72052)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Sun Nov 12 12:19:44 PST 2023
================
@@ -1032,6 +1033,24 @@ static bool processSExt(SExtInst *SDI, LazyValueInfo *LVI) {
return true;
}
+static bool processZExt(ZExtInst *SDI, LazyValueInfo *LVI) {
+ if (SDI->getType()->isVectorTy())
+ return false;
+
+ if (SDI->hasNonNeg())
+ return false;
+
+ const Use &Base = SDI->getOperandUse(0);
+ if (!LVI->getConstantRangeAtUse(Base, /*UndefAllowed*/ false)
----------------
nikic wrote:
I don't think it does. It has a dominating condition. I would expect something like a select condition for at-use.
https://github.com/llvm/llvm-project/pull/72052
More information about the llvm-commits
mailing list