1 ; RUN: llc -march=hexagon < %s | FileCheck %s
2 ; Check that we generate compare to general register.
4 define i32 @compare1(i32 %a) nounwind {
5 ; CHECK: r{{[0-9]+}} = cmp.eq(r{{[0-9]+}},#120)
7 %cmp = icmp eq i32 %a, 120
8 %conv = zext i1 %cmp to i32
12 define i32 @compare2(i32 %a) nounwind readnone {
13 ; CHECK: r{{[0-9]+}} = !cmp.eq(r{{[0-9]+}},#120)
15 %cmp = icmp ne i32 %a, 120
16 %conv = zext i1 %cmp to i32
20 define i32 @compare3(i32 %a, i32 %b) nounwind readnone {
21 ; CHECK: r{{[0-9]+}} = cmp.eq(r{{[0-9]+}},r{{[0-9]+}})
23 %cmp = icmp eq i32 %a, %b
24 %conv = zext i1 %cmp to i32
28 define i32 @compare4(i32 %a, i32 %b) nounwind readnone {
29 ; CHECK: r{{[0-9]+}} = !cmp.eq(r{{[0-9]+}},r{{[0-9]+}})
31 %cmp = icmp ne i32 %a, %b
32 %conv = zext i1 %cmp to i32