1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=aarch64 -run-pass=legalizer %s -o - | FileCheck %s
7 ; CHECK-LABEL: name: test_icmp
8 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x0
9 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x0
10 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[COPY]](s64)
11 ; CHECK-NEXT: [[TRUNC1:%[0-9]+]]:_(s32) = G_TRUNC [[COPY1]](s64)
12 ; CHECK-NEXT: [[FCMP:%[0-9]+]]:_(s32) = G_FCMP floatpred(oge), [[COPY]](s64), [[COPY1]]
13 ; CHECK-NEXT: $w0 = COPY [[FCMP]](s32)
14 ; CHECK-NEXT: [[FCMP1:%[0-9]+]]:_(s32) = G_FCMP floatpred(uno), [[TRUNC]](s32), [[TRUNC1]]
15 ; CHECK-NEXT: $w0 = COPY [[FCMP1]](s32)
18 %2:_(s32) = G_TRUNC %0(s64)
19 %3:_(s32) = G_TRUNC %1(s64)
20 %4:_(s32) = G_FCMP floatpred(oge), %0(s64), %1
22 %5:_(s32) = G_FCMP floatpred(uno), %2(s32), %3
34 ; CHECK-LABEL: name: legalize_v8s16
35 ; CHECK: liveins: $q0, $q1
37 ; CHECK-NEXT: %lhs:_(<8 x s16>) = COPY $q0
38 ; CHECK-NEXT: %rhs:_(<8 x s16>) = COPY $q1
39 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(<4 x s16>), [[UV1:%[0-9]+]]:_(<4 x s16>) = G_UNMERGE_VALUES %lhs(<8 x s16>)
40 ; CHECK-NEXT: [[FPEXT:%[0-9]+]]:_(<4 x s32>) = G_FPEXT [[UV]](<4 x s16>)
41 ; CHECK-NEXT: [[FPEXT1:%[0-9]+]]:_(<4 x s32>) = G_FPEXT [[UV1]](<4 x s16>)
42 ; CHECK-NEXT: [[UV2:%[0-9]+]]:_(<4 x s16>), [[UV3:%[0-9]+]]:_(<4 x s16>) = G_UNMERGE_VALUES %rhs(<8 x s16>)
43 ; CHECK-NEXT: [[FPEXT2:%[0-9]+]]:_(<4 x s32>) = G_FPEXT [[UV2]](<4 x s16>)
44 ; CHECK-NEXT: [[FPEXT3:%[0-9]+]]:_(<4 x s32>) = G_FPEXT [[UV3]](<4 x s16>)
45 ; CHECK-NEXT: [[FCMP:%[0-9]+]]:_(<4 x s32>) = G_FCMP floatpred(oeq), [[FPEXT]](<4 x s32>), [[FPEXT2]]
46 ; CHECK-NEXT: [[FCMP1:%[0-9]+]]:_(<4 x s32>) = G_FCMP floatpred(oeq), [[FPEXT1]](<4 x s32>), [[FPEXT3]]
47 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(<4 x s16>) = G_TRUNC [[FCMP]](<4 x s32>)
48 ; CHECK-NEXT: [[TRUNC1:%[0-9]+]]:_(<4 x s16>) = G_TRUNC [[FCMP1]](<4 x s32>)
49 ; CHECK-NEXT: %fcmp:_(<8 x s16>) = G_CONCAT_VECTORS [[TRUNC]](<4 x s16>), [[TRUNC1]](<4 x s16>)
50 ; CHECK-NEXT: $q0 = COPY %fcmp(<8 x s16>)
51 ; CHECK-NEXT: RET_ReallyLR implicit $q0
52 %lhs:_(<8 x s16>) = COPY $q0
53 %rhs:_(<8 x s16>) = COPY $q1
54 %fcmp:_(<8 x s16>) = G_FCMP floatpred(oeq), %lhs(<8 x s16>), %rhs
55 $q0 = COPY %fcmp(<8 x s16>)
56 RET_ReallyLR implicit $q0
67 ; CHECK-LABEL: name: legalize_v4s16
68 ; CHECK: liveins: $d0, $d1
70 ; CHECK-NEXT: %lhs:_(<4 x s16>) = COPY $d0
71 ; CHECK-NEXT: %rhs:_(<4 x s16>) = COPY $d1
72 ; CHECK-NEXT: [[FPEXT:%[0-9]+]]:_(<4 x s32>) = G_FPEXT %lhs(<4 x s16>)
73 ; CHECK-NEXT: [[FPEXT1:%[0-9]+]]:_(<4 x s32>) = G_FPEXT %rhs(<4 x s16>)
74 ; CHECK-NEXT: [[FCMP:%[0-9]+]]:_(<4 x s32>) = G_FCMP floatpred(oeq), [[FPEXT]](<4 x s32>), [[FPEXT1]]
75 ; CHECK-NEXT: %fcmp:_(<4 x s16>) = G_TRUNC [[FCMP]](<4 x s32>)
76 ; CHECK-NEXT: $d0 = COPY %fcmp(<4 x s16>)
77 ; CHECK-NEXT: RET_ReallyLR implicit $d0
78 %lhs:_(<4 x s16>) = COPY $d0
79 %rhs:_(<4 x s16>) = COPY $d1
80 %fcmp:_(<4 x s16>) = G_FCMP floatpred(oeq), %lhs(<4 x s16>), %rhs
81 $d0 = COPY %fcmp(<4 x s16>)
82 RET_ReallyLR implicit $d0