[llvm] r272956 - AMDGPU: Fix maximum instruction size for amdgcn

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 16 14:14:05 PDT 2016


Author: arsenm
Date: Thu Jun 16 16:14:05 2016
New Revision: 272956

URL: http://llvm.org/viewvc/llvm-project?rev=272956&view=rev
Log:
AMDGPU: Fix maximum instruction size for amdgcn

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

Modified:
    llvm/trunk/lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCAsmInfo.cpp

Modified: llvm/trunk/lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCAsmInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCAsmInfo.cpp?rev=272956&r1=272955&r2=272956&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCAsmInfo.cpp (original)
+++ llvm/trunk/lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCAsmInfo.cpp Thu Jun 16 16:14:05 2016
@@ -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 = "";




More information about the llvm-commits mailing list