From b42ef2dbdb9dc40a4027d9be3cb2e2f62c9978ce Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sat, 23 Aug 2003 23:17:59 +0000 Subject: Add a new switch folding testcase llvm-svn: 8092 --- .../Transforms/SimplifyCFG/2003-08-17-FoldSwitch.ll | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'llvm/test/Regression/Transforms/SimplifyCFG') diff --git a/llvm/test/Regression/Transforms/SimplifyCFG/2003-08-17-FoldSwitch.ll b/llvm/test/Regression/Transforms/SimplifyCFG/2003-08-17-FoldSwitch.ll index 79b55a4c611..71269ecfbdc 100644 --- a/llvm/test/Regression/Transforms/SimplifyCFG/2003-08-17-FoldSwitch.ll +++ b/llvm/test/Regression/Transforms/SimplifyCFG/2003-08-17-FoldSwitch.ll @@ -47,3 +47,14 @@ int %test4(uint %C) { ; Test folding switch -> branch L1: ret int 0 L2: ret int 1 } + +int %test5(uint %C) { + switch uint %C, label %L1 [ ; Can fold into a cond branch! + uint 0, label %L2 + uint 123, label %L1 + ] +L1: ret int 0 +L2: ret int 1 +} + + -- cgit v1.2.3