[llvm] r343259 - AMDGPU: Split VOP2Inst into VOP2Inst_e32/e64/sdwa
Konstantin Zhuravlyov via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 27 12:46:41 PDT 2018
Author: kzhuravl
Date: Thu Sep 27 12:46:41 2018
New Revision: 343259
URL: http://llvm.org/viewvc/llvm-project?rev=343259&view=rev
Log:
AMDGPU: Split VOP2Inst into VOP2Inst_e32/e64/sdwa
Modified:
llvm/trunk/lib/Target/AMDGPU/VOP2Instructions.td
Modified: llvm/trunk/lib/Target/AMDGPU/VOP2Instructions.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AMDGPU/VOP2Instructions.td?rev=343259&r1=343258&r2=343259&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AMDGPU/VOP2Instructions.td (original)
+++ llvm/trunk/lib/Target/AMDGPU/VOP2Instructions.td Thu Sep 27 12:46:41 2018
@@ -116,25 +116,47 @@ class getVOP2Pat64 <SDPatternOperator no
[(set P.DstVT:$vdst, (node P.Src0VT:$src0, P.Src1VT:$src1))]);
}
-multiclass VOP2Inst <string opName,
- VOPProfile P,
- SDPatternOperator node = null_frag,
- string revOp = opName,
- bit GFX9Renamed = 0> {
-
+multiclass VOP2Inst_e32<string opName,
+ VOPProfile P,
+ SDPatternOperator node = null_frag,
+ string revOp = opName,
+ bit GFX9Renamed = 0> {
let renamedInGFX9 = GFX9Renamed in {
-
def _e32 : VOP2_Pseudo <opName, P, VOPPatOrNull<node,P>.ret>,
Commutable_REV<revOp#"_e32", !eq(revOp, opName)>;
+ } // End renamedInGFX9 = GFX9Renamed
+}
+multiclass VOP2Inst_e64<string opName,
+ VOPProfile P,
+ SDPatternOperator node = null_frag,
+ string revOp = opName,
+ bit GFX9Renamed = 0> {
+ let renamedInGFX9 = GFX9Renamed in {
def _e64 : VOP3_Pseudo <opName, P, getVOP2Pat64<node, P>.ret>,
Commutable_REV<revOp#"_e64", !eq(revOp, opName)>;
+ } // End renamedInGFX9 = GFX9Renamed
+}
- def _sdwa : VOP2_SDWA_Pseudo <opName, P>;
-
- }
+multiclass VOP2Inst_sdwa<string opName,
+ VOPProfile P,
+ SDPatternOperator node = null_frag,
+ string revOp = opName,
+ bit GFX9Renamed = 0> {
+ let renamedInGFX9 = GFX9Renamed in {
+ def _sdwa : VOP2_SDWA_Pseudo <opName, P>;
+ } // End renamedInGFX9 = GFX9Renamed
}
+multiclass VOP2Inst<string opName,
+ VOPProfile P,
+ SDPatternOperator node = null_frag,
+ string revOp = opName,
+ bit GFX9Renamed = 0> :
+ VOP2Inst_e32<opName, P, node, revOp, GFX9Renamed>,
+ VOP2Inst_e64<opName, P, node, revOp, GFX9Renamed>,
+ VOP2Inst_sdwa<opName, P, node, revOp, GFX9Renamed>;
+
multiclass VOP2bInst <string opName,
VOPProfile P,
SDPatternOperator node = null_frag,
More information about the llvm-commits
mailing list