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
117 lines
3.2 KiB
LLVM
117 lines
3.2 KiB
LLVM
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
|
; Test selection of addresses with indices in cases where the address
|
|
; is used once.
|
|
;
|
|
; RUN: llc < %s -mtriple=s390x-linux-gnu | FileCheck %s
|
|
|
|
; A simple index address.
|
|
define void @f1(i64 %addr, i64 %index) {
|
|
; CHECK-LABEL: f1:
|
|
; CHECK: # %bb.0:
|
|
; CHECK-NEXT: lb %r0, 0(%r3,%r2)
|
|
; CHECK-NEXT: br %r14
|
|
%add = add i64 %addr, %index
|
|
%ptr = inttoptr i64 %add to ptr
|
|
%a = load volatile i8, ptr %ptr
|
|
ret void
|
|
}
|
|
|
|
; An address with an index and a displacement (order 1).
|
|
define void @f2(i64 %addr, i64 %index) {
|
|
; CHECK-LABEL: f2:
|
|
; CHECK: # %bb.0:
|
|
; CHECK-NEXT: lb %r0, 100(%r3,%r2)
|
|
; CHECK-NEXT: br %r14
|
|
%add1 = add i64 %addr, %index
|
|
%add2 = add i64 %add1, 100
|
|
%ptr = inttoptr i64 %add2 to ptr
|
|
%a = load volatile i8, ptr %ptr
|
|
ret void
|
|
}
|
|
|
|
; An address with an index and a displacement (order 2).
|
|
define void @f3(i64 %addr, i64 %index) {
|
|
; CHECK-LABEL: f3:
|
|
; CHECK: # %bb.0:
|
|
; CHECK-NEXT: lb %r0, 100(%r3,%r2)
|
|
; CHECK-NEXT: br %r14
|
|
%add1 = add i64 %addr, 100
|
|
%add2 = add i64 %add1, %index
|
|
%ptr = inttoptr i64 %add2 to ptr
|
|
%a = load volatile i8, ptr %ptr
|
|
ret void
|
|
}
|
|
|
|
; An address with an index and a subtracted displacement (order 1).
|
|
define void @f4(i64 %addr, i64 %index) {
|
|
; CHECK-LABEL: f4:
|
|
; CHECK: # %bb.0:
|
|
; CHECK-NEXT: lb %r0, -100(%r3,%r2)
|
|
; CHECK-NEXT: br %r14
|
|
%add1 = add i64 %addr, %index
|
|
%add2 = sub i64 %add1, 100
|
|
%ptr = inttoptr i64 %add2 to ptr
|
|
%a = load volatile i8, ptr %ptr
|
|
ret void
|
|
}
|
|
|
|
; An address with an index and a subtracted displacement (order 2).
|
|
define void @f5(i64 %addr, i64 %index) {
|
|
; CHECK-LABEL: f5:
|
|
; CHECK: # %bb.0:
|
|
; CHECK-NEXT: lb %r0, -100(%r3,%r2)
|
|
; CHECK-NEXT: br %r14
|
|
%add1 = sub i64 %addr, 100
|
|
%add2 = add i64 %add1, %index
|
|
%ptr = inttoptr i64 %add2 to ptr
|
|
%a = load volatile i8, ptr %ptr
|
|
ret void
|
|
}
|
|
|
|
; An address with an index and a displacement added using OR.
|
|
define void @f6(i64 %addr, i64 %index) {
|
|
; CHECK-LABEL: f6:
|
|
; CHECK: # %bb.0:
|
|
; CHECK-NEXT: nill %r2, 65528
|
|
; CHECK-NEXT: lb %r0, 6(%r2,%r3)
|
|
; CHECK-NEXT: br %r14
|
|
%aligned = and i64 %addr, -8
|
|
%or = or i64 %aligned, 6
|
|
%add = add i64 %or, %index
|
|
%ptr = inttoptr i64 %add to ptr
|
|
%a = load volatile i8, ptr %ptr
|
|
ret void
|
|
}
|
|
|
|
; Like f6, but without the masking. This OR doesn't count as a displacement.
|
|
define void @f7(i64 %addr, i64 %index) {
|
|
; CHECK-LABEL: f7:
|
|
; CHECK: # %bb.0:
|
|
; CHECK-NEXT: oill %r2, 6
|
|
; CHECK-NEXT: lb %r0, 0(%r3,%r2)
|
|
; CHECK-NEXT: br %r14
|
|
%or = or i64 %addr, 6
|
|
%add = add i64 %or, %index
|
|
%ptr = inttoptr i64 %add to ptr
|
|
%a = load volatile i8, ptr %ptr
|
|
ret void
|
|
}
|
|
|
|
; Like f6, but with the OR applied after the index. We don't know anything
|
|
; about the alignment of %add here.
|
|
define void @f8(i64 %addr, i64 %index) {
|
|
; CHECK-LABEL: f8:
|
|
; CHECK: # %bb.0:
|
|
; CHECK-NEXT: nill %r2, 65528
|
|
; CHECK-NEXT: agr %r2, %r3
|
|
; CHECK-NEXT: oill %r2, 6
|
|
; CHECK-NEXT: lb %r0, 0(%r2)
|
|
; CHECK-NEXT: br %r14
|
|
%aligned = and i64 %addr, -8
|
|
%add = add i64 %aligned, %index
|
|
%or = or i64 %add, 6
|
|
%ptr = inttoptr i64 %or to ptr
|
|
%a = load volatile i8, ptr %ptr
|
|
ret void
|
|
}
|