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
65 lines
1.7 KiB
LLVM
65 lines
1.7 KiB
LLVM
; RUN: llc < %s -mtriple=bpf -mcpu=v1 -verify-machineinstrs | FileCheck %s
|
|
|
|
; Source code:
|
|
; struct xdp_md {
|
|
; unsigned data;
|
|
; unsigned data_end;
|
|
; };
|
|
;
|
|
; int gbl;
|
|
; int xdp_dummy(struct xdp_md *xdp)
|
|
; {
|
|
; char addr = *(char *)(long)xdp->data;
|
|
; if (gbl) {
|
|
; if (gbl == 1)
|
|
; return 1;
|
|
; if (addr == 1)
|
|
; return 3;
|
|
; } else if (addr == 0)
|
|
; return 2;
|
|
; return 0;
|
|
; }
|
|
|
|
%struct.xdp_md = type { i32, i32 }
|
|
|
|
@gbl = common local_unnamed_addr global i32 0, align 4
|
|
|
|
; Function Attrs: norecurse nounwind readonly
|
|
define i32 @xdp_dummy(ptr nocapture readonly %xdp) local_unnamed_addr #0 {
|
|
entry:
|
|
%0 = load i32, ptr %xdp, align 4
|
|
%conv = zext i32 %0 to i64
|
|
%1 = inttoptr i64 %conv to ptr
|
|
%2 = load i8, ptr %1, align 1
|
|
; CHECK: r1 = *(u32 *)(r1 + 0)
|
|
; CHECK: r1 = *(u8 *)(r1 + 0)
|
|
%3 = load i32, ptr @gbl, align 4
|
|
switch i32 %3, label %if.end [
|
|
i32 0, label %if.else
|
|
i32 1, label %cleanup
|
|
]
|
|
|
|
if.end: ; preds = %entry
|
|
%cmp4 = icmp eq i8 %2, 1
|
|
; CHECK: r0 = 3
|
|
; CHECK-NOT: r1 &= 255
|
|
; CHECK: if r1 == 1 goto
|
|
br i1 %cmp4, label %cleanup, label %if.end13
|
|
|
|
if.else: ; preds = %entry
|
|
%cmp9 = icmp eq i8 %2, 0
|
|
; CHECK: r0 = 2
|
|
; CHECK-NOT: r1 &= 255
|
|
; CHECK: if r1 == 0 goto
|
|
br i1 %cmp9, label %cleanup, label %if.end13
|
|
|
|
if.end13: ; preds = %if.else, %if.end
|
|
br label %cleanup
|
|
|
|
cleanup: ; preds = %if.else, %if.end, %entry, %if.end13
|
|
%retval.0 = phi i32 [ 0, %if.end13 ], [ 1, %entry ], [ 3, %if.end ], [ 2, %if.else ]
|
|
ret i32 %retval.0
|
|
}
|
|
|
|
attributes #0 = { norecurse nounwind readonly }
|