From 37d2cd7cd60fb1bd54d1eb630f1d434d22fe1fdd Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 14 Nov 2004 06:02:46 +0000 Subject: [PATCH] New testcase llvm-svn: 17729 --- .../Transforms/IPConstantProp/return-constant.ll | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 llvm/test/Regression/Transforms/IPConstantProp/return-constant.ll diff --git a/llvm/test/Regression/Transforms/IPConstantProp/return-constant.ll b/llvm/test/Regression/Transforms/IPConstantProp/return-constant.ll new file mode 100644 index 000000000000..4ffff22e5d1e --- /dev/null +++ b/llvm/test/Regression/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 +}