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
43 lines
1.6 KiB
LLVM
43 lines
1.6 KiB
LLVM
; NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 6
|
|
; RUN: llc -O2 -stop-after=branch-folder %s -o - | FileCheck %s
|
|
|
|
; BranchFolder tail-merge dedups MachineMemOperands using
|
|
; MachineMemOperand::operator==. That comparison must include atomic
|
|
; ordering and syncscope so that a `load atomic monotonic` is never
|
|
; treated as identical to a plain `load` from the same address. If the
|
|
; comparison ignored ordering, the two blocks below would be tail-merged
|
|
; into a single `(load (s32))` MMO and the monotonic ordering would be
|
|
; silently dropped from the resulting machine code.
|
|
;
|
|
; With the fix, BranchFolder still tail-merges the two identical
|
|
; MOV32rm instructions (their operands are identical), but
|
|
; cloneMergedMemRefs keeps both MMOs because they differ in atomic
|
|
; ordering. Downstream passes therefore see the more-restrictive
|
|
; monotonic ordering and cannot reorder past synchronization points.
|
|
|
|
target triple = "x86_64-unknown-linux-gnu"
|
|
|
|
define i32 @no_drop_atomic_ordering(i1 %c, ptr %p) {
|
|
; CHECK-LABEL: name: no_drop_atomic_ordering
|
|
; CHECK: bb.0.entry:
|
|
; CHECK-NEXT: liveins: $edi, $rsi
|
|
; CHECK-NEXT: {{ $}}
|
|
; CHECK-NEXT: TEST8ri renamable $dil, 1, implicit-def $eflags, implicit killed $edi
|
|
; CHECK-NEXT: renamable $eax = MOV32rm killed renamable $rsi, 1, $noreg, 0, $noreg :: (load (s32) from %ir.p), (load monotonic (s32) from %ir.p)
|
|
; CHECK-NEXT: RET 0, $eax
|
|
entry:
|
|
br i1 %c, label %a, label %b
|
|
|
|
a:
|
|
%la = load atomic i32, ptr %p monotonic, align 4
|
|
br label %end
|
|
|
|
b:
|
|
%lb = load i32, ptr %p, align 4
|
|
br label %end
|
|
|
|
end:
|
|
%v = phi i32 [ %la, %a ], [ %lb, %b ]
|
|
ret i32 %v
|
|
}
|