1; RUN: opt -hexagon-loop-idiom -mtriple hexagon-unknown-elf < %s 2; RUN: opt -p hexagon-loop-idiom -mtriple hexagon-unknown-elf < %s 3; REQUIRES: asserts 4 5target triple = "hexagon" 6 7; Function Attrs: nounwind 8define void @fred(i8 zeroext %L) #0 { 9entry: 10 br i1 undef, label %if.end53, label %while.body37 11 12while.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 20 21if.end53: ; preds = %while.body37, %entry 22 ret void 23} 24 25attributes #0 = { nounwind } 26