1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py 2# RUN: llc -O0 -run-pass=legalizer %s -o - | FileCheck %s 3 4--- | 5 target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128" 6 target triple = "aarch64--" 7 define void @test_icmp() { 8 entry: 9 ret void 10 } 11... 12 13--- 14name: test_icmp 15registers: 16 - { id: 0, class: _ } 17 - { id: 1, class: _ } 18 - { id: 2, class: _ } 19 - { id: 3, class: _ } 20 - { id: 4, class: _ } 21 - { id: 5, class: _ } 22 - { id: 6, class: _ } 23 - { id: 7, class: _ } 24 - { id: 8, class: _ } 25 - { id: 9, class: _ } 26 - { id: 10, class: _ } 27 - { id: 11, class: _ } 28 - { id: 12, class: _ } 29 - { id: 13, class: _ } 30 - { id: 14, class: _ } 31body: | 32 bb.0.entry: 33 liveins: $x0, $x1, $x2, $x3 34 ; CHECK-LABEL: name: test_icmp 35 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x0 36 ; CHECK: [[COPY1:%[0-9]+]]:_(s64) = COPY $x0 37 ; CHECK: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(sge), [[COPY]](s64), [[COPY1]] 38 ; CHECK: [[COPY2:%[0-9]+]]:_(s32) = COPY [[ICMP]](s32) 39 ; CHECK: $w0 = COPY [[COPY2]](s32) 40 ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 255 41 ; CHECK: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[COPY]](s64) 42 ; CHECK: [[AND:%[0-9]+]]:_(s32) = G_AND [[TRUNC]], [[C]] 43 ; CHECK: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 255 44 ; CHECK: [[TRUNC1:%[0-9]+]]:_(s32) = G_TRUNC [[COPY1]](s64) 45 ; CHECK: [[AND1:%[0-9]+]]:_(s32) = G_AND [[TRUNC1]], [[C1]] 46 ; CHECK: [[ICMP1:%[0-9]+]]:_(s32) = G_ICMP intpred(ult), [[AND]](s32), [[AND1]] 47 ; CHECK: [[COPY3:%[0-9]+]]:_(s32) = COPY [[ICMP1]](s32) 48 ; CHECK: $w0 = COPY [[COPY3]](s32) 49 ; CHECK: [[INTTOPTR:%[0-9]+]]:_(p0) = G_INTTOPTR [[COPY]](s64) 50 ; CHECK: [[ICMP2:%[0-9]+]]:_(s32) = G_ICMP intpred(eq), [[INTTOPTR]](p0), [[INTTOPTR]] 51 ; CHECK: [[COPY4:%[0-9]+]]:_(s32) = COPY [[ICMP2]](s32) 52 ; CHECK: $w0 = COPY [[COPY4]](s32) 53 %0(s64) = COPY $x0 54 %1(s64) = COPY $x0 55 56 %2(s8) = G_TRUNC %0 57 %3(s8) = G_TRUNC %1 58 59 %4(s1) = G_ICMP intpred(sge), %0, %1 60 %11(s32) = G_ANYEXT %4 61 $w0 = COPY %11 62 63 %8(s1) = G_ICMP intpred(ult), %2, %3 64 %12(s32) = G_ANYEXT %8 65 $w0 = COPY %12 66 67 %9(p0) = G_INTTOPTR %0(s64) 68 %10(s1) = G_ICMP intpred(eq), %9(p0), %9(p0) 69 %14(s32) = G_ANYEXT %10 70 $w0 = COPY %14 71... 72