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
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
# RUN: llc -O0 -march=aarch64 -run-pass=legalizer -global-isel-abort=1 %s -o - | FileCheck %s
---
name:            test_icmp
body:             |
  bb.0.entry:
    ; CHECK-LABEL: name: test_icmp
    ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x0
    ; CHECK: [[COPY1:%[0-9]+]]:_(s64) = COPY $x0
    ; CHECK: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(sge), [[COPY]](s64), [[COPY1]]
    ; CHECK: [[COPY2:%[0-9]+]]:_(s32) = COPY [[ICMP]](s32)
    ; CHECK: $w0 = COPY [[COPY2]](s32)
    ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 255
    ; CHECK: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[COPY]](s64)
    ; CHECK: [[AND:%[0-9]+]]:_(s32) = G_AND [[TRUNC]], [[C]]
    ; CHECK: [[TRUNC1:%[0-9]+]]:_(s32) = G_TRUNC [[COPY1]](s64)
    ; CHECK: [[AND1:%[0-9]+]]:_(s32) = G_AND [[TRUNC1]], [[C]]
    ; CHECK: [[ICMP1:%[0-9]+]]:_(s32) = G_ICMP intpred(ult), [[AND]](s32), [[AND1]]
    ; CHECK: [[COPY3:%[0-9]+]]:_(s32) = COPY [[ICMP1]](s32)
    ; CHECK: $w0 = COPY [[COPY3]](s32)
    ; CHECK: [[INTTOPTR:%[0-9]+]]:_(p0) = G_INTTOPTR [[COPY]](s64)
    ; CHECK: [[ICMP2:%[0-9]+]]:_(s32) = G_ICMP intpred(eq), [[INTTOPTR]](p0), [[INTTOPTR]]
    ; CHECK: [[COPY4:%[0-9]+]]:_(s32) = COPY [[ICMP2]](s32)
    ; CHECK: $w0 = COPY [[COPY4]](s32)
    %0:_(s64) = COPY $x0
    %1:_(s64) = COPY $x0
    %2:_(s8) = G_TRUNC %0(s64)
    %3:_(s8) = G_TRUNC %1(s64)
    %4:_(s1) = G_ICMP intpred(sge), %0(s64), %1
    %11:_(s32) = G_ANYEXT %4(s1)
    $w0 = COPY %11(s32)
    %8:_(s1) = G_ICMP intpred(ult), %2(s8), %3
    %12:_(s32) = G_ANYEXT %8(s1)
    $w0 = COPY %12(s32)
    %9:_(p0) = G_INTTOPTR %0(s64)
    %10:_(s1) = G_ICMP intpred(eq), %9(p0), %9
    %14:_(s32) = G_ANYEXT %10(s1)
    $w0 = COPY %14(s32)

...
---
name:            test_s128
alignment:       4
tracksRegLiveness: true
body:             |
  ; CHECK-LABEL: name: test_s128
  ; CHECK: bb.0:
  ; CHECK:   successors: %bb.1(0x40000000), %bb.2(0x40000000)
  ; CHECK:   [[DEF:%[0-9]+]]:_(s64) = G_IMPLICIT_DEF
  ; CHECK:   [[DEF1:%[0-9]+]]:_(s64) = G_IMPLICIT_DEF
  ; CHECK:   [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 0
  ; CHECK:   [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 4294967296
  ; CHECK:   [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ult), [[DEF1]](s64), [[C1]]
  ; CHECK:   [[ICMP1:%[0-9]+]]:_(s32) = G_ICMP intpred(eq), [[DEF1]](s64), [[C1]]
  ; CHECK:   [[TRUNC:%[0-9]+]]:_(s1) = G_TRUNC [[ICMP1]](s32)
  ; CHECK:   [[ICMP2:%[0-9]+]]:_(s32) = G_ICMP intpred(ult), [[DEF]](s64), [[C]]
  ; CHECK:   [[COPY:%[0-9]+]]:_(s32) = COPY [[ICMP2]](s32)
  ; CHECK:   [[COPY1:%[0-9]+]]:_(s32) = COPY [[ICMP]](s32)
  ; CHECK:   [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[TRUNC]](s1), [[COPY]], [[COPY1]]
  ; CHECK:   [[TRUNC1:%[0-9]+]]:_(s1) = G_TRUNC [[SELECT]](s32)
  ; CHECK:   G_BRCOND [[TRUNC1]](s1), %bb.1
  ; CHECK:   G_BR %bb.2
  ; CHECK: bb.1:
  ; CHECK:   successors:
  ; CHECK: bb.2:
  ; CHECK:   RET_ReallyLR
  bb.1:
    %0:_(s128) = G_IMPLICIT_DEF
    %1:_(s128) = G_CONSTANT i128 79228162514264337593543950336
    %3:_(s1) = G_CONSTANT i1 true
    %2:_(s1) = G_ICMP intpred(ult), %0(s128), %1
    G_BRCOND %2(s1), %bb.2
    G_BR %bb.3

  bb.2:
    successors:


  bb.3:
    RET_ReallyLR

...