1; RUN: llc -march=hexagon -hexagon-gen-mux-threshold=0 < %s | FileCheck %s --check-prefix=CHECK0
2; RUN: llc -march=hexagon -hexagon-gen-mux-threshold=4 < %s | FileCheck %s --check-prefix=CHECK4
3
4; Generate mux with threshold = 0:
5; CHECK0: [[R0:r[0-9]+]] = add(r0,#-48)
6; CHECK0: [[P0:p[0-3]]] = cmpb.gtu([[R0]],#9)
7; CHECK0: r0 = mux([[P0]],#0,#1)
8
9; No mux for threshold = 4:
10; CHECK4-NOT: mux
11
12define zeroext i8 @f0(i8 zeroext %a0) #0 {
13b0:
14  %v0 = add i8 %a0, -48
15  %v1 = icmp ult i8 %v0, 10
16  %v2 = zext i1 %v1 to i8
17  ret i8 %v2
18}
19
20attributes #0 = { nounwind readnone }
21