[PATCH] D30209: AMDGPU: Fold omod into instructions
Artem Tamazov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 22 02:57:11 PST 2017
artem.tamazov requested changes to this revision.
artem.tamazov added a comment.
This revision now requires changes to proceed.
Comments need to be updated at least.
================
Comment at: lib/Target/AMDGPU/SIFoldOperands.cpp:788-790
+// FIXME: Does this really not support denormals with f16?
+// FIXME: Does this need to check IEEE mode bit? SNaNs are generally not
+// handled, so will anything other than that break?
----------------
Output modifiers are not compatible with output denorms, i.e.:
- If output denorms are allowed (in the HW MODe register), then any output modifier is ignored
- If output denorms are not allowed, then denorms will be flushed to +/-0 first. Then, if output modifier is non-zero, -0 will be forced to +0 prior applying the modifier.
Output modifiers are not IEEE compliant (-0*x=+0). Output modifiers are ignored by hardware if ieee bit is set in the HW MODE register.
The above applies to all supported floating types, including f16, f32, f64.
================
Comment at: lib/Target/AMDGPU/SIFoldOperands.cpp:827
+ case AMDGPU::V_ADD_F16_e64: {
+ // XXX - Do denormals work with f16 omod?
+ if ((ST->hasFP32Denormals() && Op == AMDGPU::V_ADD_F32_e64) ||
----------------
Nope. Pls. see comment above.
================
Comment at: lib/Target/AMDGPU/SIFoldOperands.cpp:851
+
+// FIXME: Does this need to check IEEE bit on function?
+bool SIFoldOperands::tryFoldOMod(MachineInstr &MI) {
----------------
Yes. If IEEE is set, OMOD does not work.
https://reviews.llvm.org/D30209
More information about the llvm-commits
mailing list