1 ; RUN: llc -march=hexagon -mcpu=hexagonv5 < %s | FileCheck %s
2 ; Generate various cmpb instruction followed by if (p0) .. if (!p0)...
3 target triple = "hexagon"
5 @Enum_global = external global i8
7 define i32 @Func_3(i32) nounwind readnone {
10 %conv = and i32 %0, 255
11 %cmp = icmp eq i32 %conv, 2
12 %selv = zext i1 %cmp to i32
16 define i32 @Func_3b(i32) nounwind readonly {
19 %1 = load i8* @Enum_global, align 1
20 %2 = trunc i32 %0 to i8
21 %cmp = icmp ne i8 %1, %2
22 %selv = zext i1 %cmp to i32
26 define i32 @Func_3c(i32) nounwind readnone {
29 %conv = and i32 %0, 255
30 %cmp = icmp eq i32 %conv, 2
31 %selv = zext i1 %cmp to i32
35 define i32 @Func_3d(i32) nounwind readonly {
38 %1 = load i8* @Enum_global, align 1
39 %2 = trunc i32 %0 to i8
40 %cmp = icmp eq i8 %1, %2
41 %selv = zext i1 %cmp to i32
45 define i32 @Func_3e(i32) nounwind readonly {
48 %1 = load i8* @Enum_global, align 1
49 %2 = trunc i32 %0 to i8
50 %cmp = icmp eq i8 %1, %2
51 %selv = zext i1 %cmp to i32
55 define i32 @Func_3f(i32) nounwind readnone {
58 %conv = and i32 %0, 255
59 %cmp = icmp ugt i32 %conv, 2
60 %selv = zext i1 %cmp to i32
64 define i32 @Func_3g(i32) nounwind readnone {
67 %conv = and i32 %0, 255
68 %cmp = icmp ult i32 %conv, 3
69 %selv = zext i1 %cmp to i32
73 define i32 @Func_3h(i32) nounwind readnone {
76 %conv = and i32 %0, 254
77 %cmp = icmp ult i32 %conv, 2
78 %selv = zext i1 %cmp to i32
82 define i32 @Func_3i(i32) nounwind readnone {
85 %conv = and i32 %0, 254
86 %cmp = icmp ugt i32 %conv, 1
87 %selv = zext i1 %cmp to i32