1 ; RUN: opt -hexagon-loop-idiom -mtriple hexagon-unknown-elf < %s
2 ; RUN: opt -p hexagon-loop-idiom -mtriple hexagon-unknown-elf < %s
5 target triple = "hexagon"
7 ; Function Attrs: nounwind
8 define void @fred(i8 zeroext %L) #0 {
10 br i1 undef, label %if.end53, label %while.body37
12 while.body37: ; preds = %while.body37, %entry
13 %i.121 = phi i32 [ %inc46, %while.body37 ], [ 0, %entry ]
14 %shl = shl i32 1, %i.121
15 %and39 = and i32 %shl, undef
16 %tobool40 = icmp eq i32 %and39, 0
17 %inc46 = add nuw nsw i32 %i.121, 1
18 %storemerge = select i1 %tobool40, i8 %L, i8 0
19 br i1 undef, label %while.body37, label %if.end53
21 if.end53: ; preds = %while.body37, %entry
25 attributes #0 = { nounwind }