CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
481 lines
14 KiB
YAML
481 lines
14 KiB
YAML
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
|
|
# RUN: llc -mtriple=aarch64-unknown-unknown -run-pass=instruction-select -verify-machineinstrs %s -o - | FileCheck %s
|
|
...
|
|
---
|
|
name: shl_gep_sext_ldrwrow
|
|
alignment: 4
|
|
legalized: true
|
|
regBankSelected: true
|
|
tracksRegLiveness: true
|
|
frameInfo:
|
|
maxAlignment: 1
|
|
machineFunctionInfo: {}
|
|
body: |
|
|
bb.0:
|
|
liveins: $w1, $x0
|
|
|
|
; We should be able to fold a shift + extend into the pattern.
|
|
; In this case, we should get a roW load with two 1s, representing a shift
|
|
; plus sign extend.
|
|
|
|
; CHECK-LABEL: name: shl_gep_sext_ldrwrow
|
|
; CHECK: liveins: $w1, $x0
|
|
; CHECK-NEXT: {{ $}}
|
|
; CHECK-NEXT: %base:gpr64sp = COPY $x0
|
|
; CHECK-NEXT: %foo:gpr32 = COPY $w1
|
|
; CHECK-NEXT: %load:gpr32 = LDRWroW %base, %foo, 1, 1 :: (load (s32))
|
|
; CHECK-NEXT: $w0 = COPY %load
|
|
; CHECK-NEXT: RET_ReallyLR implicit $w0
|
|
%base:gpr(p0) = COPY $x0
|
|
%foo:gpr(i32) = COPY $w1
|
|
%ext:gpr(i64) = G_SEXT %foo(i32)
|
|
%c:gpr(i64) = G_CONSTANT i64 2
|
|
%offset:gpr(i64) = G_SHL %ext, %c
|
|
%ptr:gpr(p0) = G_PTR_ADD %base, %offset(i64)
|
|
%load:gpr(s32) = G_LOAD %ptr(p0) :: (load (s32))
|
|
$w0 = COPY %load(s32)
|
|
RET_ReallyLR implicit $w0
|
|
...
|
|
---
|
|
name: shl_gep_zext_ldrwrow
|
|
alignment: 4
|
|
legalized: true
|
|
regBankSelected: true
|
|
tracksRegLiveness: true
|
|
frameInfo:
|
|
maxAlignment: 1
|
|
machineFunctionInfo: {}
|
|
body: |
|
|
bb.0:
|
|
liveins: $w1, $x0
|
|
|
|
; We should be able to fold a shift + extend into the pattern.
|
|
; In this case, we should get a roW load with a 0 representing a zero-extend
|
|
; and a 1 representing a shift.
|
|
|
|
; CHECK-LABEL: name: shl_gep_zext_ldrwrow
|
|
; CHECK: liveins: $w1, $x0
|
|
; CHECK-NEXT: {{ $}}
|
|
; CHECK-NEXT: %base:gpr64sp = COPY $x0
|
|
; CHECK-NEXT: %foo:gpr32 = COPY $w1
|
|
; CHECK-NEXT: %load:gpr32 = LDRWroW %base, %foo, 0, 1 :: (load (s32))
|
|
; CHECK-NEXT: $w0 = COPY %load
|
|
; CHECK-NEXT: RET_ReallyLR implicit $w0
|
|
%base:gpr(p0) = COPY $x0
|
|
%foo:gpr(i32) = COPY $w1
|
|
%ext:gpr(i64) = G_ZEXT %foo(i32)
|
|
%c:gpr(i64) = G_CONSTANT i64 2
|
|
%offset:gpr(i64) = G_SHL %ext, %c
|
|
%ptr:gpr(p0) = G_PTR_ADD %base, %offset(i64)
|
|
%load:gpr(s32) = G_LOAD %ptr(p0) :: (load (s32))
|
|
$w0 = COPY %load(s32)
|
|
RET_ReallyLR implicit $w0
|
|
...
|
|
---
|
|
name: shl_gep_anyext_ldrwrow
|
|
alignment: 4
|
|
legalized: true
|
|
regBankSelected: true
|
|
tracksRegLiveness: true
|
|
frameInfo:
|
|
maxAlignment: 1
|
|
machineFunctionInfo: {}
|
|
body: |
|
|
bb.0:
|
|
liveins: $w1, $x0
|
|
|
|
; We should be able to fold a shift + extend into the pattern.
|
|
; In this case, we should get a roW load with a 0 representing a zero-extend
|
|
; and a 1 representing a shift.
|
|
|
|
; CHECK-LABEL: name: shl_gep_anyext_ldrwrow
|
|
; CHECK: liveins: $w1, $x0
|
|
; CHECK-NEXT: {{ $}}
|
|
; CHECK-NEXT: %base:gpr64sp = COPY $x0
|
|
; CHECK-NEXT: %foo:gpr32 = COPY $w1
|
|
; CHECK-NEXT: %load:gpr32 = LDRWroW %base, %foo, 0, 1 :: (load (s32))
|
|
; CHECK-NEXT: $w0 = COPY %load
|
|
; CHECK-NEXT: RET_ReallyLR implicit $w0
|
|
%base:gpr(p0) = COPY $x0
|
|
%foo:gpr(i32) = COPY $w1
|
|
%ext:gpr(i64) = G_ANYEXT %foo(i32)
|
|
%c:gpr(i64) = G_CONSTANT i64 2
|
|
%offset:gpr(i64) = G_SHL %ext, %c
|
|
%ptr:gpr(p0) = G_PTR_ADD %base, %offset(i64)
|
|
%load:gpr(s32) = G_LOAD %ptr(p0) :: (load (s32))
|
|
$w0 = COPY %load(s32)
|
|
RET_ReallyLR implicit $w0
|
|
...
|
|
---
|
|
name: mul_gep_sext_ldrwrow
|
|
alignment: 4
|
|
legalized: true
|
|
regBankSelected: true
|
|
tracksRegLiveness: true
|
|
frameInfo:
|
|
maxAlignment: 1
|
|
machineFunctionInfo: {}
|
|
body: |
|
|
bb.0:
|
|
|
|
; We should be able to do the same with multiplies as with shifts.
|
|
|
|
liveins: $w1, $x0
|
|
; CHECK-LABEL: name: mul_gep_sext_ldrwrow
|
|
; CHECK: liveins: $w1, $x0
|
|
; CHECK-NEXT: {{ $}}
|
|
; CHECK-NEXT: %base:gpr64sp = COPY $x0
|
|
; CHECK-NEXT: %foo:gpr32 = COPY $w1
|
|
; CHECK-NEXT: %load:gpr32 = LDRWroW %base, %foo, 1, 1 :: (load (s32))
|
|
; CHECK-NEXT: $w0 = COPY %load
|
|
; CHECK-NEXT: RET_ReallyLR implicit $w0
|
|
%base:gpr(p0) = COPY $x0
|
|
%foo:gpr(i32) = COPY $w1
|
|
%ext:gpr(i64) = G_SEXT %foo(i32)
|
|
%c:gpr(i64) = G_CONSTANT i64 4
|
|
%offset:gpr(i64) = G_MUL %c, %ext
|
|
%ptr:gpr(p0) = G_PTR_ADD %base, %offset(i64)
|
|
%load:gpr(s32) = G_LOAD %ptr(p0) :: (load (s32))
|
|
$w0 = COPY %load(s32)
|
|
RET_ReallyLR implicit $w0
|
|
...
|
|
---
|
|
name: mul_gep_zext_ldrwrow
|
|
alignment: 4
|
|
legalized: true
|
|
regBankSelected: true
|
|
tracksRegLiveness: true
|
|
frameInfo:
|
|
maxAlignment: 1
|
|
machineFunctionInfo: {}
|
|
body: |
|
|
bb.0:
|
|
liveins: $w1, $x0
|
|
|
|
; We should be able to do the same with multiplies as with shifts.
|
|
|
|
; CHECK-LABEL: name: mul_gep_zext_ldrwrow
|
|
; CHECK: liveins: $w1, $x0
|
|
; CHECK-NEXT: {{ $}}
|
|
; CHECK-NEXT: %base:gpr64sp = COPY $x0
|
|
; CHECK-NEXT: %foo:gpr32 = COPY $w1
|
|
; CHECK-NEXT: %load:gpr32 = LDRWroW %base, %foo, 0, 1 :: (load (s32))
|
|
; CHECK-NEXT: $w0 = COPY %load
|
|
; CHECK-NEXT: RET_ReallyLR implicit $w0
|
|
%base:gpr(p0) = COPY $x0
|
|
%foo:gpr(i32) = COPY $w1
|
|
%ext:gpr(i64) = G_ZEXT %foo(i32)
|
|
%c:gpr(i64) = G_CONSTANT i64 4
|
|
%offset:gpr(i64) = G_MUL %c, %ext
|
|
%ptr:gpr(p0) = G_PTR_ADD %base, %offset(i64)
|
|
%load:gpr(s32) = G_LOAD %ptr(p0) :: (load (s32))
|
|
$w0 = COPY %load(s32)
|
|
RET_ReallyLR implicit $w0
|
|
...
|
|
---
|
|
name: mul_gep_anyext_ldrwrow
|
|
alignment: 4
|
|
legalized: true
|
|
regBankSelected: true
|
|
tracksRegLiveness: true
|
|
frameInfo:
|
|
maxAlignment: 1
|
|
machineFunctionInfo: {}
|
|
body: |
|
|
bb.0:
|
|
liveins: $w1, $x0
|
|
|
|
; We should be able to do the same with multiplies as with shifts.
|
|
|
|
; CHECK-LABEL: name: mul_gep_anyext_ldrwrow
|
|
; CHECK: liveins: $w1, $x0
|
|
; CHECK-NEXT: {{ $}}
|
|
; CHECK-NEXT: %base:gpr64sp = COPY $x0
|
|
; CHECK-NEXT: %foo:gpr32 = COPY $w1
|
|
; CHECK-NEXT: %load:gpr32 = LDRWroW %base, %foo, 0, 1 :: (load (s32))
|
|
; CHECK-NEXT: $w0 = COPY %load
|
|
; CHECK-NEXT: RET_ReallyLR implicit $w0
|
|
%base:gpr(p0) = COPY $x0
|
|
%foo:gpr(i32) = COPY $w1
|
|
%ext:gpr(i64) = G_ANYEXT %foo(i32)
|
|
%c:gpr(i64) = G_CONSTANT i64 4
|
|
%offset:gpr(i64) = G_MUL %c, %ext
|
|
%ptr:gpr(p0) = G_PTR_ADD %base, %offset(i64)
|
|
%load:gpr(s32) = G_LOAD %ptr(p0) :: (load (s32))
|
|
$w0 = COPY %load(s32)
|
|
RET_ReallyLR implicit $w0
|
|
...
|
|
---
|
|
name: ldrdrow
|
|
alignment: 4
|
|
legalized: true
|
|
regBankSelected: true
|
|
tracksRegLiveness: true
|
|
frameInfo:
|
|
maxAlignment: 1
|
|
machineFunctionInfo: {}
|
|
body: |
|
|
bb.0:
|
|
liveins: $w1, $x0, $d0
|
|
|
|
; Verify that we can select LDRDroW.
|
|
|
|
; CHECK-LABEL: name: ldrdrow
|
|
; CHECK: liveins: $w1, $x0, $d0
|
|
; CHECK-NEXT: {{ $}}
|
|
; CHECK-NEXT: %base:gpr64sp = COPY $x0
|
|
; CHECK-NEXT: %foo:gpr32 = COPY $w1
|
|
; CHECK-NEXT: %load:fpr64 = LDRDroW %base, %foo, 1, 1 :: (load (<2 x s32>))
|
|
; CHECK-NEXT: $x0 = COPY %load
|
|
; CHECK-NEXT: RET_ReallyLR implicit $x0
|
|
%base:gpr(p0) = COPY $x0
|
|
%foo:gpr(i32) = COPY $w1
|
|
%ext:gpr(i64) = G_SEXT %foo(i32)
|
|
%c:gpr(i64) = G_CONSTANT i64 8
|
|
%offset:gpr(i64) = G_MUL %c, %ext
|
|
%ptr:gpr(p0) = G_PTR_ADD %base, %offset(i64)
|
|
%load:fpr(<2 x s32>) = G_LOAD %ptr(p0) :: (load (<2 x s32>))
|
|
$x0 = COPY %load(<2 x s32>)
|
|
RET_ReallyLR implicit $x0
|
|
...
|
|
---
|
|
name: ldrxrow
|
|
alignment: 4
|
|
legalized: true
|
|
regBankSelected: true
|
|
tracksRegLiveness: true
|
|
frameInfo:
|
|
maxAlignment: 1
|
|
machineFunctionInfo: {}
|
|
body: |
|
|
bb.0:
|
|
liveins: $w1, $x0, $d0
|
|
|
|
; Verify that we can select LDRXroW.
|
|
|
|
; CHECK-LABEL: name: ldrxrow
|
|
; CHECK: liveins: $w1, $x0, $d0
|
|
; CHECK-NEXT: {{ $}}
|
|
; CHECK-NEXT: %base:gpr64sp = COPY $x0
|
|
; CHECK-NEXT: %foo:gpr32 = COPY $w1
|
|
; CHECK-NEXT: %load:gpr64 = LDRXroW %base, %foo, 1, 1 :: (load (s64))
|
|
; CHECK-NEXT: $x0 = COPY %load
|
|
; CHECK-NEXT: RET_ReallyLR implicit $x0
|
|
%base:gpr(p0) = COPY $x0
|
|
%foo:gpr(i32) = COPY $w1
|
|
%ext:gpr(i64) = G_SEXT %foo(i32)
|
|
%c:gpr(i64) = G_CONSTANT i64 8
|
|
%offset:gpr(i64) = G_MUL %c, %ext
|
|
%ptr:gpr(p0) = G_PTR_ADD %base, %offset(i64)
|
|
%load:gpr(s64) = G_LOAD %ptr(p0) :: (load (s64))
|
|
$x0 = COPY %load(s64)
|
|
RET_ReallyLR implicit $x0
|
|
...
|
|
---
|
|
name: ldrbbrow
|
|
alignment: 4
|
|
legalized: true
|
|
regBankSelected: true
|
|
tracksRegLiveness: true
|
|
frameInfo:
|
|
maxAlignment: 1
|
|
machineFunctionInfo: {}
|
|
body: |
|
|
bb.1.entry:
|
|
liveins: $x0, $w0, $w1
|
|
|
|
; Verify that we can select LDRBBroW. Note that there is no shift here,
|
|
; but we still fold the extend into the addressing mode.
|
|
|
|
; CHECK-LABEL: name: ldrbbrow
|
|
; CHECK: liveins: $x0, $w0, $w1
|
|
; CHECK-NEXT: {{ $}}
|
|
; CHECK-NEXT: %val:gpr32 = COPY $w1
|
|
; CHECK-NEXT: %base:gpr64sp = COPY $x0
|
|
; CHECK-NEXT: %load:gpr32 = LDRBBroW %base, %val, 1, 0 :: (load (s8))
|
|
; CHECK-NEXT: $w0 = COPY %load
|
|
; CHECK-NEXT: RET_ReallyLR implicit $w0
|
|
%val:gpr(i32) = COPY $w1
|
|
%base:gpr(p0) = COPY $x0
|
|
%ext:gpr(i64) = G_SEXT %val(i32)
|
|
%ptr:gpr(p0) = G_PTR_ADD %base, %ext(i64)
|
|
%load:gpr(s32) = G_LOAD %ptr(p0) :: (load (s8))
|
|
$w0 = COPY %load(s32)
|
|
RET_ReallyLR implicit $w0
|
|
...
|
|
---
|
|
name: ldrhrow
|
|
alignment: 4
|
|
legalized: true
|
|
regBankSelected: true
|
|
tracksRegLiveness: true
|
|
frameInfo:
|
|
maxAlignment: 1
|
|
machineFunctionInfo: {}
|
|
body: |
|
|
bb.1.entry:
|
|
liveins: $w1, $x0
|
|
|
|
; Verify that we can select ldrhrow.
|
|
|
|
; CHECK-LABEL: name: ldrhrow
|
|
; CHECK: liveins: $w1, $x0
|
|
; CHECK-NEXT: {{ $}}
|
|
; CHECK-NEXT: %base:gpr64sp = COPY $x0
|
|
; CHECK-NEXT: %foo:gpr32 = COPY $w1
|
|
; CHECK-NEXT: %load:fpr16 = LDRHroW %base, %foo, 1, 1 :: (load (s16))
|
|
; CHECK-NEXT: $h0 = COPY %load
|
|
; CHECK-NEXT: RET_ReallyLR implicit $h0
|
|
%base:gpr(p0) = COPY $x0
|
|
%foo:gpr(i32) = COPY $w1
|
|
%ext:gpr(i64) = G_SEXT %foo(i32)
|
|
%c:gpr(i64) = G_CONSTANT i64 2
|
|
%offset:gpr(i64) = G_MUL %c, %ext
|
|
%ptr:gpr(p0) = G_PTR_ADD %base, %offset(i64)
|
|
%load:fpr(s16) = G_LOAD %ptr(p0) :: (load (s16))
|
|
$h0 = COPY %load(s16)
|
|
RET_ReallyLR implicit $h0
|
|
...
|
|
---
|
|
name: bad_and_mask_1
|
|
alignment: 4
|
|
legalized: true
|
|
regBankSelected: true
|
|
tracksRegLiveness: true
|
|
frameInfo:
|
|
maxAlignment: 1
|
|
body: |
|
|
bb.0:
|
|
liveins: $x0
|
|
|
|
; We should get a roX load here, not a roW load. We can't use the mask in
|
|
; this test for an extend.
|
|
|
|
; CHECK-LABEL: name: bad_and_mask_1
|
|
; CHECK: liveins: $x0
|
|
; CHECK-NEXT: {{ $}}
|
|
; CHECK-NEXT: %base:gpr64sp = COPY $x0
|
|
; CHECK-NEXT: %imp:gpr64 = IMPLICIT_DEF
|
|
; CHECK-NEXT: %and:gpr64common = ANDXri %imp, 4103
|
|
; CHECK-NEXT: %load:gpr64 = LDRXroX %base, %and, 0, 1 :: (load (s64))
|
|
; CHECK-NEXT: $x1 = COPY %load
|
|
; CHECK-NEXT: RET_ReallyLR implicit $x1
|
|
%base:gpr(p0) = COPY $x0
|
|
%imp:gpr(i64) = G_IMPLICIT_DEF
|
|
%bad_mask:gpr(i64) = G_CONSTANT i64 255
|
|
%and:gpr(i64) = G_AND %imp, %bad_mask
|
|
%c:gpr(i64) = G_CONSTANT i64 8
|
|
%mul:gpr(i64) = G_MUL %c, %and
|
|
%ptr:gpr(p0) = G_PTR_ADD %base, %mul(i64)
|
|
%load:gpr(s64) = G_LOAD %ptr(p0) :: (load (s64))
|
|
$x1 = COPY %load(s64)
|
|
RET_ReallyLR implicit $x1
|
|
...
|
|
---
|
|
name: bad_and_mask_2
|
|
alignment: 4
|
|
legalized: true
|
|
regBankSelected: true
|
|
tracksRegLiveness: true
|
|
frameInfo:
|
|
maxAlignment: 1
|
|
body: |
|
|
bb.0:
|
|
liveins: $x0
|
|
|
|
; We should get a roX load here, not a roW load. We can't use the mask in
|
|
; this test for an extend.
|
|
|
|
; CHECK-LABEL: name: bad_and_mask_2
|
|
; CHECK: liveins: $x0
|
|
; CHECK-NEXT: {{ $}}
|
|
; CHECK-NEXT: %base:gpr64sp = COPY $x0
|
|
; CHECK-NEXT: %imp:gpr64 = IMPLICIT_DEF
|
|
; CHECK-NEXT: %and:gpr64common = ANDXri %imp, 4111
|
|
; CHECK-NEXT: %load:gpr64 = LDRXroX %base, %and, 0, 1 :: (load (s64))
|
|
; CHECK-NEXT: $x1 = COPY %load
|
|
; CHECK-NEXT: RET_ReallyLR implicit $x1
|
|
%base:gpr(p0) = COPY $x0
|
|
%imp:gpr(i64) = G_IMPLICIT_DEF
|
|
%bad_mask:gpr(i64) = G_CONSTANT i64 65535
|
|
%and:gpr(i64) = G_AND %imp, %bad_mask
|
|
%c:gpr(i64) = G_CONSTANT i64 8
|
|
%mul:gpr(i64) = G_MUL %c, %and
|
|
%ptr:gpr(p0) = G_PTR_ADD %base, %mul(i64)
|
|
%load:gpr(s64) = G_LOAD %ptr(p0) :: (load (s64))
|
|
$x1 = COPY %load(s64)
|
|
RET_ReallyLR implicit $x1
|
|
...
|
|
---
|
|
name: and_uxtw
|
|
alignment: 4
|
|
legalized: true
|
|
regBankSelected: true
|
|
tracksRegLiveness: true
|
|
frameInfo:
|
|
maxAlignment: 1
|
|
body: |
|
|
bb.0:
|
|
liveins: $x0
|
|
|
|
; The mask used for the AND here is legal for producing a roW load.
|
|
|
|
; CHECK-LABEL: name: and_uxtw
|
|
; CHECK: liveins: $x0
|
|
; CHECK-NEXT: {{ $}}
|
|
; CHECK-NEXT: %base:gpr64sp = COPY $x0
|
|
; CHECK-NEXT: %imp:gpr64 = IMPLICIT_DEF
|
|
; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr32all = COPY %imp.sub_32
|
|
; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr32 = COPY [[COPY]]
|
|
; CHECK-NEXT: %load:gpr64 = LDRXroW %base, [[COPY1]], 0, 1 :: (load (s64))
|
|
; CHECK-NEXT: $x1 = COPY %load
|
|
; CHECK-NEXT: RET_ReallyLR implicit $x1
|
|
%base:gpr(p0) = COPY $x0
|
|
%imp:gpr(i64) = G_IMPLICIT_DEF
|
|
%mask:gpr(i64) = G_CONSTANT i64 4294967295
|
|
%and:gpr(i64) = G_AND %imp, %mask
|
|
%c:gpr(i64) = G_CONSTANT i64 8
|
|
%mul:gpr(i64) = G_MUL %c, %and
|
|
%ptr:gpr(p0) = G_PTR_ADD %base, %mul(i64)
|
|
%load:gpr(s64) = G_LOAD %ptr(p0) :: (load (s64))
|
|
$x1 = COPY %load(s64)
|
|
RET_ReallyLR implicit $x1
|
|
...
|
|
---
|
|
name: zext_shl_LDRWroW
|
|
alignment: 4
|
|
legalized: true
|
|
regBankSelected: true
|
|
tracksRegLiveness: true
|
|
liveins:
|
|
- { reg: '$w0' }
|
|
- { reg: '$x1' }
|
|
body: |
|
|
bb.1:
|
|
liveins: $w0, $x1
|
|
|
|
; We try to look through the G_ZEXT of the SHL here.
|
|
|
|
; CHECK-LABEL: name: zext_shl_LDRWroW
|
|
; CHECK: liveins: $w0, $x1
|
|
; CHECK-NEXT: {{ $}}
|
|
; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr32 = COPY $w0
|
|
; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr64sp = COPY $x1
|
|
; CHECK-NEXT: [[ANDWri:%[0-9]+]]:gpr32common = ANDWri [[COPY]], 7
|
|
; CHECK-NEXT: [[LDRWroW:%[0-9]+]]:gpr32 = LDRWroW [[COPY1]], [[ANDWri]], 0, 1 :: (load (s32))
|
|
; CHECK-NEXT: $w0 = COPY [[LDRWroW]]
|
|
; CHECK-NEXT: RET_ReallyLR implicit $w0
|
|
%0:gpr(i32) = COPY $w0
|
|
%1:gpr(p0) = COPY $x1
|
|
%2:gpr(i32) = G_CONSTANT i32 255
|
|
%3:gpr(i32) = G_AND %0, %2
|
|
%13:gpr(i64) = G_CONSTANT i64 2
|
|
%12:gpr(i32) = G_SHL %3, %13(i64)
|
|
%6:gpr(i64) = G_ZEXT %12(i32)
|
|
%7:gpr(p0) = G_PTR_ADD %1, %6(i64)
|
|
%9:gpr(s32) = G_LOAD %7(p0) :: (load (s32))
|
|
$w0 = COPY %9(s32)
|
|
RET_ReallyLR implicit $w0
|
|
|
|
...
|