[PATCH] D13485: AMDGPU: Remove literal constants from VOP2b src0

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 6 15:24:10 PDT 2015


arsenm created this revision.
arsenm added a reviewer: tstellarAMD.
arsenm added a subscriber: llvm-commits.
Herald added a subscriber: arsenm.

Because of the constant bus requirement, it is never legal to
use a literal constant for these instructions despite the encoding
allowing it.

http://reviews.llvm.org/D13485

Files:
  lib/Target/AMDGPU/SIInstrInfo.td

Index: lib/Target/AMDGPU/SIInstrInfo.td
===================================================================
--- lib/Target/AMDGPU/SIInstrInfo.td
+++ lib/Target/AMDGPU/SIInstrInfo.td
@@ -1195,7 +1195,13 @@
 
   // Suppress src2 implied by type since the 32-bit encoding uses an
   // implicit VCC use.
-  let Ins32 = (ins Src0RC32:$src0, Src1RC32:$src1);
+  //
+  // We also use VCSrc_32 to exclude literal constants, even though
+  // the encoding normally allows them since the implicit VCC use
+  // means using one would always violate the constant bus
+  // restriction. SGPRs are still allowed because it should
+  // technically be possible to use VCC again as src0.
+  let Ins32 = (ins VCSrc_32:$src0, Src1RC32:$src1);
 }
 
 class VOP3b_Profile<ValueType vt> : VOPProfile<[vt, vt, vt, vt]> {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D13485.36670.patch
Type: text/x-patch
Size: 799 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151006/32b7e7d6/attachment.bin>


More information about the llvm-commits mailing list