diff --git a/src/gallium/drivers/radeon/R600Instructions.td b/src/gallium/drivers/radeon/R600Instructions.td index 794eaef..15748b2 100644 --- a/src/gallium/drivers/radeon/R600Instructions.td +++ b/src/gallium/drivers/radeon/R600Instructions.td @@ -271,6 +271,10 @@ def load_param : PatFrag<(ops node:$ptr), */ def isR600 : Predicate<"Subtarget.device()" "->getGeneration() == AMDILDeviceInfo::HD4XXX">; +def isR700 : Predicate<"Subtarget.device()" + "->getGeneration() == AMDILDeviceInfo::HD4XXX &&" + "Subtarget.device()->getDeviceFlag()" + ">= OCL_DEVICE_RV710">; def isEG : Predicate<"Subtarget.device()" "->getGeneration() >= AMDILDeviceInfo::HD5XXX && " "Subtarget.device()->getDeviceFlag() != OCL_DEVICE_CAYMAN">; @@ -707,8 +711,7 @@ class RECIPSQRT_IEEE_Common inst> : R600_1OP < >; class SIN_Common inst> : R600_1OP < - inst, "SIN", - [(set R600_Reg32:$dst, (int_AMDIL_sin R600_Reg32:$src))]>{ + inst, "SIN", []>{ let Trig = 1; } @@ -809,13 +812,21 @@ def RECIP_UINT_eg : RECIP_UINT_Common<0x94>; /* Evergreen / Cayman Instructions */ /* ------------------------------- */ -let Predicates = [isEGorCayman] in { - class TRIG_eg : Pat< (intr R600_Reg32:$src), (trig (MUL (MOV_IMM_I32 (i32 ALU_LITERAL_X), CONST.TWO_PI_INV), R600_Reg32:$src)) >; +let Predicates = [isR700] in { + /* R700 normalizes inputs to SIN/COS the same as EG */ + def SIN_r700 : SIN_Common<0x6E>; + def COS_r700 : COS_Common<0x6F>; + + def : TRIG_eg ; + def : TRIG_eg ; +} + +let Predicates = [isEGorCayman] in { def MULADD_eg : MULADD_Common<0x14>; def ASHR_eg : ASHR_Common<0x15>; def LSHR_eg : LSHR_Common<0x16>;