diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2013-04-14 04:35:16 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2013-04-14 04:35:16 +0000 |
commit | e0fc832b77c77750a4a98cb6ff2c3c383c60f5ef (patch) | |
tree | 685a30e3d1c55561cdd19d6edae9886d579ed52e /llvm/test/CodeGen/SPARC/constpool.ll | |
parent | 0b9cf8567b3c13c0f69fb7e4ee2dc061cb2acd2a (diff) | |
download | bcm5719-llvm-e0fc832b77c77750a4a98cb6ff2c3c383c60f5ef.tar.gz bcm5719-llvm-e0fc832b77c77750a4a98cb6ff2c3c383c60f5ef.zip |
Also put target flags on SPARC constant pool references.
Constant pool entries are accessed exactly the same way as global
variables.
llvm-svn: 179471
Diffstat (limited to 'llvm/test/CodeGen/SPARC/constpool.ll')
-rw-r--r-- | llvm/test/CodeGen/SPARC/constpool.ll | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/SPARC/constpool.ll b/llvm/test/CodeGen/SPARC/constpool.ll new file mode 100644 index 00000000000..76c485ea196 --- /dev/null +++ b/llvm/test/CodeGen/SPARC/constpool.ll @@ -0,0 +1,30 @@ +; RUN: llc < %s -march=sparc -relocation-model=static -code-model=small | FileCheck --check-prefix=abs32 %s +; RUN: llc < %s -march=sparcv9 -relocation-model=static -code-model=small | FileCheck --check-prefix=abs32 %s +; RUN: llc < %s -march=sparc -relocation-model=pic -code-model=medium | FileCheck --check-prefix=v8pic32 %s +; RUN: llc < %s -march=sparcv9 -relocation-model=pic -code-model=medium | FileCheck --check-prefix=v9pic32 %s + +define float @floatCP() { +entry: + ret float 1.000000e+00 +} + +; abs32: floatCP +; abs32: sethi %hi(.LCPI0_0), %[[R:[gilo][0-7]]] +; abs32: ld [%[[R]]+%lo(.LCPI0_0)], %f +; abs32: jmp %i7+8 + +; v8pic32: floatCP +; v8pic32: _GLOBAL_OFFSET_TABLE_ +; v8pic32: sethi %hi(.LCPI0_0), %[[R1:[gilo][0-7]]] +; v8pic32: add %[[R1]], %lo(.LCPI0_0), %[[Goffs:[gilo][0-7]]] +; v8pic32: ld [%[[GOT:[gilo][0-7]]]+%[[Goffs]]], %[[Gaddr:[gilo][0-7]]] +; v8pic32: ld [%[[Gaddr]]], %f0 +; v8pic32: jmp %i7+8 + +; v9pic32: floatCP +; v9pic32: _GLOBAL_OFFSET_TABLE_ +; v9pic32: sethi %hi(.LCPI0_0), %[[R1:[gilo][0-7]]] +; v9pic32: add %[[R1]], %lo(.LCPI0_0), %[[Goffs:[gilo][0-7]]] +; v9pic32: ldx [%[[GOT:[gilo][0-7]]]+%[[Goffs]]], %[[Gaddr:[gilo][0-7]]] +; v9pic32: ld [%[[Gaddr]]], %f1 +; v9pic32: jmp %i7+8 |