[llvm] r238148 - R600/SI: Remove some unnecessary patterns from VINTRP multiclass

Tom Stellard thomas.stellard at amd.com
Mon May 25 09:15:57 PDT 2015


Author: tstellar
Date: Mon May 25 11:15:56 2015
New Revision: 238148

URL: http://llvm.org/viewvc/llvm-project?rev=238148&view=rev
Log:
R600/SI: Remove some unnecessary patterns from VINTRP multiclass

DisableEncoding and Constraints can be set using let statements around
the multiclass defs.

Modified:
    llvm/trunk/lib/Target/R600/SIInstrInfo.td
    llvm/trunk/lib/Target/R600/SIInstructions.td

Modified: llvm/trunk/lib/Target/R600/SIInstrInfo.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/R600/SIInstrInfo.td?rev=238148&r1=238147&r2=238148&view=diff
==============================================================================
--- llvm/trunk/lib/Target/R600/SIInstrInfo.td (original)
+++ llvm/trunk/lib/Target/R600/SIInstrInfo.td Mon May 25 11:15:56 2015
@@ -1771,16 +1771,12 @@ class VINTRP_Real_vi <bits <2> op, strin
   SIMCInstr<opName, SISubtarget.VI>;
 
 multiclass VINTRP_m <bits <2> op, dag outs, dag ins, string asm,
-                     list<dag> pattern = [],
-                     string disableEncoding = "", string constraints = ""> {
-  let DisableEncoding = disableEncoding,
-      Constraints = constraints in {
-    def "" : VINTRP_Pseudo <NAME, outs, ins, pattern>;
+                     list<dag> pattern = []> {
+  def "" : VINTRP_Pseudo <NAME, outs, ins, pattern>;
 
-    def _si : VINTRP_Real_si <op, NAME, outs, ins, asm>;
+  def _si : VINTRP_Real_si <op, NAME, outs, ins, asm>;
 
-    def _vi : VINTRP_Real_vi <op, NAME, outs, ins, asm>;
-  }
+  def _vi : VINTRP_Real_vi <op, NAME, outs, ins, asm>;
 }
 
 //===----------------------------------------------------------------------===//

Modified: llvm/trunk/lib/Target/R600/SIInstructions.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/R600/SIInstructions.td?rev=238148&r1=238147&r2=238148&view=diff
==============================================================================
--- llvm/trunk/lib/Target/R600/SIInstructions.td (original)
+++ llvm/trunk/lib/Target/R600/SIInstructions.td Mon May 25 11:15:56 2015
@@ -1461,15 +1461,17 @@ defm V_INTERP_P1_F32_16bank : V_INTERP_P
 
 } // End OtherPredicates = [has32BankLDS], Constraints = "@earlyclobber $dst"
 
+let DisableEncoding = "$src0", Constraints = "$src0 = $dst" in {
+
 defm V_INTERP_P2_F32 : VINTRP_m <
   0x00000001,
   (outs VGPR_32:$dst),
   (ins VGPR_32:$src0, VGPR_32:$j, i32imm:$attr_chan, i32imm:$attr),
   "v_interp_p2_f32 $dst, [$src0], $j, $attr_chan, $attr, [m0]",
   [(set f32:$dst, (AMDGPUinterp_p2 f32:$src0, i32:$j, (i32 imm:$attr_chan),
-                                                     (i32 imm:$attr)))],
-  "$src0",
-  "$src0 = $dst">;
+                                                     (i32 imm:$attr)))]>;
+
+} // End DisableEncoding = "$src0", Constraints = "$src0 = $dst"
 
 defm V_INTERP_MOV_F32 : VINTRP_m <
   0x00000002,





More information about the llvm-commits mailing list