summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/X86/ptrtoint-constexpr.ll
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-08-01 22:25:12 +0000
committerChris Lattner <sabre@nondot.org>2009-08-01 22:25:12 +0000
commitb4b1012d2910775bec919f7c8bf5b6f3db39fc51 (patch)
tree146f2e106a2a84ef75403b04b73e7910fea4c93c /llvm/test/CodeGen/X86/ptrtoint-constexpr.ll
parent5aa4952625b007e5d5a26772d4f654f2e74e0175 (diff)
downloadbcm5719-llvm-b4b1012d2910775bec919f7c8bf5b6f3db39fc51.tar.gz
bcm5719-llvm-b4b1012d2910775bec919f7c8bf5b6f3db39fc51.zip
fix a problem Eli noticed where we would compile the attached ptrtoint
to: .quad X even on a 32-bit system, where X is not 64-bits. There isn't much that we can do here, so we just print: .quad ((X) & 4294967295) instead. llvm-svn: 77818
Diffstat (limited to 'llvm/test/CodeGen/X86/ptrtoint-constexpr.ll')
-rw-r--r--llvm/test/CodeGen/X86/ptrtoint-constexpr.ll8
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/ptrtoint-constexpr.ll b/llvm/test/CodeGen/X86/ptrtoint-constexpr.ll
new file mode 100644
index 00000000000..bd6aa0779e3
--- /dev/null
+++ b/llvm/test/CodeGen/X86/ptrtoint-constexpr.ll
@@ -0,0 +1,8 @@
+; RUN: llvm-as < %s | llc -mtriple=i386-linux | FileCheck %s
+ %union.x = type { i64 }
+
+; CHECK: .globl r
+; CHECK: r:
+; CHECK: .quad ((r) & 4294967295)
+
+@r = global %union.x { i64 ptrtoint (%union.x* @r to i64) }, align 4
OpenPOWER on IntegriCloud