1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=hexagon < %s | FileCheck %s
4 ; Function Attrs: nounwind readnone
5 define i32 @f0(i32 %a0, i32 %a1) #0 {
7 ; CHECK: // %bb.0: // %b0
9 ; CHECK-NEXT: p0 = tstbit(r0,r1)
12 ; CHECK-NEXT: r0 = mux(p0,#1,#0)
13 ; CHECK-NEXT: jumpr r31
17 %v1 = and i32 %v0, %a0
18 %v2 = icmp ne i32 %v1, 0
19 %v3 = zext i1 %v2 to i32
23 define i64 @is_upper_bit_clear_i64(i64 %x) #0 {
24 ; CHECK-LABEL: is_upper_bit_clear_i64:
27 ; CHECK-NEXT: p0 = !tstbit(r1,#5)
31 ; CHECK-NEXT: r0 = mux(p0,#1,#0)
32 ; CHECK-NEXT: jumpr r31
40 define i64 @is_lower_bit_clear_i64(i64 %x) #0 {
41 ; CHECK-LABEL: is_lower_bit_clear_i64:
44 ; CHECK-NEXT: p0 = !tstbit(r0,#27)
48 ; CHECK-NEXT: r0 = mux(p0,#1,#0)
49 ; CHECK-NEXT: jumpr r31
57 define i32 @is_bit_clear_i32(i32 %x) #0 {
58 ; CHECK-LABEL: is_bit_clear_i32:
61 ; CHECK-NEXT: p0 = !tstbit(r0,#27)
64 ; CHECK-NEXT: r0 = mux(p0,#1,#0)
65 ; CHECK-NEXT: jumpr r31
73 define i16 @is_bit_clear_i16(i16 %x) #0 {
74 ; CHECK-LABEL: is_bit_clear_i16:
77 ; CHECK-NEXT: p0 = !tstbit(r0,#7)
80 ; CHECK-NEXT: r0 = mux(p0,#1,#0)
81 ; CHECK-NEXT: jumpr r31
89 define i8 @is_bit_clear_i8(i8 %x) #0 {
90 ; CHECK-LABEL: is_bit_clear_i8:
93 ; CHECK-NEXT: p0 = !tstbit(r0,#3)
96 ; CHECK-NEXT: r0 = mux(p0,#1,#0)
97 ; CHECK-NEXT: jumpr r31
106 attributes #0 = { nounwind readnone }