]> granicus.if.org Git - llvm/commitdiff
[AMDGPU] Use custom inserter for gfx10 VOP2b
authorStanislav Mekhanoshin <Stanislav.Mekhanoshin@amd.com>
Mon, 17 Jun 2019 22:37:37 +0000 (22:37 +0000)
committerStanislav Mekhanoshin <Stanislav.Mekhanoshin@amd.com>
Mon, 17 Jun 2019 22:37:37 +0000 (22:37 +0000)
This is part of the approved D63204 pending parent revision.
This small change is in fact a part of the VOP2b legalization which
does not technically belong to wave32 support, so extracted
separately.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363625 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/AMDGPU/VOP2Instructions.td

index 4ce181f3f5d48031c5c47e3708251694cd70a510..e7be776817f62bea9e58eb20e6b389cae002dde5 100644 (file)
@@ -175,7 +175,9 @@ multiclass VOP2bInst <string opName,
     let SchedRW = [Write32Bit, WriteSALU] in {
       let Uses = !if(useSGPRInput, [VCC, EXEC], [EXEC]), Defs = [VCC] in {
         def _e32 : VOP2_Pseudo <opName, P, VOPPatOrNull<node,P>.ret>,
-                   Commutable_REV<revOp#"_e32", !eq(revOp, opName)>;
+                   Commutable_REV<revOp#"_e32", !eq(revOp, opName)> {
+          let usesCustomInserter = !eq(P.NumSrcArgs, 2);
+        }
 
         def _sdwa  : VOP2_SDWA_Pseudo <opName, P> {
           let AsmMatchConverter = "cvtSdwaVOP2b";