1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -O0 -march=aarch64 -run-pass=legalizer %s -o - | FileCheck %s
7 ; CHECK-LABEL: name: test_icmp
8 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x0
9 ; CHECK: [[COPY1:%[0-9]+]]:_(s64) = COPY $x0
10 ; CHECK: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(sge), [[COPY]](s64), [[COPY1]]
11 ; CHECK: [[COPY2:%[0-9]+]]:_(s32) = COPY [[ICMP]](s32)
12 ; CHECK: $w0 = COPY [[COPY2]](s32)
13 ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 255
14 ; CHECK: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[COPY]](s64)
15 ; CHECK: [[AND:%[0-9]+]]:_(s32) = G_AND [[TRUNC]], [[C]]
16 ; CHECK: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 255
17 ; CHECK: [[TRUNC1:%[0-9]+]]:_(s32) = G_TRUNC [[COPY1]](s64)
18 ; CHECK: [[AND1:%[0-9]+]]:_(s32) = G_AND [[TRUNC1]], [[C1]]
19 ; CHECK: [[ICMP1:%[0-9]+]]:_(s32) = G_ICMP intpred(ult), [[AND]](s32), [[AND1]]
20 ; CHECK: [[COPY3:%[0-9]+]]:_(s32) = COPY [[ICMP1]](s32)
21 ; CHECK: $w0 = COPY [[COPY3]](s32)
22 ; CHECK: [[INTTOPTR:%[0-9]+]]:_(p0) = G_INTTOPTR [[COPY]](s64)
23 ; CHECK: [[ICMP2:%[0-9]+]]:_(s32) = G_ICMP intpred(eq), [[INTTOPTR]](p0), [[INTTOPTR]]
24 ; CHECK: [[COPY4:%[0-9]+]]:_(s32) = COPY [[ICMP2]](s32)
25 ; CHECK: $w0 = COPY [[COPY4]](s32)
28 %2:_(s8) = G_TRUNC %0(s64)
29 %3:_(s8) = G_TRUNC %1(s64)
30 %4:_(s1) = G_ICMP intpred(sge), %0(s64), %1
31 %11:_(s32) = G_ANYEXT %4(s1)
33 %8:_(s1) = G_ICMP intpred(ult), %2(s8), %3
34 %12:_(s32) = G_ANYEXT %8(s1)
36 %9:_(p0) = G_INTTOPTR %0(s64)
37 %10:_(s1) = G_ICMP intpred(eq), %9(p0), %9
38 %14:_(s32) = G_ANYEXT %10(s1)