mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-07 14:33:15 +00:00
R600/SI: Fix emitting trailing whitespace after s_waitcnt
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@218486 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
479f2f7a14
commit
584886c0bb
@ -493,12 +493,26 @@ void AMDGPUInstPrinter::printWaitFlag(const MCInst *MI, unsigned OpNo,
|
||||
unsigned Vmcnt = SImm16 & 0xF;
|
||||
unsigned Expcnt = (SImm16 >> 4) & 0xF;
|
||||
unsigned Lgkmcnt = (SImm16 >> 8) & 0xF;
|
||||
if (Vmcnt != 0xF)
|
||||
O << "vmcnt(" << Vmcnt << ") ";
|
||||
if (Expcnt != 0x7)
|
||||
O << "expcnt(" << Expcnt << ") ";
|
||||
if (Lgkmcnt != 0x7)
|
||||
|
||||
bool NeedSpace = false;
|
||||
|
||||
if (Vmcnt != 0xF) {
|
||||
O << "vmcnt(" << Vmcnt << ')';
|
||||
NeedSpace = true;
|
||||
}
|
||||
|
||||
if (Expcnt != 0x7) {
|
||||
if (NeedSpace)
|
||||
O << ' ';
|
||||
O << "expcnt(" << Expcnt << ')';
|
||||
NeedSpace = true;
|
||||
}
|
||||
|
||||
if (Lgkmcnt != 0x7) {
|
||||
if (NeedSpace)
|
||||
O << ' ';
|
||||
O << "lgkmcnt(" << Lgkmcnt << ')';
|
||||
}
|
||||
}
|
||||
|
||||
#include "AMDGPUGenAsmWriter.inc"
|
||||
|
@ -1,11 +1,11 @@
|
||||
; RUN: llc -march=r600 -mcpu=SI -verify-machineinstrs < %s | FileCheck %s
|
||||
; RUN: llc -march=r600 -mcpu=SI -verify-machineinstrs < %s | FileCheck -strict-whitespace %s
|
||||
|
||||
; CHECK-LABEL: @main
|
||||
; CHECK: S_LOAD_DWORDX4
|
||||
; CHECK: S_LOAD_DWORDX4
|
||||
; CHECK: S_WAITCNT lgkmcnt(0)
|
||||
; CHECK: S_WAITCNT vmcnt(0)
|
||||
; CHECK: S_WAITCNT expcnt(0) lgkmcnt(0)
|
||||
; CHECK: S_WAITCNT lgkmcnt(0){{$}}
|
||||
; CHECK: S_WAITCNT vmcnt(0){{$}}
|
||||
; CHECK: S_WAITCNT expcnt(0) lgkmcnt(0){{$}}
|
||||
define void @main(<16 x i8> addrspace(2)* inreg %arg, <16 x i8> addrspace(2)* inreg %arg1, <32 x i8> addrspace(2)* inreg %arg2, <16 x i8> addrspace(2)* inreg %arg3, <16 x i8> addrspace(2)* inreg %arg4, i32 inreg %arg5, i32 %arg6, i32 %arg7, i32 %arg8, i32 %arg9, float addrspace(2)* inreg %constptr) #0 {
|
||||
main_body:
|
||||
%tmp = getelementptr <16 x i8> addrspace(2)* %arg3, i32 0
|
||||
|
Loading…
x
Reference in New Issue
Block a user