[PATCH] D153717: [SCCP] Replace valuestate.isConstant with helper isConstant
luxufan via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 7 00:52:24 PDT 2023
StephenFan added inline comments.
================
Comment at: llvm/lib/Transforms/Utils/SCCPSolver.cpp:1223
ValueLatticeElement OpSt = getValueState(I.getOperand(0));
- if (OpSt.isUnknownOrUndef())
+ if (OpSt.isUnknownOrUndefOrPoison())
return;
----------------
nikic wrote:
> Shouldn't we propagate poison here and in similar cases (by going through the Constant path)?
Yes. But currently `SCCPSolver::getConstant(ValueLatticeElement)` doesn't support get undef or poison constant values. And undef or poison are represented in SCCPSolver just by the enum tags which don't have the type information to construct UndefValue or PoisonValue. To support this, we should record the undef or poison in ConstVal instead of just representing it by tags.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D153717/new/
https://reviews.llvm.org/D153717
More information about the llvm-commits
mailing list