74 lines · plain
1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py2# RUN: llc -run-pass=aarch64-postlegalizer-combiner -verify-machineinstrs -mtriple aarch64-unknown-unknown %s -o - | FileCheck %s3---4# select (c, x, x) -> x5name: test_combine_select_same_res6legalized: true7body: |8 bb.1:9 liveins: $x0, $x110 ; CHECK-LABEL: name: test_combine_select_same_res11 ; CHECK: liveins: $x0, $x112 ; CHECK-NEXT: {{ $}}13 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY $x014 ; CHECK-NEXT: $x0 = COPY [[COPY]](s64)15 %0:_(s64) = COPY $x016 %1:_(s1) = G_TRUNC %017 %2:_(s64) = G_SELECT %1, %0, %018 $x0 = COPY %2(s64)19...20---21# select (undef, x, y) -> y22name: test_combine_select_undef_res0_res123legalized: true24body: |25 bb.1:26 liveins: $x0, $x127 ; CHECK-LABEL: name: test_combine_select_undef_res0_res128 ; CHECK: liveins: $x0, $x129 ; CHECK-NEXT: {{ $}}30 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY $x131 ; CHECK-NEXT: $x0 = COPY [[COPY]](s64)32 %0:_(s64) = COPY $x033 %1:_(s64) = COPY $x134 %2:_(s1) = G_IMPLICIT_DEF35 %3:_(s64) = G_SELECT %2, %0, %136 $x0 = COPY %3(s64)37...38---39# select (false, x, y) -> y40name: test_combine_select_false_res0_res141legalized: true42body: |43 bb.1:44 liveins: $x0, $x145 ; CHECK-LABEL: name: test_combine_select_false_res0_res146 ; CHECK: liveins: $x0, $x147 ; CHECK-NEXT: {{ $}}48 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY $x149 ; CHECK-NEXT: $x0 = COPY [[COPY]](s64)50 %0:_(s64) = COPY $x051 %1:_(s64) = COPY $x152 %2:_(s1) = G_CONSTANT i1 false53 %3:_(s64) = G_SELECT %2, %0, %154 $x0 = COPY %3(s64)55...56---57# select (true, x, y) -> x58name: test_combine_select_true_res0_res159legalized: true60body: |61 bb.1:62 liveins: $x0, $x163 ; CHECK-LABEL: name: test_combine_select_true_res0_res164 ; CHECK: liveins: $x0, $x165 ; CHECK-NEXT: {{ $}}66 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY $x067 ; CHECK-NEXT: $x0 = COPY [[COPY]](s64)68 %0:_(s64) = COPY $x069 %1:_(s64) = COPY $x170 %2:_(s1) = G_CONSTANT i1 true71 %3:_(s64) = G_SELECT %2, %0, %172 $x0 = COPY %3(s64)73...74