aboutsummaryrefslogtreecommitdiffstats
path: root/test/Transforms/IPConstantProp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-11-14 06:02:46 +0000
committerChris Lattner <sabre@nondot.org>2004-11-14 06:02:46 +0000
commit0240a377d87c7e0f8588b764dc83b3b2c7bbd4db (patch)
tree593f81df38f41abe6d29d62fe7d23ecae2efe341 /test/Transforms/IPConstantProp
parent04fe7477b17fc5d2afc89fab2bfbb8d9cabadfcb (diff)
downloadexternal_llvm-0240a377d87c7e0f8588b764dc83b3b2c7bbd4db.zip
external_llvm-0240a377d87c7e0f8588b764dc83b3b2c7bbd4db.tar.gz
external_llvm-0240a377d87c7e0f8588b764dc83b3b2c7bbd4db.tar.bz2
New testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17729 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/IPConstantProp')
-rw-r--r--test/Transforms/IPConstantProp/return-constant.ll16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/Transforms/IPConstantProp/return-constant.ll b/test/Transforms/IPConstantProp/return-constant.ll
new file mode 100644
index 0000000..4ffff22
--- /dev/null
+++ b/test/Transforms/IPConstantProp/return-constant.ll
@@ -0,0 +1,16 @@
+; RUN: llvm-as < %s | opt -ipconstprop -instcombine | llvm-dis
+implementation
+
+internal int %foo(bool %C) {
+ br bool %C, label %T, label %F
+T:
+ ret int 52
+F:
+ ret int 52
+}
+
+bool %caller(bool %C) {
+ %X = call int %foo(bool %C)
+ %Y = cast int %X to bool
+ ret bool %Y
+}