From: Matt Arsenault Date: Thu, 16 Jun 2016 21:14:05 +0000 (+0000) Subject: AMDGPU: Fix maximum instruction size for amdgcn X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f3108f6961fddaddddd68ca73828211bad2650ae;p=llvm AMDGPU: Fix maximum instruction size for amdgcn This was causing the conservative estimate of inline asm size to be twice as big as expected. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272956 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCAsmInfo.cpp b/lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCAsmInfo.cpp index 4bc80a02893..d7eb9f9ac0d 100644 --- a/lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCAsmInfo.cpp +++ b/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 = "";