reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced
    1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
   16
   17
   18
   19
   20
   21
   22
   23
   24
   25
   26
   27
   28
   29
   30
   31
   32
   33
   34
   35
   36
   37
   38
   39
   40
   41
   42
   43
   44
   45
   46
   47
   48
   49
   50
   51
   52
   53
   54
   55
   56
   57
   58
   59
   60
   61
   62
   63
   64
   65
   66
   67
   68
   69
   70
   71
   72
   73
   74
   75
   76
   77
   78
   79
   80
   81
   82
   83
   84
   85
   86
   87
   88
   89
; RUN: llc -march=hexagon -hexagon-gen-mux-threshold=4 < %s | FileCheck %s
; Generate various cmpb instruction followed by if (p0) .. if (!p0)...
target triple = "hexagon"

@Enum_global = external global i8

define i32 @Func_3(i32) nounwind readnone {
entry:
; CHECK-NOT: mux
  %conv = and i32 %0, 255
  %cmp = icmp eq i32 %conv, 2
  %selv = zext i1 %cmp to i32
  ret i32 %selv
}

define i32 @Func_3b(i32) nounwind readonly {
entry:
; CHECK-NOT: mux
  %1 = load i8, i8* @Enum_global, align 1
  %2 = trunc i32 %0 to i8
  %cmp = icmp ne i8 %1, %2
  %selv = zext i1 %cmp to i32
  ret i32 %selv
}

define i32 @Func_3c(i32) nounwind readnone {
entry:
; CHECK-NOT: mux
  %conv = and i32 %0, 255
  %cmp = icmp eq i32 %conv, 2
  %selv = zext i1 %cmp to i32
  ret i32 %selv
}

define i32 @Func_3d(i32) nounwind readonly {
entry:
; CHECK-NOT: mux
  %1 = load i8, i8* @Enum_global, align 1
  %2 = trunc i32 %0 to i8
  %cmp = icmp eq i8 %1, %2
  %selv = zext i1 %cmp to i32
  ret i32 %selv
}

define i32 @Func_3e(i32) nounwind readonly {
entry:
; CHECK-NOT: mux
  %1 = load i8, i8* @Enum_global, align 1
  %2 = trunc i32 %0 to i8
  %cmp = icmp eq i8 %1, %2
  %selv = zext i1 %cmp to i32
  ret i32 %selv
}

define i32 @Func_3f(i32) nounwind readnone {
entry:
; CHECK-NOT: mux
  %conv = and i32 %0, 255
  %cmp = icmp ugt i32 %conv, 2
  %selv = zext i1 %cmp to i32
  ret i32 %selv
}

define i32 @Func_3g(i32) nounwind readnone {
entry:
; CHECK-NOT: mux
  %conv = and i32 %0, 255
  %cmp = icmp ult i32 %conv, 3
  %selv = zext i1 %cmp to i32
  ret i32 %selv
}

define i32 @Func_3h(i32) nounwind readnone {
entry:
; CHECK-NOT: mux
  %conv = and i32 %0, 254
  %cmp = icmp ult i32 %conv, 2
  %selv = zext i1 %cmp to i32
  ret i32 %selv
}

define i32 @Func_3i(i32) nounwind readnone {
entry:
; CHECK-NOT: mux
  %conv = and i32 %0, 254
  %cmp = icmp ugt i32 %conv, 1
  %selv = zext i1 %cmp to i32
  ret i32 %selv
}