[PATCH] D21399: AMDGPU: Fix maximum instruction size for amdgcn

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 15 12:47:59 PDT 2016


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

This was causing the conservative estimate of inline asm to be twice as big as expected.

http://reviews.llvm.org/D21399

Files:
  lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCAsmInfo.cpp

Index: lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCAsmInfo.cpp
===================================================================
--- lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCAsmInfo.cpp
+++ lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCAsmInfo.cpp
@@ -9,12 +9,14 @@
 //===----------------------------------------------------------------------===//
 
 #include "AMDGPUMCAsmInfo.h"
+#include "llvm/ADT/Triple.h"
 
 using namespace llvm;
+
 AMDGPUMCAsmInfo::AMDGPUMCAsmInfo(const Triple &TT) : MCAsmInfoELF() {
   HasSingleParameterDotFile = false;
   //===------------------------------------------------------------------===//
-  MaxInstLength = 16;
+  MaxInstLength = (TT.getArch() == Triple::amdgcn) ? 8 : 16;
   SeparatorString = "\n";
   CommentString = ";";
   PrivateLabelPrefix = "";


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D21399.60883.patch
Type: text/x-patch
Size: 778 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160615/f8d4cbb5/attachment.bin>


More information about the llvm-commits mailing list