[PATCH] D142093: [InstCombine] trunc (fptoui|fptosi)
Sam Parker via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 20 04:14:22 PST 2023
samparker added inline comments.
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp:506
+ // simple types while evaluating truncations.
+ if (isGuaranteedNotToBeUndefOrPoison(I->getOperand(0)))
+ if (I->getOperand(0)->getType()->getScalarType()->isHalfTy())
----------------
nikic wrote:
> samparker wrote:
> > And I'm still not sure whether this is needed? Alive seems to want it to be happy, but I pretty sure integer transforms are performed elsewhere without considering fp-to-int conversions as inputs.
> Can you share the problematic proof? It shouldn't be needed.
It doesn't make sense to me, but I'm hopeless with FP, so just alive... https://alive2.llvm.org/ce/z/fr5kdx. It will only compile with `--disable-undef-input` or a noundef operand.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D142093/new/
https://reviews.llvm.org/D142093
More information about the llvm-commits
mailing list