From bb234bf351a9890e920277e01d31ad425705c31d Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Mon, 20 Apr 2015 18:06:16 +0000 Subject: [PATCH] Merging r228038: MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit ------------------------------------------------------------------------ r228038 | marek.olsak | 2015-02-03 16:53:05 -0500 (Tue, 03 Feb 2015) | 10 lines R600/SI: Rewrite VOP1InstSI to contain a pseudo and _si opcode What this does is that if you accidentally select these instructions on VI, the code generation will fail, because the pseudo -> _vi mapping will be undefined. The idea is to be able to catch possible future bugs easily. Tested-by: Michel Dänzer ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_36@235319 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/R600/SIInstrInfo.td | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/lib/Target/R600/SIInstrInfo.td b/lib/Target/R600/SIInstrInfo.td index 2cd5adc648e..c16b84bf543 100644 --- a/lib/Target/R600/SIInstrInfo.td +++ b/lib/Target/R600/SIInstrInfo.td @@ -843,6 +843,15 @@ multiclass VOP1_m pattern, SIMCInstr ; } +multiclass VOP1SI_m pattern, + string opName> { + def "" : VOP1_Pseudo ; + + def _si : VOP1, + SIMCInstr ; + // No VI instruction. This class is for SI only. +} + class VOP2_Pseudo pattern, string opName> : VOP2Common , VOP , @@ -939,6 +948,16 @@ multiclass VOP3_1_m ; } +multiclass VOP3SI_1_m pattern, string opName, bit HasMods = 1> { + + def "" : VOP3_Pseudo ; + + def _si : VOP3_Real_si , + VOP3DisableFields<0, 0, HasMods>; + // No VI instruction. This class is for SI only. +} + multiclass VOP3_2_m pattern, string opName, string revOp, bit HasMods = 1, bit UseFullOp = 0> { @@ -1046,17 +1065,14 @@ multiclass VOP1Inst { - def _e32 : VOP1 , - VOP ; + defm _e32 : VOP1SI_m ; - def _e64 : VOP3Common , - VOP , - VOP3e , - VOP3DisableFields<0, 0, P.HasModifiers>; + [(set P.DstVT:$dst, (node P.Src0VT:$src0))]), + opName, P.HasModifiers>; } multiclass VOP2_Helper