Files
derek.holloway 7502bf64a4
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
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

69 lines
2.2 KiB
LLVM

; RUN: llc -mtriple=arc < %s | FileCheck %s
; CHECK-LABEL: copy
; CHECK-NOT: add
define void @copy(ptr inreg nocapture %p, ptr inreg nocapture readonly %q) {
entry:
br label %while.cond
while.cond: ; preds = %while.cond, %entry
%p.addr.0 = phi ptr [ %p, %entry ], [ %incdec.ptr1, %while.cond ]
%q.addr.0 = phi ptr [ %q, %entry ], [ %incdec.ptr, %while.cond ]
%incdec.ptr = getelementptr inbounds i8, ptr %q.addr.0, i32 1
%0 = load i8, ptr %q.addr.0, align 1
%incdec.ptr1 = getelementptr inbounds i8, ptr %p.addr.0, i32 1
store i8 %0, ptr %p.addr.0, align 1
%tobool = icmp eq i8 %0, 0
br i1 %tobool, label %while.end, label %while.cond
while.end: ; preds = %while.cond
ret void
}
%struct._llist = type { ptr, ptr, i32 }
; CHECK-LABEL: neg1
; CHECK-NOT: std.ab
define void @neg1(ptr inreg nocapture %a, ptr inreg nocapture readonly %b, i32 inreg %n) {
entry:
%cmp6 = icmp sgt i32 %n, 0
br i1 %cmp6, label %for.body, label %for.cond.cleanup
for.cond.cleanup:
ret void
for.body:
%i.07 = phi i32 [ %inc, %for.body ], [ 0, %entry ]
%arrayidx = getelementptr inbounds i8, ptr %b, i32 %i.07
%0 = load i8, ptr %arrayidx, align 1
%mul = mul nuw nsw i32 %i.07, 257
%arrayidx1 = getelementptr inbounds i8, ptr %a, i32 %mul
store i8 %0, ptr %arrayidx1, align 1
%inc = add nuw nsw i32 %i.07, 1
%exitcond = icmp eq i32 %inc, %n
br i1 %exitcond, label %for.cond.cleanup, label %for.body
}
; CHECK-LABEL: neg2
; CHECK-NOT: st.ab
define void @neg2(ptr inreg %a, i32 inreg %n) {
entry:
%cmp13 = icmp sgt i32 %n, 0
br i1 %cmp13, label %for.body, label %for.cond.cleanup
for.cond.cleanup:
ret void
for.body:
%i.014 = phi i32 [ %inc, %for.body ], [ 0, %entry ]
%arrayidx = getelementptr inbounds %struct._llist, ptr %a, i32 %i.014
%next = getelementptr inbounds %struct._llist, ptr %arrayidx, i32 0, i32 0
store ptr %arrayidx, ptr %next, align 4
%prev = getelementptr inbounds %struct._llist, ptr %a, i32 %i.014, i32 1
store ptr %arrayidx, ptr %prev, align 4
%inc = add nuw nsw i32 %i.014, 1
%exitcond = icmp eq i32 %inc, %n
br i1 %exitcond, label %for.cond.cleanup, label %for.body
}