aboutsummaryrefslogtreecommitdiffstats
path: root/test/Bytecode
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2006-12-11 23:19:53 +0000
committerReid Spencer <rspencer@reidspencer.com>2006-12-11 23:19:53 +0000
commit1565491af254368a2b016b5886cd6f5c46d36993 (patch)
treefbc2102b9c464e733317ff685f6773fb55bcac05 /test/Bytecode
parent442b9a69811b68bc169b3eb9305fca7adfb325eb (diff)
downloadexternal_llvm-1565491af254368a2b016b5886cd6f5c46d36993.zip
external_llvm-1565491af254368a2b016b5886cd6f5c46d36993.tar.gz
external_llvm-1565491af254368a2b016b5886cd6f5c46d36993.tar.bz2
Test case for ensuring correct reading back of cast constant expressions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32449 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Bytecode')
-rw-r--r--test/Bytecode/2006-12-11-Cast-ConstExpr.ll8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/Bytecode/2006-12-11-Cast-ConstExpr.ll b/test/Bytecode/2006-12-11-Cast-ConstExpr.ll
new file mode 100644
index 0000000..6bd1603
--- /dev/null
+++ b/test/Bytecode/2006-12-11-Cast-ConstExpr.ll
@@ -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)
+}