1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=aarch64-unknown-unknown -run-pass=instruction-select -verify-machineinstrs %s -o - | FileCheck %s
4 # Test patterns related to logical_shifted_reg32/logical_shifted_reg64 which
5 # are not shared with arith_shifted_reg32/arith_shifted_reg64.
11 tracksRegLiveness: true
15 ; CHECK-LABEL: name: and_xor_bicxrs
17 ; CHECK: [[COPY:%[0-9]+]]:gpr64 = COPY $x0
18 ; CHECK: [[BICXrs:%[0-9]+]]:gpr64 = BICXrs [[COPY]], [[COPY]], 8
19 ; CHECK: $x0 = COPY [[BICXrs]]
20 ; CHECK: RET_ReallyLR implicit $x0
21 %0:gpr(s64) = COPY $x0
22 %1:gpr(s64) = G_CONSTANT i64 8
23 %2:gpr(s64) = G_CONSTANT i64 -1
24 %3:gpr(s64) = G_SHL %0, %1:gpr(s64)
25 %4:gpr(s64) = G_XOR %3, %2:gpr(s64)
26 %5:gpr(s64) = G_AND %0, %4:gpr(s64)
27 $x0 = COPY %5:gpr(s64)
28 RET_ReallyLR implicit $x0
34 tracksRegLiveness: true
38 ; CHECK-LABEL: name: or_xor_ornxrs
40 ; CHECK: [[COPY:%[0-9]+]]:gpr64 = COPY $x0
41 ; CHECK: [[ORNXrs:%[0-9]+]]:gpr64 = ORNXrs [[COPY]], [[COPY]], 8
42 ; CHECK: $x0 = COPY [[ORNXrs]]
43 ; CHECK: RET_ReallyLR implicit $x0
44 %0:gpr(s64) = COPY $x0
45 %1:gpr(s64) = G_CONSTANT i64 8
46 %2:gpr(s64) = G_CONSTANT i64 -1
47 %3:gpr(s64) = G_SHL %0, %1:gpr(s64)
48 %4:gpr(s64) = G_XOR %3, %2:gpr(s64)
49 %5:gpr(s64) = G_OR %0, %4:gpr(s64)
50 $x0 = COPY %5:gpr(s64)
51 RET_ReallyLR implicit $x0
57 tracksRegLiveness: true
61 ; CHECK-LABEL: name: xor_xor_eonxrs
63 ; CHECK: [[COPY:%[0-9]+]]:gpr64 = COPY $x0
64 ; CHECK: [[EONXrs:%[0-9]+]]:gpr64 = EONXrs [[COPY]], [[COPY]], 8
65 ; CHECK: $x0 = COPY [[EONXrs]]
66 ; CHECK: RET_ReallyLR implicit $x0
67 %0:gpr(s64) = COPY $x0
68 %1:gpr(s64) = G_CONSTANT i64 8
69 %2:gpr(s64) = G_CONSTANT i64 -1
70 %3:gpr(s64) = G_SHL %0, %1:gpr(s64)
71 %4:gpr(s64) = G_XOR %3, %2:gpr(s64)
72 %5:gpr(s64) = G_XOR %0, %4:gpr(s64)
73 $x0 = COPY %5:gpr(s64)
74 RET_ReallyLR implicit $x0