Test case for ensuring correct reading back of cast constant expressions.
authorReid Spencer <rspencer@reidspencer.com>
Mon, 11 Dec 2006 23:19:53 +0000 (23:19 +0000)
committerReid Spencer <rspencer@reidspencer.com>
Mon, 11 Dec 2006 23:19:53 +0000 (23:19 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32449 91177308-0d34-0410-b5e6-96231b3b80d8

test/Bytecode/2006-12-11-Cast-ConstExpr.ll [new file with mode: 0644]

diff --git a/test/Bytecode/2006-12-11-Cast-ConstExpr.ll b/test/Bytecode/2006-12-11-Cast-ConstExpr.ll
new file mode 100644 (file)
index 0000000..6bd1603
--- /dev/null
@@ -0,0 +1,8 @@
+; This test ensures that we get a bitcast constant expression in and out,
+; not a sitofp constant expression. 
+; RUN: llvm-as < %s | llvm-dis | grep 'bitcast ('
+%G = external global int
+
+float %tryit(int %A) {
+   ret float bitcast( int ptrtoint (int* %G to int) to float)
+}