[PATCH] D35218: [AMDGPU] fcanonicalize elimination optimization
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 10 12:10:21 PDT 2017
arsenm added inline comments.
================
Comment at: lib/Target/AMDGPU/SIISelLowering.cpp:4638
+
+ case ISD::FCANONICALIZE:
+ return true;
----------------
fcanonicalize should have the idempotent optimization applied so there shouldn't be a need to handle it
================
Comment at: lib/Target/AMDGPU/SIISelLowering.cpp:4662
+ case ISD::FCOS:
+ case ISD::FSINCOS:
+ return Op.getValueType().getScalarType() != MVT::f16;
----------------
We don't handle this
================
Comment at: lib/Target/AMDGPU/SIISelLowering.cpp:4665-4668
+ // In pre-GFX9 targets V_MIN_F32 and others do not flush denorms.
+ // For such targets need to check their input recursively.
+ case ISD::FMINNUM:
+ case ISD::FMAXNUM:
----------------
The output is never flushed anywhere?
================
Comment at: lib/Target/AMDGPU/SIISelLowering.cpp:4669-4670
+ case ISD::FMAXNUM:
+ case ISD::FMINNAN:
+ case ISD::FMAXNAN:
+ if (ST->getGeneration() >= SISubtarget::GFX9)
----------------
We don't handle these
================
Comment at: lib/Target/AMDGPU/SIISelLowering.cpp:4671-4672
+ case ISD::FMAXNAN:
+ if (ST->getGeneration() >= SISubtarget::GFX9)
+ return true;
+
----------------
I don't think this is true, but should have a named check in the subtarget
================
Comment at: lib/Target/AMDGPU/SIISelLowering.cpp:4678-4680
+ case ISD::ConstantFP: {
+ auto F = cast<ConstantFPSDNode>(Op)->getValueAPF();
+ return !F.isDenormal() && !(F.isNaN() && F.isSignaling());
----------------
We constant fold this already so this shouldn't be necessary
https://reviews.llvm.org/D35218
More information about the llvm-commits
mailing list