summaryrefslogtreecommitdiff
path: root/test
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
commitc19ee610f6ca1ff90b8298160c78283acb9cbaa1 (patch)
tree09d6f121d8461291c6f1beb9d2d49434c6a009e2 /test
parentcea01bfe7d764714d13079014f7d812c8b66b202 (diff)
downloadllvm-c19ee610f6ca1ff90b8298160c78283acb9cbaa1.tar.gz
llvm-c19ee610f6ca1ff90b8298160c78283acb9cbaa1.tar.bz2
llvm-c19ee610f6ca1ff90b8298160c78283acb9cbaa1.tar.xz
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77818 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/CodeGen/X86/ptrtoint-constexpr.ll8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/CodeGen/X86/ptrtoint-constexpr.ll b/test/CodeGen/X86/ptrtoint-constexpr.ll
new file mode 100644
index 0000000000..bd6aa0779e
--- /dev/null
+++ b/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