2017-07-21 06:58:38 +08:00
|
|
|
# RUN: llc -mtriple=aarch64-- -run-pass=instruction-select -verify-machineinstrs -global-isel %s -o - | FileCheck %s
|
|
|
|
|
|
|
|
---
|
|
|
|
# CHECK-LABEL: name: insert_gprs
|
|
|
|
name: insert_gprs
|
|
|
|
legalized: true
|
|
|
|
regBankSelected: true
|
|
|
|
|
|
|
|
body: |
|
|
|
|
bb.0:
|
2018-02-01 06:04:26 +08:00
|
|
|
liveins: $x0
|
2017-07-21 06:58:38 +08:00
|
|
|
|
2018-02-01 06:04:26 +08:00
|
|
|
%0:gpr(s32) = COPY $w0
|
2017-07-21 06:58:38 +08:00
|
|
|
|
|
|
|
%1:gpr(s64) = G_IMPLICIT_DEF
|
|
|
|
|
|
|
|
; CHECK: body:
|
2017-11-07 05:46:06 +08:00
|
|
|
; CHECK: [[TMP:%[0-9]+]]:gpr64 = SUBREG_TO_REG 0, %0, %subreg.sub_32
|
2017-10-25 02:04:54 +08:00
|
|
|
; CHECK: %2:gpr64 = BFMXri %1, [[TMP]], 0, 31
|
2017-07-21 06:58:38 +08:00
|
|
|
%2:gpr(s64) = G_INSERT %1, %0, 0
|
|
|
|
|
2017-11-07 05:46:06 +08:00
|
|
|
; CHECK: [[TMP:%[0-9]+]]:gpr64 = SUBREG_TO_REG 0, %0, %subreg.sub_32
|
2017-10-25 02:04:54 +08:00
|
|
|
; CHECK: %3:gpr64 = BFMXri %1, [[TMP]], 51, 31
|
2017-07-21 06:58:38 +08:00
|
|
|
%3:gpr(s64) = G_INSERT %1, %0, 13
|
|
|
|
|
2018-02-01 06:04:26 +08:00
|
|
|
$x0 = COPY %2
|
|
|
|
$x1 = COPY %3
|
2017-07-21 06:58:38 +08:00
|
|
|
...
|
|
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
# CHECK-LABEL: name: extract_gprs
|
|
|
|
name: extract_gprs
|
|
|
|
legalized: true
|
|
|
|
regBankSelected: true
|
|
|
|
|
|
|
|
body: |
|
|
|
|
bb.0:
|
2018-02-01 06:04:26 +08:00
|
|
|
liveins: $x0
|
2017-07-21 06:58:38 +08:00
|
|
|
|
2018-02-01 06:04:26 +08:00
|
|
|
%0:gpr(s64) = COPY $x0
|
2017-07-21 06:58:38 +08:00
|
|
|
|
|
|
|
; CHECK: body:
|
2017-10-25 02:04:54 +08:00
|
|
|
; CHECK: [[TMP:%[0-9]+]]:gpr64 = UBFMXri %0, 0, 31
|
|
|
|
; CHECK: %1:gpr32 = COPY [[TMP]].sub_32
|
2017-07-21 06:58:38 +08:00
|
|
|
%1:gpr(s32) = G_EXTRACT %0, 0
|
|
|
|
|
2017-10-25 02:04:54 +08:00
|
|
|
; CHECK: [[TMP:%[0-9]+]]:gpr64 = UBFMXri %0, 13, 44
|
|
|
|
; CHECK: %2:gpr32 = COPY [[TMP]].sub_32
|
2017-07-21 06:58:38 +08:00
|
|
|
%2:gpr(s32) = G_EXTRACT %0, 13
|
|
|
|
|
2018-02-01 06:04:26 +08:00
|
|
|
$w0 = COPY %1
|
|
|
|
$w1 = COPY %2
|
2017-07-21 06:58:38 +08:00
|
|
|
...
|