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
124 lines
4.2 KiB
YAML
124 lines
4.2 KiB
YAML
# Prevent the machine scheduler from moving instructions past FAKE_USE.
|
|
# RUN: llc -run-pass machine-scheduler -mtriple=x86_64-unknown-linux -debug-only=machine-scheduler 2>&1 -o - %s | FileCheck %s
|
|
# REQUIRES: asserts
|
|
#
|
|
# We make sure that, beginning with the first FAKE_USE instruction,
|
|
# no changes to the sequence of instructions are undertaken by the
|
|
# scheduler. We don't bother to check that the order of the FAKE_USEs
|
|
# remains the same. They should, but it is irrelevant.
|
|
#
|
|
# CHECK: ********** MI Scheduling **********
|
|
# CHECK-NEXT: foo:%bb.0 entry
|
|
# CHECK-NEXT: From: %0:gr64 = COPY $rdi
|
|
# CHECK-NEXT: To: FAKE_USE %5:gr64
|
|
# CHECK-NEXT: RegionInstrs: 7
|
|
#
|
|
# CHECK: ********** MI Scheduling **********
|
|
# CHECK-NEXT: bar:%bb.0 entry
|
|
# CHECK-NEXT: From: %0:gr64 = COPY $rdi
|
|
# CHECK-NEXT: To: RET 0, killed $rax
|
|
# CHECK-NEXT: RegionInstrs: 7
|
|
#
|
|
--- |
|
|
; ModuleID = 'test.ll'
|
|
source_filename = "test.ll"
|
|
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
|
|
|
|
@glb = common dso_local local_unnamed_addr global [100 x i32] zeroinitializer, align 16
|
|
|
|
define dso_local i64 @foo(ptr %p) local_unnamed_addr optdebug {
|
|
entry:
|
|
%0 = load i32, ptr @glb, align 16
|
|
store i32 %0, ptr %p, align 4
|
|
%conv = sext i32 %0 to i64
|
|
%1 = load i32, ptr getelementptr inbounds ([100 x i32], ptr @glb, i64 0, i64 1), align 4
|
|
%arrayidx1 = getelementptr inbounds i32, ptr %p, i64 1
|
|
store i32 %1, ptr %arrayidx1, align 4
|
|
%conv2 = sext i32 %1 to i64
|
|
%add3 = add nsw i64 %conv2, %conv
|
|
notail call void (...) @llvm.fake.use(i64 %add3)
|
|
notail call void (...) @llvm.fake.use(i32 %1)
|
|
notail call void (...) @llvm.fake.use(i32 %0)
|
|
notail call void (...) @llvm.fake.use(ptr %p)
|
|
ret i64 %add3
|
|
}
|
|
|
|
define dso_local i64 @bar(ptr %p) local_unnamed_addr optdebug {
|
|
entry:
|
|
%0 = load i32, ptr @glb, align 16
|
|
store i32 %0, ptr %p, align 4
|
|
%conv = sext i32 %0 to i64
|
|
%1 = load i32, ptr getelementptr inbounds ([100 x i32], ptr @glb, i64 0, i64 1), align 4
|
|
%arrayidx1 = getelementptr inbounds i32, ptr %p, i64 1
|
|
store i32 %1, ptr %arrayidx1, align 4
|
|
%conv2 = sext i32 %1 to i64
|
|
%add3 = add nsw i64 %conv2, %conv
|
|
ret i64 %add3
|
|
}
|
|
|
|
; Function Attrs: nocallback nofree nosync nounwind willreturn
|
|
declare void @llvm.stackprotector(ptr, ptr)
|
|
|
|
...
|
|
---
|
|
name: foo
|
|
alignment: 16
|
|
tracksRegLiveness: true
|
|
debugInstrRef: true
|
|
registers:
|
|
- { id: 0, class: gr64, preferred-register: '' }
|
|
- { id: 1, class: gr64_with_sub_8bit, preferred-register: '' }
|
|
- { id: 2, class: gr32, preferred-register: '' }
|
|
- { id: 3, class: gr64_with_sub_8bit, preferred-register: '' }
|
|
- { id: 4, class: gr32, preferred-register: '' }
|
|
- { id: 5, class: gr64, preferred-register: '' }
|
|
liveins:
|
|
- { reg: '$rdi', virtual-reg: '%0' }
|
|
body: |
|
|
bb.0.entry:
|
|
liveins: $rdi
|
|
|
|
%0:gr64 = COPY $rdi
|
|
%1:gr64_with_sub_8bit = MOVSX64rm32 $rip, 1, $noreg, @glb, $noreg
|
|
MOV32mr %0, 1, $noreg, 0, $noreg, %1.sub_32bit
|
|
%3:gr64_with_sub_8bit = MOVSX64rm32 $rip, 1, $noreg, @glb + 4, $noreg
|
|
MOV32mr %0, 1, $noreg, 4, $noreg, %3.sub_32bit
|
|
%5:gr64 = COPY %3
|
|
%5:gr64 = nsw ADD64rr %5, %1, implicit-def dead $eflags
|
|
FAKE_USE %5
|
|
FAKE_USE %3.sub_32bit
|
|
FAKE_USE %1.sub_32bit
|
|
FAKE_USE %0
|
|
$rax = COPY %5
|
|
RET 0, killed $rax
|
|
|
|
...
|
|
---
|
|
name: bar
|
|
alignment: 16
|
|
tracksRegLiveness: true
|
|
debugInstrRef: true
|
|
registers:
|
|
- { id: 0, class: gr64, preferred-register: '' }
|
|
- { id: 1, class: gr64_with_sub_8bit, preferred-register: '' }
|
|
- { id: 2, class: gr32, preferred-register: '' }
|
|
- { id: 3, class: gr64_with_sub_8bit, preferred-register: '' }
|
|
- { id: 4, class: gr32, preferred-register: '' }
|
|
- { id: 5, class: gr64_with_sub_8bit, preferred-register: '' }
|
|
liveins:
|
|
- { reg: '$rdi', virtual-reg: '%0' }
|
|
body: |
|
|
bb.0.entry:
|
|
liveins: $rdi
|
|
|
|
%0:gr64 = COPY $rdi
|
|
%1:gr64_with_sub_8bit = MOVSX64rm32 $rip, 1, $noreg, @glb, $noreg
|
|
MOV32mr %0, 1, $noreg, 0, $noreg, %1.sub_32bit
|
|
%5:gr64_with_sub_8bit = MOVSX64rm32 $rip, 1, $noreg, @glb + 4, $noreg
|
|
MOV32mr %0, 1, $noreg, 4, $noreg, %5.sub_32bit
|
|
%5:gr64_with_sub_8bit = nsw ADD64rr %5, %1, implicit-def dead $eflags
|
|
$rax = COPY %5
|
|
RET 0, killed $rax
|
|
|
|
...
|