blob: 2f9c0c7371c573873de41a7d29103d3be63f15f6 [file] [log] [blame]
Dan Gohman18800922009-09-11 18:01:28 +00001; RUN: opt < %s -loop-extract -disable-output
Chris Lattnerfec74e72004-03-15 00:08:49 +00002; This testcase is failing the loop extractor because not all exit blocks
3; are dominated by all of the live-outs.
4
Tanya Lattner5640bd12008-03-01 09:15:35 +00005define i32 @ab(i32 %alpha, i32 %beta) {
Chris Lattnerfec74e72004-03-15 00:08:49 +00006entry:
Tanya Lattner5640bd12008-03-01 09:15:35 +00007 br label %loopentry.1.preheader
Chris Lattnerfec74e72004-03-15 00:08:49 +00008
Tanya Lattner5640bd12008-03-01 09:15:35 +00009loopentry.1.preheader: ; preds = %entry
10 br label %loopentry.1
Chris Lattnerfec74e72004-03-15 00:08:49 +000011
Tanya Lattner5640bd12008-03-01 09:15:35 +000012loopentry.1: ; preds = %no_exit.1, %loopentry.1.preheader
13 br i1 false, label %no_exit.1, label %loopexit.0.loopexit1
Chris Lattnerfec74e72004-03-15 00:08:49 +000014
Tanya Lattner5640bd12008-03-01 09:15:35 +000015no_exit.1: ; preds = %loopentry.1
David Blaikiea79ac142015-02-27 21:17:42 +000016 %tmp.53 = load i32, i32* null ; <i32> [#uses=1]
Tanya Lattner5640bd12008-03-01 09:15:35 +000017 br i1 false, label %shortcirc_next.2, label %loopentry.1
Chris Lattnerfec74e72004-03-15 00:08:49 +000018
Tanya Lattner5640bd12008-03-01 09:15:35 +000019shortcirc_next.2: ; preds = %no_exit.1
20 %tmp.563 = call i32 @wins( i32 0, i32 %tmp.53, i32 3 ) ; <i32> [#uses=0]
21 ret i32 0
Chris Lattnerfec74e72004-03-15 00:08:49 +000022
Tanya Lattner5640bd12008-03-01 09:15:35 +000023loopexit.0.loopexit1: ; preds = %loopentry.1
24 br label %loopexit.0
Chris Lattnerfec74e72004-03-15 00:08:49 +000025
Tanya Lattner5640bd12008-03-01 09:15:35 +000026loopexit.0: ; preds = %loopexit.0.loopexit1
27 ret i32 0
Chris Lattnerfec74e72004-03-15 00:08:49 +000028}
29
Tanya Lattner5640bd12008-03-01 09:15:35 +000030declare i32 @wins(i32, i32, i32)
Chris Lattnerfec74e72004-03-15 00:08:49 +000031
Tanya Lattner5640bd12008-03-01 09:15:35 +000032declare i16 @ab_code()
33