diff options
author | tstellar <tstellar@91177308-0d34-0410-b5e6-96231b3b80d8> | 2012-10-09 18:49:01 +0000 |
---|---|---|
committer | tstellar <tstellar@91177308-0d34-0410-b5e6-96231b3b80d8> | 2012-10-09 18:49:01 +0000 |
commit | b8ab2d8487d926aca7877e2a907b7e32cba8e3a5 (patch) | |
tree | 29da682530d0184ffa1c771af90732ffa653e200 /lib/Target | |
parent | 128c23dfcebe226ec06de428c4fe9e112b998db8 (diff) |
R600: Add a comment explaining why we use TRUNC before FLT_TO_*INT
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/R600/@165524 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target')
-rw-r--r-- | lib/Target/AMDGPU/R600Instructions.td | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/Target/AMDGPU/R600Instructions.td b/lib/Target/AMDGPU/R600Instructions.td index 033ae154f44..2cf5fcae1e3 100644 --- a/lib/Target/AMDGPU/R600Instructions.td +++ b/lib/Target/AMDGPU/R600Instructions.td @@ -1022,6 +1022,16 @@ let Predicates = [isEGorCayman] in { def UINT_TO_FLT_eg : UINT_TO_FLT_Common<0x9C>; + // TRUNC is used for the FLT_TO_INT instructions to work around a + // perceived problem where the rounding modes are applied differently + // depending on the instruction and the slot they are in. + // See: + // https://bugs.freedesktop.org/show_bug.cgi?id=50232 + // Mesa commit: a1a0974401c467cb86ef818f22df67c21774a38c + // + // XXX: Lowering SELECT_CC will sometimes generate fp_to_[su]int nodes, + // which do not need to be truncated since the fp values are 0.0f or 1.0f. + // We should look into handling these cases separately. def : Pat<(fp_to_sint R600_Reg32:$src), (FLT_TO_INT_eg (TRUNC R600_Reg32:$src))>; |