[llvm] r220329 - R600: Use default GlobalDirective
Matt Arsenault
Matthew.Arsenault at amd.com
Tue Oct 21 14:08:37 PDT 2014
Author: arsenm
Date: Tue Oct 21 16:08:36 2014
New Revision: 220329
URL: http://llvm.org/viewvc/llvm-project?rev=220329&view=rev
Log:
R600: Use default GlobalDirective
The overridden one wasn't inserting a space,
so you would end up with .globalfoo
Added:
llvm/trunk/test/CodeGen/R600/global-directive.ll
Modified:
llvm/trunk/lib/Target/R600/MCTargetDesc/AMDGPUMCAsmInfo.cpp
Modified: llvm/trunk/lib/Target/R600/MCTargetDesc/AMDGPUMCAsmInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/R600/MCTargetDesc/AMDGPUMCAsmInfo.cpp?rev=220329&r1=220328&r2=220329&view=diff
==============================================================================
--- llvm/trunk/lib/Target/R600/MCTargetDesc/AMDGPUMCAsmInfo.cpp (original)
+++ llvm/trunk/lib/Target/R600/MCTargetDesc/AMDGPUMCAsmInfo.cpp Tue Oct 21 16:08:36 2014
@@ -33,7 +33,6 @@ AMDGPUMCAsmInfo::AMDGPUMCAsmInfo(StringR
UsesELFSectionDirectiveForBSS = true;
//===--- Global Variable Emission Directives --------------------------===//
- GlobalDirective = ".global";
HasAggressiveSymbolFolding = true;
COMMDirectiveAlignmentIsInBytes = false;
HasDotTypeDotSizeDirective = false;
Added: llvm/trunk/test/CodeGen/R600/global-directive.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/R600/global-directive.ll?rev=220329&view=auto
==============================================================================
--- llvm/trunk/test/CodeGen/R600/global-directive.ll (added)
+++ llvm/trunk/test/CodeGen/R600/global-directive.ll Tue Oct 21 16:08:36 2014
@@ -0,0 +1,14 @@
+; RUN: llc -march=r600 -mcpu=SI -verify-machineinstrs < %s | FileCheck -check-prefix=SI %s
+
+; Make sure the GlobalDirective isn't merged with the function name
+
+; SI: .globl foo
+; SI: {{^}}foo:
+define void @foo(i32 addrspace(1)* %out, i32 addrspace(1)* %in) {
+ %b_ptr = getelementptr i32 addrspace(1)* %in, i32 1
+ %a = load i32 addrspace(1)* %in
+ %b = load i32 addrspace(1)* %b_ptr
+ %result = add i32 %a, %b
+ store i32 %result, i32 addrspace(1)* %out
+ ret void
+}
More information about the llvm-commits
mailing list