From 2ba0c13c26b339d13c8966a1925400584703c700 Mon Sep 17 00:00:00 2001 From: Marek Olsak Date: Tue, 27 Jan 2015 17:25:11 +0000 Subject: [PATCH] R600/SI: Don't set patterns for chip-specific instructions while having pseudos Only pseudos have patterns on them. Also don't set the asm string for VINTRP_Pseudo. All pseudos should have empty asm. This matches what all other multiclasses do. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227212 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/R600/SIInstrInfo.td | 93 ++++++++++++++++------------------ 1 file changed, 43 insertions(+), 50 deletions(-) diff --git a/lib/Target/R600/SIInstrInfo.td b/lib/Target/R600/SIInstrInfo.td index 69b35c02c87..852870e463a 100644 --- a/lib/Target/R600/SIInstrInfo.td +++ b/lib/Target/R600/SIInstrInfo.td @@ -383,15 +383,13 @@ class SOP1_Pseudo pattern> : let isPseudo = 1; } -class SOP1_Real_si pattern> : - SOP1 , +class SOP1_Real_si : + SOP1 , SOP1e , SIMCInstr; -class SOP1_Real_vi pattern> : - SOP1 , +class SOP1_Real_vi : + SOP1 , SOP1e , SIMCInstr; @@ -400,10 +398,10 @@ multiclass SOP1_32 pattern> { pattern>; def _si : SOP1_Real_si ; + opName#" $dst, $src0">; def _vi : SOP1_Real_vi ; + opName#" $dst, $src0">; } multiclass SOP1_64 pattern> { @@ -411,10 +409,10 @@ multiclass SOP1_64 pattern> { pattern>; def _si : SOP1_Real_si ; + opName#" $dst, $src0">; def _vi : SOP1_Real_vi ; + opName#" $dst, $src0">; } // no input, 64-bit output. @@ -422,12 +420,12 @@ multiclass SOP1_64_0 pattern> { def "" : SOP1_Pseudo ; def _si : SOP1_Real_si { + opName#" $dst"> { let SSRC0 = 0; } def _vi : SOP1_Real_vi { + opName#" $dst"> { let SSRC0 = 0; } } @@ -438,10 +436,10 @@ multiclass SOP1_32_64 pattern> { pattern>; def _si : SOP1_Real_si ; + opName#" $dst, $src0">; def _vi : SOP1_Real_vi ; + opName#" $dst, $src0">; } class SOP2_Pseudo pattern> : @@ -451,15 +449,13 @@ class SOP2_Pseudo pattern> : let Size = 4; } -class SOP2_Real_si pattern> : - SOP2, +class SOP2_Real_si : + SOP2, SOP2e, SIMCInstr; -class SOP2_Real_vi pattern> : - SOP2, +class SOP2_Real_vi : + SOP2, SOP2e, SIMCInstr; @@ -469,11 +465,11 @@ multiclass SOP2_SELECT_32 pattern> { def _si : SOP2_Real_si ; + opName#" $dst, $src0, $src1 [$scc]">; def _vi : SOP2_Real_vi ; + opName#" $dst, $src0, $src1 [$scc]">; } multiclass SOP2_32 pattern> { @@ -481,10 +477,10 @@ multiclass SOP2_32 pattern> { (ins SSrc_32:$src0, SSrc_32:$src1), pattern>; def _si : SOP2_Real_si ; + (ins SSrc_32:$src0, SSrc_32:$src1), opName#" $dst, $src0, $src1">; def _vi : SOP2_Real_vi ; + (ins SSrc_32:$src0, SSrc_32:$src1), opName#" $dst, $src0, $src1">; } multiclass SOP2_64 pattern> { @@ -492,10 +488,10 @@ multiclass SOP2_64 pattern> { (ins SSrc_64:$src0, SSrc_64:$src1), pattern>; def _si : SOP2_Real_si ; + (ins SSrc_64:$src0, SSrc_64:$src1), opName#" $dst, $src0, $src1">; def _vi : SOP2_Real_vi ; + (ins SSrc_64:$src0, SSrc_64:$src1), opName#" $dst, $src0, $src1">; } multiclass SOP2_64_32 pattern> { @@ -503,10 +499,10 @@ multiclass SOP2_64_32 pattern> { (ins SSrc_64:$src0, SSrc_32:$src1), pattern>; def _si : SOP2_Real_si ; + (ins SSrc_64:$src0, SSrc_32:$src1), opName#" $dst, $src0, $src1">; def _vi : SOP2_Real_vi ; + (ins SSrc_64:$src0, SSrc_32:$src1), opName#" $dst, $src0, $src1">; } @@ -527,15 +523,13 @@ class SOPK_Pseudo pattern> : let isPseudo = 1; } -class SOPK_Real_si pattern> : - SOPK , +class SOPK_Real_si : + SOPK , SOPKe , SIMCInstr; -class SOPK_Real_vi pattern> : - SOPK , +class SOPK_Real_vi : + SOPK , SOPKe , SIMCInstr; @@ -544,10 +538,10 @@ multiclass SOPK_32 pattern> { pattern>; def _si : SOPK_Real_si ; + opName#" $dst, $src0">; def _vi : SOPK_Real_vi ; + opName#" $dst, $src0">; } multiclass SOPK_SCC pattern> { @@ -555,10 +549,10 @@ multiclass SOPK_SCC pattern> { (ins SReg_32:$src0, u16imm:$src1), pattern>; def _si : SOPK_Real_si ; + (ins SReg_32:$src0, u16imm:$src1), opName#" $dst, $src0">; def _vi : SOPK_Real_vi ; + (ins SReg_32:$src0, u16imm:$src1), opName#" $dst, $src0">; } //===----------------------------------------------------------------------===// @@ -974,13 +968,13 @@ multiclass VOP3b_2_m , + def _si : VOP3b , VOP3DisableFields<1, 0, HasMods>, SIMCInstr, VOP2_REV; // TODO: Do we need this VI variant here? - /*def _vi : VOP3b_vi , + /*def _vi : VOP3b_vi , VOP3DisableFields<1, 0, HasMods>, SIMCInstr, VOP2_REV;*/ @@ -1307,22 +1301,21 @@ class Vop3ModPat : Pat< // Interpolation opcodes //===----------------------------------------------------------------------===// -class VINTRP_Pseudo pattern> : - VINTRPCommon , +class VINTRP_Pseudo pattern> : + VINTRPCommon , SIMCInstr { let isPseudo = 1; } class VINTRP_Real_si op, string opName, dag outs, dag ins, - string asm, list pattern> : - VINTRPCommon , + string asm> : + VINTRPCommon , VINTRPe , SIMCInstr; class VINTRP_Real_vi op, string opName, dag outs, dag ins, - string asm, list pattern> : - VINTRPCommon , + string asm> : + VINTRPCommon , VINTRPe_vi , SIMCInstr; @@ -1331,11 +1324,11 @@ multiclass VINTRP_m op, string opName, dag outs, dag ins, string asm, list pattern = []> { let DisableEncoding = disableEncoding, Constraints = constraints in { - def "" : VINTRP_Pseudo ; + def "" : VINTRP_Pseudo ; - def _si : VINTRP_Real_si ; + def _si : VINTRP_Real_si ; - def _vi : VINTRP_Real_vi ; + def _vi : VINTRP_Real_vi ; } } -- 2.34.1