diff options
| author | Samuel Antao <sfantao@us.ibm.com> | 2015-06-30 17:18:00 +0000 |
|---|---|---|
| committer | Samuel Antao <sfantao@us.ibm.com> | 2015-06-30 17:18:00 +0000 |
| commit | 01ee64c2eaf996a5360a4a81f12c260868e107fd (patch) | |
| tree | 16f0dcac84e8cfd3714979f5f8a5cc110e17f23e /llvm/test/CodeGen | |
| parent | e9225da769da84762a0aa27d1f48d85328206af4 (diff) | |
| download | bcm5719-llvm-01ee64c2eaf996a5360a4a81f12c260868e107fd.tar.gz bcm5719-llvm-01ee64c2eaf996a5360a4a81f12c260868e107fd.zip | |
Force relocation mode to be default, regardless of what is passed to the backend.
llvm-svn: 241081
Diffstat (limited to 'llvm/test/CodeGen')
| -rw-r--r-- | llvm/test/CodeGen/NVPTX/globals_lowering.ll | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/NVPTX/globals_lowering.ll b/llvm/test/CodeGen/NVPTX/globals_lowering.ll new file mode 100644 index 00000000000..84c61ef4033 --- /dev/null +++ b/llvm/test/CodeGen/NVPTX/globals_lowering.ll @@ -0,0 +1,15 @@ +; RUN: llc < %s -march=nvptx -mcpu=sm_20 -relocation-model=static | FileCheck %s --check-prefix CHK + +%MyStruct = type { i32, i32, float } +@Gbl = internal addrspace(3) global [1024 x %MyStruct] zeroinitializer + +; CHK-LABEL: foo +define void @foo(float %f) { +entry: + ; CHK: ld.shared.f32 %{{[a-zA-Z0-9]+}}, [Gbl+8]; + %0 = load float, float addrspace(3)* getelementptr inbounds ([1024 x %MyStruct], [1024 x %MyStruct] addrspace(3)* @Gbl, i32 0, i32 0, i32 2) + %add = fadd float %0, %f + ; CHK: st.shared.f32 [Gbl+8], %{{[a-zA-Z0-9]+}}; + store float %add, float addrspace(3)* getelementptr inbounds ([1024 x %MyStruct], [1024 x %MyStruct] addrspace(3)* @Gbl, i32 0, i32 0, i32 2) + ret void +} |

