blob: 5db1ced473f6a576a47d5b20d2aaba0b61976b86 [file] [log] [blame]
Chandler Carruth1353f9a2017-04-27 18:45:20 +00001; RUN: opt < %s -simple-loop-unswitch -instcombine -gvn -disable-output
Alina Sbirleaa2eebb82018-12-04 14:23:37 +00002; RUN: opt < %s -simple-loop-unswitch -enable-mssa-loop-dependency=true -verify-memoryssa -instcombine -gvn -disable-output
Chandler Carruth1353f9a2017-04-27 18:45:20 +00003; PR2372
4target triple = "i386-pc-linux-gnu"
5
6define i32 @func_3(i16 signext %p_5, i16 signext %p_6) nounwind {
7entry:
8 %tmp3 = icmp eq i16 %p_5, 0 ; <i1> [#uses=1]
9 %tmp1314 = sext i16 %p_6 to i32 ; <i32> [#uses=1]
10 %tmp28 = icmp ugt i32 %tmp1314, 3 ; <i1> [#uses=1]
11 %bothcond = or i1 %tmp28, false ; <i1> [#uses=1]
12 br label %bb
13bb: ; preds = %bb54, %entry
14 br i1 %tmp3, label %bb54, label %bb5
15bb5: ; preds = %bb
16 br i1 %bothcond, label %bb54, label %bb31
17bb31: ; preds = %bb5
18 br label %bb54
19bb54: ; preds = %bb31, %bb5, %bb
20 br i1 false, label %bb64, label %bb
21bb64: ; preds = %bb54
22 %tmp6566 = sext i16 %p_6 to i32 ; <i32> [#uses=1]
23 %tmp68 = tail call i32 (...) @func_18( i32 1, i32 %tmp6566, i32 1 ) nounwind ; <i32> [#uses=0]
24 ret i32 undef
25}
26
27declare i32 @func_18(...)