summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/X86/pic-cpool.ll
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/CodeGen/X86/pic-cpool.ll')
-rw-r--r--llvm/test/CodeGen/X86/pic-cpool.ll14
1 files changed, 14 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/pic-cpool.ll b/llvm/test/CodeGen/X86/pic-cpool.ll
new file mode 100644
index 00000000000..cac31ed2ad7
--- /dev/null
+++ b/llvm/test/CodeGen/X86/pic-cpool.ll
@@ -0,0 +1,14 @@
+; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic \
+; RUN: -o %t -f
+; RUN: grep _GLOBAL_OFFSET_TABLE_ %t
+; RUN: grep piclabel %t | count 3
+; RUN: grep GOTOFF %t | count 2
+; RUN: grep CPI %t | count 4
+
+define double @foo(i32 %a.u) {
+entry:
+ %tmp = icmp eq i32 %a.u,0
+ %retval = select i1 %tmp, double 4.561230e+02, double 1.234560e+02
+ ret double %retval
+}
+
OpenPOWER on IntegriCloud