[Mesa-dev] [PATCH 2/2] radeon/llvm: Fix DIV_Common pattern use

Vincent Lejeune vljn at ovi.com
Thu Oct 18 07:12:28 PDT 2012


This fix a crash in neverball with cayman
---
 lib/Target/AMDGPU/R600Instructions.td | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/Target/AMDGPU/R600Instructions.td b/lib/Target/AMDGPU/R600Instructions.td
index 2209df7..45b6b10 100644
--- a/lib/Target/AMDGPU/R600Instructions.td
+++ b/lib/Target/AMDGPU/R600Instructions.td
@@ -953,6 +953,7 @@ let Predicates = [isR700] in {
 let Predicates = [isEG] in {
   
 def RECIP_IEEE_eg : RECIP_IEEE_Common<0x86>;
+defm DIV_eg : DIV_Common<RECIP_IEEE_eg>;
 
 def MULLO_INT_eg : MULLO_INT_Common<0x8F>;
 def MULHI_INT_eg : MULHI_INT_Common<0x90>;
@@ -1014,7 +1015,6 @@ let Predicates = [isEGorCayman] in {
   def : DOT4_Pat <DOT4_eg>;
   defm CUBE_eg : CUBE_Common<0xC0>;
 
-  defm DIV_eg : DIV_Common<RECIP_IEEE_eg>;
   def SSG_eg : SSG_Common<CNDGT_eg, CNDGE_eg>;
   def TGSI_LIT_Z_eg : TGSI_LIT_Z_Common<MUL_LIT_eg, LOG_CLAMPED_eg, EXP_IEEE_eg>;
 
@@ -1307,6 +1307,8 @@ def EXP_IEEE_cm : EXP_IEEE_Common<0x81>;
 def LOG_IEEE_ : LOG_IEEE_Common<0x83>;
 } // End isVector = 1
 
+defm DIV_cm : DIV_Common<RECIP_IEEE_cm>;
+
 // RECIP_UINT emulation for Cayman
 def : Pat <
   (AMDGPUurecip R600_Reg32:$src0),
-- 
1.7.11.7



More information about the mesa-dev mailing list