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
79 lines
3.3 KiB
LLVM
79 lines
3.3 KiB
LLVM
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 4
|
|
; RUN: opt --bpf-check-and-opt-ir -S -mtriple=bpf-pc-linux < %s | FileCheck %s
|
|
|
|
define void @simple_store(ptr addrspace(272) %foo) {
|
|
; CHECK-LABEL: define void @simple_store(
|
|
; CHECK-SAME: ptr addrspace(272) [[FOO:%.*]]) {
|
|
; CHECK-NEXT: entry:
|
|
; CHECK-NEXT: [[FOO1:%.*]] = addrspacecast ptr addrspace(272) [[FOO]] to ptr
|
|
; CHECK-NEXT: [[ADD_PTR2:%.*]] = getelementptr inbounds i8, ptr [[FOO1]], i64 16
|
|
; CHECK-NEXT: store volatile i32 57005, ptr [[ADD_PTR2]], align 4
|
|
; CHECK-NEXT: [[ADD_PTR13:%.*]] = getelementptr inbounds i8, ptr [[FOO1]], i64 12
|
|
; CHECK-NEXT: store volatile i32 48879, ptr [[ADD_PTR13]], align 4
|
|
; CHECK-NEXT: ret void
|
|
;
|
|
entry:
|
|
%add.ptr = getelementptr inbounds i8, ptr addrspace(272) %foo, i64 16
|
|
store volatile i32 57005, ptr addrspace(272) %add.ptr, align 4
|
|
%add.ptr1 = getelementptr inbounds i8, ptr addrspace(272) %foo, i64 12
|
|
store volatile i32 48879, ptr addrspace(272) %add.ptr1, align 4
|
|
ret void
|
|
}
|
|
|
|
define void @separate_addr_store(ptr addrspace(272) %foo, ptr addrspace(272) %bar) {
|
|
; CHECK-LABEL: define void @separate_addr_store(
|
|
; CHECK-SAME: ptr addrspace(272) [[FOO:%.*]], ptr addrspace(272) [[BAR:%.*]]) {
|
|
; CHECK-NEXT: entry:
|
|
; CHECK-NEXT: [[BAR3:%.*]] = addrspacecast ptr addrspace(272) [[BAR]] to ptr
|
|
; CHECK-NEXT: [[FOO1:%.*]] = addrspacecast ptr addrspace(272) [[FOO]] to ptr
|
|
; CHECK-NEXT: [[ADD_PTR2:%.*]] = getelementptr inbounds i8, ptr [[FOO1]], i64 16
|
|
; CHECK-NEXT: store volatile i32 57005, ptr [[ADD_PTR2]], align 4
|
|
; CHECK-NEXT: [[ADD_PTR14:%.*]] = getelementptr inbounds i8, ptr [[BAR3]], i64 12
|
|
; CHECK-NEXT: store volatile i32 48879, ptr [[ADD_PTR14]], align 4
|
|
; CHECK-NEXT: ret void
|
|
;
|
|
entry:
|
|
%add.ptr = getelementptr inbounds i8, ptr addrspace(272) %foo, i64 16
|
|
store volatile i32 57005, ptr addrspace(272) %add.ptr, align 4
|
|
%add.ptr1 = getelementptr inbounds i8, ptr addrspace(272) %bar, i64 12
|
|
store volatile i32 48879, ptr addrspace(272) %add.ptr1, align 4
|
|
ret void
|
|
}
|
|
|
|
define i32 @simple_load(ptr addrspace(272) %foo) {
|
|
; CHECK-LABEL: define i32 @simple_load(
|
|
; CHECK-SAME: ptr addrspace(272) [[FOO:%.*]]) {
|
|
; CHECK-NEXT: entry:
|
|
; CHECK-NEXT: [[FOO1:%.*]] = addrspacecast ptr addrspace(272) [[FOO]] to ptr
|
|
; CHECK-NEXT: [[TMP0:%.*]] = load i32, ptr [[FOO1]], align 4
|
|
; CHECK-NEXT: ret i32 [[TMP0]]
|
|
;
|
|
entry:
|
|
%0 = load i32, ptr addrspace(272) %foo, align 4
|
|
ret i32 %0
|
|
}
|
|
|
|
define { i32, i1 } @simple_cmpxchg(ptr addrspace(1) %i) {
|
|
; CHECK-LABEL: define { i32, i1 } @simple_cmpxchg(
|
|
; CHECK-SAME: ptr addrspace(1) [[I:%.*]]) {
|
|
; CHECK-NEXT: entry:
|
|
; CHECK-NEXT: [[I1:%.*]] = addrspacecast ptr addrspace(1) [[I]] to ptr
|
|
; CHECK-NEXT: [[A:%.*]] = cmpxchg ptr [[I1]], i32 7, i32 42 monotonic monotonic, align 4
|
|
; CHECK-NEXT: ret { i32, i1 } [[A]]
|
|
;
|
|
entry:
|
|
%a = cmpxchg ptr addrspace(1) %i, i32 7, i32 42 monotonic monotonic, align 4
|
|
ret { i32, i1 } %a
|
|
}
|
|
|
|
define void @simple_atomicrmw(ptr addrspace(1) %p) {
|
|
; CHECK-LABEL: define void @simple_atomicrmw(
|
|
; CHECK-SAME: ptr addrspace(1) [[P:%.*]]) {
|
|
; CHECK-NEXT: [[P1:%.*]] = addrspacecast ptr addrspace(1) [[P]] to ptr
|
|
; CHECK-NEXT: [[A:%.*]] = atomicrmw add ptr [[P1]], i64 42 monotonic, align 8
|
|
; CHECK-NEXT: ret void
|
|
;
|
|
%a = atomicrmw add ptr addrspace(1) %p, i64 42 monotonic, align 8
|
|
ret void
|
|
}
|