Mesa (master): radeon/llvm: prepare to revert the round mode state to default
Vadim Girlin
vadimg at kemper.freedesktop.org
Fri May 25 13:36:44 UTC 2012
Module: Mesa
Branch: master
Commit: 5a1b59b4e67370ccfb8e484434914fc32ef53a8c
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=5a1b59b4e67370ccfb8e484434914fc32ef53a8c
Author: Vadim Girlin <vadimgirlin at gmail.com>
Date: Fri May 25 17:27:33 2012 +0400
radeon/llvm: prepare to revert the round mode state to default
Use TRUNC before FLT_TO_INT on evergreen/cayman.
Signed-off-by: Vadim Girlin <vadimgirlin at gmail.com>
Reviewed-by: Tom Stellard <thomas.stellard at amd.com>
---
src/gallium/drivers/radeon/R600Instructions.td | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/src/gallium/drivers/radeon/R600Instructions.td b/src/gallium/drivers/radeon/R600Instructions.td
index 88a03ab..04f49cd 100644
--- a/src/gallium/drivers/radeon/R600Instructions.td
+++ b/src/gallium/drivers/radeon/R600Instructions.td
@@ -901,7 +901,6 @@ class TRIG_eg <InstR600 trig, Intrinsic intr> : Pat<
def CNDGT_eg : CNDGT_Common<0x1A>;
def CNDGE_eg : CNDGE_Common<0x1B>;
def MUL_LIT_eg : MUL_LIT_Common<0x1F>;
- def FLT_TO_INT_eg : FLT_TO_INT_Common<0x50>;
def EXP_IEEE_eg : EXP_IEEE_Common<0x81>;
def LOG_CLAMPED_eg : LOG_CLAMPED_Common<0x82>;
def LOG_IEEE_eg : LOG_IEEE_Common<0x83>;
@@ -916,7 +915,6 @@ class TRIG_eg <InstR600 trig, Intrinsic intr> : Pat<
def MULLO_UINT_eg : MULLO_UINT_Common<0x91>;
def MULHI_UINT_eg : MULHI_UINT_Common<0x92>;
def RECIP_UINT_eg : RECIP_UINT_Common<0x94>;
- def INT_TO_FLT_eg : INT_TO_FLT_Common<0x9B>;
def DOT4_eg : DOT4_Common<0xBE>;
def CUBE_eg : CUBE_Common<0xC0>;
@@ -928,6 +926,15 @@ class TRIG_eg <InstR600 trig, Intrinsic intr> : Pat<
def : TRIG_eg <SIN_eg, int_AMDGPU_sin>;
def : TRIG_eg <COS_eg, int_AMDGPU_cos>;
+ def FLT_TO_INT_eg : FLT_TO_INT_Common<0x50> {
+ let Pattern = [];
+ }
+
+ def INT_TO_FLT_eg : INT_TO_FLT_Common<0x9B>;
+
+ def : Pat<(fp_to_sint R600_Reg32:$src),
+ (FLT_TO_INT_eg (TRUNC R600_Reg32:$src))>;
+
}
let Predicates = [isCayman] in {
More information about the mesa-commit
mailing list