From ad385c402e665b2aedc7b456575d19df32584e73 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Tue, 8 May 2012 10:01:58 -0400 Subject: radeon/llvm: Use a custom inserter to lower LOAD_INPUT --- src/gallium/drivers/radeon/R600Instructions.td | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'src/gallium/drivers/radeon/R600Instructions.td') diff --git a/src/gallium/drivers/radeon/R600Instructions.td b/src/gallium/drivers/radeon/R600Instructions.td index 381ad715504..b462a05ea24 100644 --- a/src/gallium/drivers/radeon/R600Instructions.td +++ b/src/gallium/drivers/radeon/R600Instructions.td @@ -991,6 +991,13 @@ def LOCAL_SIZE_Y : R600PreloadInst <"LOCAL_SIZE_Y", def LOCAL_SIZE_Z : R600PreloadInst <"LOCAL_SIZE_Z", int_r600_read_local_size_z>; +def LOAD_INPUT : AMDGPUShaderInst < + (outs R600_Reg32:$dst), + (ins i32imm:$src), + "LOAD_INPUT $dst, $src", + [(set R600_Reg32:$dst, (int_R600_load_input imm:$src))] +>; + } // End usesCustomInserter = 1, isPseudo = 1 } // End isCodeGenOnly = 1 @@ -1032,12 +1039,4 @@ def : Insert_Element ; include "R600ShaderPatterns.td" -// We need this pattern to avoid having real registers in PHI nodes. -// For some reason this pattern only works when it comes after the other -// instruction defs. -def : Pat < - (int_R600_load_input imm:$src), - (LOAD_INPUT imm:$src) ->; - } // End isR600toCayman Predicate -- cgit v1.2.3