[PATCH] D22898: AMDGPU: Fix ffloor for SI
Nicolai Hähnle via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 28 04:02:06 PDT 2016
nhaehnle added a subscriber: nhaehnle.
nhaehnle added a comment.
Is the MIN needed for correctness at all? Looking at the workaround docs, I see the explanation that "[FRACT] is outputting 1.0 for very small negative inputs). Sounds to me like v_fract is correctly in the range [0, 1.0), except for those very small negative inputs, where it returns 1.0 (which happens to be correct for the ffloor lowering).
================
Comment at: lib/Target/AMDGPU/SIInstructions.td:3542
@@ -3541,3 +3541,3 @@
SRCMODS.NONE,
- (V_MOV_B64_PSEUDO 0x3fefffffffffffff),
+ CONST.FP64_ONE,
DSTCLAMP.NONE, DSTOMOD.NONE),
----------------
Please also change the comment above.
https://reviews.llvm.org/D22898
More information about the llvm-commits
mailing list