1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -run-pass=aarch64-prelegalizer-combiner -verify-machineinstrs -mtriple aarch64-unknown-unknown %s -o - | FileCheck %s
3 # RUN: llc -debugify-and-strip-all-safe -run-pass=aarch64-prelegalizer-combiner -verify-machineinstrs -mtriple aarch64-unknown-unknown %s -o - | FileCheck %s
5 # select (c, x, x) -> x
6 name: test_combine_select_same_res
10 ; CHECK-LABEL: name: test_combine_select_same_res
11 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x0
12 ; CHECK: $x0 = COPY [[COPY]](s64)
15 %2:_(s64) = G_SELECT %1, %0, %0
19 # select (undef, x, y) -> y
20 name: test_combine_select_undef_res0_res1
24 ; CHECK-LABEL: name: test_combine_select_undef_res0_res1
25 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x0
26 ; CHECK: $x0 = COPY [[COPY]](s64)
29 %2:_(s1) = G_IMPLICIT_DEF
30 %3:_(s64) = G_SELECT %2, %0, %1
34 # select (false, x, y) -> y
35 name: test_combine_select_false_res0_res1
39 ; CHECK-LABEL: name: test_combine_select_false_res0_res1
40 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x1
41 ; CHECK: $x0 = COPY [[COPY]](s64)
44 %2:_(s1) = G_CONSTANT i1 false
45 %3:_(s64) = G_SELECT %2, %0, %1
49 # select (true, x, y) -> x
50 name: test_combine_select_true_res0_res1
54 ; CHECK-LABEL: name: test_combine_select_true_res0_res1
55 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x0
56 ; CHECK: $x0 = COPY [[COPY]](s64)
59 %2:_(s1) = G_CONSTANT i1 true
60 %3:_(s64) = G_SELECT %2, %0, %1