From: Marek Olsak Date: Tue, 3 Feb 2015 21:53:05 +0000 (+0000) Subject: R600/SI: Rewrite VOP1InstSI to contain a pseudo and _si opcode X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=f8cf57cb0c708a4e9ec7894abeea89cb69f0e04b;p=oota-llvm.git 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/trunk@228038 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/R600/SIInstrInfo.td b/lib/Target/R600/SIInstrInfo.td index 0b0e47a1a9d..e10d8bc0596 100644 --- a/lib/Target/R600/SIInstrInfo.td +++ b/lib/Target/R600/SIInstrInfo.td @@ -842,6 +842,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 , @@ -938,6 +947,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> { @@ -1045,17 +1064,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