[llvm] r245135 - AMDGPU/SI: Fix printing useless info with amdhsa
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 14 17:12:39 PDT 2015
Author: arsenm
Date: Fri Aug 14 19:12:39 2015
New Revision: 245135
URL: http://llvm.org/viewvc/llvm-project?rev=245135&view=rev
Log:
AMDGPU/SI: Fix printing useless info with amdhsa
The comments at the bottom would all report 0 if
amdhsa was used.
Modified:
llvm/trunk/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp
llvm/trunk/test/CodeGen/AMDGPU/register-count-comments.ll
Modified: llvm/trunk/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp?rev=245135&r1=245134&r2=245135&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp Fri Aug 14 19:12:39 2015
@@ -125,8 +125,8 @@ bool AMDGPUAsmPrinter::runOnMachineFunct
const AMDGPUSubtarget &STM = MF.getSubtarget<AMDGPUSubtarget>();
SIProgramInfo KernelInfo;
if (STM.getGeneration() >= AMDGPUSubtarget::SOUTHERN_ISLANDS) {
+ getSIProgramInfo(KernelInfo, MF);
if (!STM.isAmdHsaOS()) {
- getSIProgramInfo(KernelInfo, MF);
EmitProgramInfoSI(MF, KernelInfo);
}
// Emit directives
Modified: llvm/trunk/test/CodeGen/AMDGPU/register-count-comments.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/AMDGPU/register-count-comments.ll?rev=245135&r1=245134&r2=245135&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/AMDGPU/register-count-comments.ll (original)
+++ llvm/trunk/test/CodeGen/AMDGPU/register-count-comments.ll Fri Aug 14 19:12:39 2015
@@ -1,4 +1,5 @@
-; RUN: llc -march=amdgcn -mcpu=SI -verify-machineinstrs -asm-verbose < %s | FileCheck -check-prefix=SI %s
+; RUN: llc -march=amdgcn -verify-machineinstrs -asm-verbose < %s | FileCheck -check-prefix=SI %s
+; RUN: llc -march=amdgcn -mtriple=amdgcn-unknown-amdhsa -verify-machineinstrs -asm-verbose < %s | FileCheck -check-prefix=SI %s
declare i32 @llvm.SI.tid() nounwind readnone
More information about the llvm-commits
mailing list