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
130 lines
4.5 KiB
LLVM
130 lines
4.5 KiB
LLVM
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
|
; RUN: llc < %s -wasm-disable-explicit-locals -wasm-keep-registers -fast-isel -fast-isel-abort=1 | FileCheck %s --check-prefixes=CHECK
|
|
; RUN: llc < %s -mcpu=mvp -wasm-disable-explicit-locals -wasm-keep-registers -fast-isel -fast-isel-abort=1 | FileCheck %s --check-prefixes=CHECK
|
|
|
|
; TODO: Merge this with offset.ll when fast-isel matches better.
|
|
|
|
target triple = "wasm32-unknown-unknown"
|
|
|
|
define void @store_i8_with_variable_gep_offset(ptr %p, i32 %idx) {
|
|
; CHECK-LABEL: store_i8_with_variable_gep_offset:
|
|
; CHECK: .functype store_i8_with_variable_gep_offset (i32, i32) -> ()
|
|
; CHECK-NEXT: # %bb.0:
|
|
; CHECK-NEXT: i32.add $push1=, $0, $1
|
|
; CHECK-NEXT: i32.const $push0=, 0
|
|
; CHECK-NEXT: i32.store8 0($pop1), $pop0
|
|
; CHECK-NEXT: # fallthrough-return
|
|
%s = getelementptr inbounds i8, ptr %p, i32 %idx
|
|
store i8 0, ptr %s
|
|
ret void
|
|
}
|
|
|
|
define hidden void @store_i8_with_array_alloca_gep(i32 %idx) {
|
|
; CHECK-LABEL: store_i8_with_array_alloca_gep:
|
|
; CHECK: .functype store_i8_with_array_alloca_gep (i32) -> ()
|
|
; CHECK-NEXT: # %bb.0:
|
|
; CHECK-NEXT: global.get $push3=, __stack_pointer
|
|
; CHECK-NEXT: i32.const $push4=, 32
|
|
; CHECK-NEXT: i32.sub $push5=, $pop3, $pop4
|
|
; CHECK-NEXT: local.copy $push1=, $pop5
|
|
; CHECK-NEXT: i32.add $push2=, $pop1, $0
|
|
; CHECK-NEXT: i32.const $push0=, 0
|
|
; CHECK-NEXT: i32.store8 0($pop2), $pop0
|
|
; CHECK-NEXT: # fallthrough-return
|
|
%A = alloca [30 x i8], align 16
|
|
%s = getelementptr inbounds [30 x i8], ptr %A, i32 0, i32 %idx
|
|
store i8 0, ptr %s, align 1
|
|
ret void
|
|
}
|
|
|
|
define void @store_i32_with_unfolded_gep_offset(ptr %p) {
|
|
; CHECK-LABEL: store_i32_with_unfolded_gep_offset:
|
|
; CHECK: .functype store_i32_with_unfolded_gep_offset (i32) -> ()
|
|
; CHECK-NEXT: # %bb.0:
|
|
; CHECK-NEXT: i32.const $push1=, 24
|
|
; CHECK-NEXT: i32.add $push2=, $0, $pop1
|
|
; CHECK-NEXT: i32.const $push0=, 0
|
|
; CHECK-NEXT: i32.store 0($pop2), $pop0
|
|
; CHECK-NEXT: # fallthrough-return
|
|
%s = getelementptr i32, ptr %p, i32 6
|
|
store i32 0, ptr %s
|
|
ret void
|
|
}
|
|
|
|
define void @store_i32_with_folded_gep_offset(ptr %p) {
|
|
; CHECK-LABEL: store_i32_with_folded_gep_offset:
|
|
; CHECK: .functype store_i32_with_folded_gep_offset (i32) -> ()
|
|
; CHECK-NEXT: # %bb.0:
|
|
; CHECK-NEXT: i32.const $push0=, 0
|
|
; CHECK-NEXT: i32.store 24($0), $pop0
|
|
; CHECK-NEXT: # fallthrough-return
|
|
%s = getelementptr inbounds i32, ptr %p, i32 6
|
|
store i32 0, ptr %s
|
|
ret void
|
|
}
|
|
|
|
define i32 @load_i32_with_folded_gep_offset(ptr %p) {
|
|
; CHECK-LABEL: load_i32_with_folded_gep_offset:
|
|
; CHECK: .functype load_i32_with_folded_gep_offset (i32) -> (i32)
|
|
; CHECK-NEXT: # %bb.0:
|
|
; CHECK-NEXT: i32.load $push0=, 24($0)
|
|
; CHECK-NEXT: # fallthrough-return
|
|
%s = getelementptr inbounds i32, ptr %p, i32 6
|
|
%t = load i32, ptr %s
|
|
ret i32 %t
|
|
}
|
|
|
|
define void @store_i64_with_unfolded_gep_offset(ptr %p) {
|
|
; CHECK-LABEL: store_i64_with_unfolded_gep_offset:
|
|
; CHECK: .functype store_i64_with_unfolded_gep_offset (i32) -> ()
|
|
; CHECK-NEXT: # %bb.0:
|
|
; CHECK-NEXT: i32.const $push1=, 24
|
|
; CHECK-NEXT: i32.add $push2=, $0, $pop1
|
|
; CHECK-NEXT: i64.const $push0=, 0
|
|
; CHECK-NEXT: i64.store 0($pop2), $pop0
|
|
; CHECK-NEXT: # fallthrough-return
|
|
%s = getelementptr i64, ptr %p, i32 3
|
|
store i64 0, ptr %s
|
|
ret void
|
|
}
|
|
|
|
define void @store_i8_with_folded_gep_offset(ptr %p) {
|
|
; CHECK-LABEL: store_i8_with_folded_gep_offset:
|
|
; CHECK: .functype store_i8_with_folded_gep_offset (i32) -> ()
|
|
; CHECK-NEXT: # %bb.0:
|
|
; CHECK-NEXT: i32.const $push0=, 0
|
|
; CHECK-NEXT: i32.store8 24($0), $pop0
|
|
; CHECK-NEXT: # fallthrough-return
|
|
%s = getelementptr inbounds i8, ptr %p, i32 24
|
|
store i8 0, ptr %s
|
|
ret void
|
|
}
|
|
|
|
define i32 @load_i8_u_with_folded_offset(ptr %p) {
|
|
; CHECK-LABEL: load_i8_u_with_folded_offset:
|
|
; CHECK: .functype load_i8_u_with_folded_offset (i32) -> (i32)
|
|
; CHECK-NEXT: # %bb.0:
|
|
; CHECK-NEXT: i32.load8_u $push0=, 24($0)
|
|
; CHECK-NEXT: # fallthrough-return
|
|
%q = ptrtoint ptr %p to i32
|
|
%r = add nuw i32 %q, 24
|
|
%s = inttoptr i32 %r to ptr
|
|
%t = load i8, ptr %s
|
|
%u = zext i8 %t to i32
|
|
ret i32 %u
|
|
}
|
|
|
|
define i32 @load_i8_s_with_folded_offset(ptr %p) {
|
|
; CHECK-LABEL: load_i8_s_with_folded_offset:
|
|
; CHECK: .functype load_i8_s_with_folded_offset (i32) -> (i32)
|
|
; CHECK-NEXT: # %bb.0:
|
|
; CHECK-NEXT: i32.load8_s $push0=, 24($0)
|
|
; CHECK-NEXT: # fallthrough-return
|
|
%q = ptrtoint ptr %p to i32
|
|
%r = add nuw i32 %q, 24
|
|
%s = inttoptr i32 %r to ptr
|
|
%t = load i8, ptr %s
|
|
%u = sext i8 %t to i32
|
|
ret i32 %u
|
|
}
|