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

61 lines
1.9 KiB
LLVM

; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc -o - %s -mtriple=x86_64--unknown-linux-gnu | FileCheck %s
; When compiled and run this should print zero.
@c = common dso_local local_unnamed_addr global i32 0, align 4
@f = common dso_local local_unnamed_addr global i32 0, align 4
@e = common dso_local local_unnamed_addr global i32 0, align 4
@.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1
; We should only see a single store to f (a bytes store to f+3).
define dso_local void @k(i32 %l) {
; CHECK-LABEL: k:
; CHECK: # %bb.0:
; CHECK-NEXT: movl e(%rip), %eax
; CHECK-NEXT: orl f(%rip), %eax
; CHECK-NEXT: shrl $24, %eax
; CHECK-NEXT: movb %al, f+3(%rip)
; CHECK-NEXT: retq
%load = load i32, ptr @c, align 4
%load6 = load i32, ptr @f, align 4
%clear7 = and i32 %load6, 16777215
store i32 %clear7, ptr @c, align 4
%neg = and i32 %load6, 2097151
%value = xor i32 %neg, 2097151
store i32 %load, ptr @c, align 4
%t0 = load i32, ptr @e, align 4
%value15 = xor i32 %t0, %value
%clear16 = and i32 %load6, -16777216
%set17 = or i32 %value15, %clear16
store i32 %set17, ptr @f, align 4
%clear25 = and i32 %set17, -16777216
%set26 = or i32 %clear25, %clear7
store i32 %set26, ptr @f, align 4
ret void
}
declare i32 @printf(ptr nocapture readonly, ...)
define dso_local i32 @main() {
; CHECK-LABEL: main:
; CHECK: # %bb.0:
; CHECK-NEXT: pushq %rax
; CHECK-NEXT: .cfi_def_cfa_offset 16
; CHECK-NEXT: movl $1, %edi
; CHECK-NEXT: callq k
; CHECK-NEXT: movl f(%rip), %esi
; CHECK-NEXT: movl $.L.str.1, %edi
; CHECK-NEXT: xorl %eax, %eax
; CHECK-NEXT: callq printf@PLT
; CHECK-NEXT: xorl %eax, %eax
; CHECK-NEXT: popq %rcx
; CHECK-NEXT: .cfi_def_cfa_offset 8
; CHECK-NEXT: retq
tail call void @k(i32 1)
%load = load i32, ptr @f, align 4
%call = tail call i32 (ptr, ...) @printf(ptr @.str.1, i32 %load)
ret i32 0
}