[PATCH] D137811: InstCombine: Port amdgcn.class intrinsic combines to is.fpclass
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 16 21:23:40 PST 2022
arsenm added inline comments.
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp:819
+ const ConstantInt *CMask = cast<ConstantInt>(Src1);
+ uint32_t Mask = CMask->getZExtValue();
+ const bool IsStrict = II.isStrictFP();
----------------
arsenm wrote:
> jcranmer-intel wrote:
> > It feels like you should be able to use ninf/nnan/nsz flags to modify the mask here to make it more likely to fall into one of these categories, although this may provoke some backlash from those who argue that `nnan isnan(x)` => unconditional `false` shouldn't be an allowable optimization.
> I think this is debatable, and beyond the scope of this patch where I'd like to simply move what we already do for the target specific intrinsic
we can't actually put fast math flags here, because it's only allowed for calls with FP return types
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D137811/new/
https://reviews.llvm.org/D137811
More information about the llvm-commits
mailing list