[PATCH] D137811: InstCombine: Port amdgcn.class intrinsic combines to is.fpclass
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 29 10:04:31 PST 2022
arsenm added inline comments.
================
Comment at: llvm/lib/Analysis/InstructionSimplify.cpp:6058-6066
+ // If all tests are made, it doesn't matter what the value is.
+ if ((Mask & fcAllFlags) == fcAllFlags)
+ return ConstantInt::get(ReturnType, true);
+ if ((Mask & fcAllFlags) == 0)
+ return ConstantInt::get(ReturnType, false);
+ if (isa<PoisonValue>(Op0))
+ return PoisonValue::get(ReturnType);
----------------
foad wrote:
> Poison/undef checks should probably go first, before other simplifications?
I specifically had these later. The first operand shouldn't matter based on the test. I'm thinking about the interaction between fast math optimizations, and class uses used to guard regions where nnan/ninf is expected.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D137811/new/
https://reviews.llvm.org/D137811
More information about the llvm-commits
mailing list