1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=aarch64-- -run-pass=instruction-select -verify-machineinstrs %s -o - | FileCheck %s
13 ; CHECK-LABEL: name: insert_gprx
14 ; CHECK: [[COPY:%[0-9]+]]:gpr32 = COPY $w0
15 ; CHECK: [[DEF:%[0-9]+]]:gpr64 = IMPLICIT_DEF
16 ; CHECK: [[SUBREG_TO_REG:%[0-9]+]]:gpr64 = SUBREG_TO_REG 0, [[COPY]], %subreg.sub_32
17 ; CHECK: [[BFMXri:%[0-9]+]]:gpr64 = BFMXri [[DEF]], [[SUBREG_TO_REG]], 0, 31
18 ; CHECK: [[SUBREG_TO_REG1:%[0-9]+]]:gpr64 = SUBREG_TO_REG 0, [[COPY]], %subreg.sub_32
19 ; CHECK: [[BFMXri1:%[0-9]+]]:gpr64 = BFMXri [[DEF]], [[SUBREG_TO_REG1]], 51, 31
20 ; CHECK: $x0 = COPY [[BFMXri]]
21 ; CHECK: $x1 = COPY [[BFMXri1]]
22 %0:gpr(s32) = COPY $w0
24 %1:gpr(s64) = G_IMPLICIT_DEF
26 %2:gpr(s64) = G_INSERT %1, %0, 0
28 %3:gpr(s64) = G_INSERT %1, %0, 13
42 ; CHECK-LABEL: name: insert_gprw
43 ; CHECK: [[COPY:%[0-9]+]]:gpr32 = COPY $w0
44 ; CHECK: [[DEF:%[0-9]+]]:gpr32 = IMPLICIT_DEF
45 ; CHECK: [[BFMWri:%[0-9]+]]:gpr32 = BFMWri [[DEF]], [[COPY]], 0, 15
46 ; CHECK: [[BFMWri1:%[0-9]+]]:gpr32 = BFMWri [[BFMWri]], [[COPY]], 16, 15
47 ; CHECK: [[COPY1:%[0-9]+]]:gpr32all = COPY [[BFMWri1]]
48 ; CHECK: $w0 = COPY [[COPY1]]
49 %1:gpr(s32) = COPY $w0
50 %2:gpr(s32) = COPY $w1
51 %3:gpr(s16) = G_TRUNC %1(s32)
52 %4:gpr(s16) = G_TRUNC %1(s32)
53 %5:gpr(s32) = G_IMPLICIT_DEF
54 %6:gpr(s32) = G_INSERT %5, %3(s16), 0
55 %7:gpr(s32) = G_INSERT %6, %4(s16), 16
56 %0:gpr(s32) = COPY %7(s32)
69 ; CHECK-LABEL: name: extract_gprs
70 ; CHECK: [[COPY:%[0-9]+]]:gpr64 = COPY $x0
71 ; CHECK: [[UBFMXri:%[0-9]+]]:gpr64 = UBFMXri [[COPY]], 0, 31
72 ; CHECK: [[COPY1:%[0-9]+]]:gpr32 = COPY [[UBFMXri]].sub_32
73 ; CHECK: [[UBFMXri1:%[0-9]+]]:gpr64 = UBFMXri [[COPY]], 13, 44
74 ; CHECK: [[COPY2:%[0-9]+]]:gpr32 = COPY [[UBFMXri1]].sub_32
75 ; CHECK: $w0 = COPY [[COPY1]]
76 ; CHECK: $w1 = COPY [[COPY2]]
77 %0:gpr(s64) = COPY $x0
79 %1:gpr(s32) = G_EXTRACT %0, 0
81 %2:gpr(s32) = G_EXTRACT %0, 13
96 ; CHECK-LABEL: name: extract_gprw
97 ; CHECK: [[COPY:%[0-9]+]]:gpr32 = COPY $w0
98 ; CHECK: [[UBFMWri:%[0-9]+]]:gpr32 = UBFMWri [[COPY]], 0, 15
99 ; CHECK: [[UBFMWri1:%[0-9]+]]:gpr32 = UBFMWri [[COPY]], 15, 30
100 ; CHECK: [[COPY1:%[0-9]+]]:fpr32 = COPY [[UBFMWri]]
101 ; CHECK: [[COPY2:%[0-9]+]]:fpr16 = COPY [[COPY1]].hsub
102 ; CHECK: $h0 = COPY [[COPY2]]
103 ; CHECK: [[COPY3:%[0-9]+]]:fpr32 = COPY [[UBFMWri1]]
104 ; CHECK: [[COPY4:%[0-9]+]]:fpr16 = COPY [[COPY3]].hsub
105 ; CHECK: $h1 = COPY [[COPY4]]
106 %0:gpr(s32) = COPY $w0
108 %1:gpr(s16) = G_EXTRACT %0, 0
110 %2:gpr(s16) = G_EXTRACT %0, 15