summaryrefslogtreecommitdiff
path: root/test/Bitcode/2006-12-11-Cast-ConstExpr.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/Bitcode/2006-12-11-Cast-ConstExpr.ll')
-rw-r--r--test/Bitcode/2006-12-11-Cast-ConstExpr.ll10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/Bitcode/2006-12-11-Cast-ConstExpr.ll b/test/Bitcode/2006-12-11-Cast-ConstExpr.ll
new file mode 100644
index 0000000000..4c768d63cb
--- /dev/null
+++ b/test/Bitcode/2006-12-11-Cast-ConstExpr.ll
@@ -0,0 +1,10 @@
+; This test ensures that we get a bitcast constant expression in and out,
+; not a sitofp constant expression.
+; RUN: llvm-upgrade < %s | llvm-as | llvm-dis | \
+; RUN: grep {bitcast (}
+
+%G = external global int
+
+float %tryit(int %A) {
+ ret float bitcast( int ptrtoint (int* %G to int) to float)
+}