[llvm] r223197 - R600/SI: Enable inline assembly
Tom Stellard
thomas.stellard at amd.com
Tue Dec 2 20:08:00 PST 2014
Author: tstellar
Date: Tue Dec 2 22:08:00 2014
New Revision: 223197
URL: http://llvm.org/viewvc/llvm-project?rev=223197&view=rev
Log:
R600/SI: Enable inline assembly
We just needed to remove the assertion in
AMDGPURegisterInfo::getFrameRegister(), which is called when
initializing the parser for inline assembly.
Added:
llvm/trunk/test/CodeGen/R600/inline-asm.ll
Modified:
llvm/trunk/lib/Target/R600/AMDGPURegisterInfo.cpp
Modified: llvm/trunk/lib/Target/R600/AMDGPURegisterInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/R600/AMDGPURegisterInfo.cpp?rev=223197&r1=223196&r2=223197&view=diff
==============================================================================
--- llvm/trunk/lib/Target/R600/AMDGPURegisterInfo.cpp (original)
+++ llvm/trunk/lib/Target/R600/AMDGPURegisterInfo.cpp Tue Dec 2 22:08:00 2014
@@ -42,8 +42,7 @@ void AMDGPURegisterInfo::eliminateFrameI
}
unsigned AMDGPURegisterInfo::getFrameRegister(const MachineFunction &MF) const {
- assert(!"Subroutines not supported yet");
- return 0;
+ return AMDGPU::NoRegister;
}
unsigned AMDGPURegisterInfo::getSubRegFromChannel(unsigned Channel) const {
Added: llvm/trunk/test/CodeGen/R600/inline-asm.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/R600/inline-asm.ll?rev=223197&view=auto
==============================================================================
--- llvm/trunk/test/CodeGen/R600/inline-asm.ll (added)
+++ llvm/trunk/test/CodeGen/R600/inline-asm.ll Tue Dec 2 22:08:00 2014
@@ -0,0 +1,11 @@
+; RUN: llc < %s -march=r600 -mcpu=SI -verify-machineinstrs | FileCheck %s
+
+; CHECK: {{^}}inline_asm:
+; CHECK: s_endpgm
+; CHECK: s_endpgm
+define void @inline_asm(i32 addrspace(1)* %out) {
+entry:
+ store i32 5, i32 addrspace(1)* %out
+ call void asm sideeffect "s_endpgm", ""()
+ ret void
+}
More information about the llvm-commits
mailing list