Files
TheRock/compiler/amd-llvm/llvm/test/CodeGen/Hexagon/live-vars/live-outs.ll
T
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

78 lines
3.1 KiB
LLVM

; RUN: llc -O3 -verify-machineinstrs < %s -o /dev/null
; REQUIRES: asserts
;
; This is a compile-only regression test (asserts build) for Hexagon.
define i32 @foo(ptr nocapture readnone %x, i32 %n, ptr nocapture readonly %p,
ptr nocapture readonly %q, ptr %b) {
entry:
%cmp = icmp eq i32 %n, 0
br i1 %cmp, label %return, label %if.end
if.end: ; preds = %entry
%div = lshr i32 %n, 3
%cmp149 = icmp eq i32 %div, 0
br i1 %cmp149, label %for.end, label %for.body.preheader
for.body.preheader: ; preds = %if.end
br label %for.body
for.body: ; preds = %for.body.preheader, %for.inc
%arrayidx.phi = phi ptr [ %arrayidx.inc, %for.inc ], [ %p, %for.body.preheader ]
%arrayidx2.phi = phi ptr [ %arrayidx2.inc, %for.inc ], [ %q, %for.body.preheader ]
%i.050 = phi i32 [ %inc, %for.inc ], [ 0, %for.body.preheader ]
%0 = load i8, ptr %arrayidx.phi, align 1
%1 = load i8, ptr %arrayidx2.phi, align 1
%cmp4 = icmp eq i8 %0, %1
br i1 %cmp4, label %for.inc, label %for.end.loopexit
for.inc: ; preds = %for.body
%arrayidx2.inc = getelementptr i8, ptr %arrayidx2.phi, i32 1
%arrayidx.inc = getelementptr i8, ptr %arrayidx.phi, i32 1
%inc = add nuw nsw i32 %i.050, 1
%cmp1 = icmp ult i32 %inc, %div
br i1 %cmp1, label %for.body, label %for.end.loopexit
for.end.loopexit: ; preds = %for.body, %for.inc
%i.0.lcssa.ph = phi i32 [ %i.050, %for.body ], [ %inc, %for.inc ]
br label %for.end
for.end: ; preds = %for.end.loopexit, %if.end
%i.0.lcssa = phi i32 [ 0, %if.end ], [ %i.0.lcssa.ph, %for.end.loopexit ]
%cmp8 = icmp eq i32 %i.0.lcssa, %div
br i1 %cmp8, label %if.end30, label %if.then10
if.then10: ; preds = %for.end
%rem = and i32 %n, 7
%cmp11 = icmp eq i32 %rem, 0
br i1 %cmp11, label %return, label %if.end14
if.end14: ; preds = %if.then10
%sub = sub nsw i32 8, %rem
%shl = shl i32 1, %sub
%sub16 = add i32 %shl, 255
%arrayidx18 = getelementptr inbounds i8, ptr %p, i32 %i.0.lcssa
%2 = load i8, ptr %arrayidx18, align 1
%sub16.not = or i32 %sub16, -256
%neg = xor i32 %sub16.not, 255
%arrayidx21 = getelementptr inbounds i8, ptr %q, i32 %i.0.lcssa
%3 = load i8, ptr %arrayidx21, align 1
%4 = xor i8 %3, %2
%5 = zext i8 %4 to i32
%6 = and i32 %5, %neg
%cmp26 = icmp eq i32 %6, 0
br i1 %cmp26, label %return, label %if.end30
if.end30: ; preds = %for.end, %if.end14
%cmp31 = icmp eq ptr %b, null
br i1 %cmp31, label %return, label %if.then33
if.then33: ; preds = %if.end30
store i8 0, ptr %b, align 1
br label %return
return: ; preds = %if.end30, %if.then33, %if.end14, %if.then10, %entry
%retval.0 = phi i32 [ 0, %entry ], [ 1, %if.then10 ], [ 1, %if.end14 ], [ 0, %if.then33 ], [ 0, %if.end30 ]
ret i32 %retval.0
}