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

57 lines
2.0 KiB
LLVM

; Test MD_prof "VP" validation
; RUN: split-file %s %t
; RUN: opt -passes=verify %t/valid.ll --disable-output
; RUN: not opt -passes=verify %t/invalid-kind.ll --disable-output 2>&1 | FileCheck %s --check-prefix=INVALID-KIND
; RUN: not opt -passes=verify %t/invalid-count.ll --disable-output 2>&1 | FileCheck %s --check-prefix=INVALID-COUNT
; RUN: not opt -passes=verify %t/invalid-place.ll --disable-output 2>&1 | FileCheck %s --check-prefix=INVALID-PLACE
; RUN: not opt -passes=verify %t/invalid-duplicate-values.ll -disable-output 2>&1 | FileCheck %s --check-prefix=INVALID-DUPLICATE-VALUES
; RUN: not opt -passes=verify %t/invalid-value-not-const-int.ll -disable-output 2>&1 | FileCheck %s --check-prefix=INVALID-VALUE-NOT-CONST-INT
;--- valid.ll
define void @test(ptr %0) {
call void %0(), !prof !0
ret void
}
!0 = !{!"VP", i32 0, i32 20, i64 1234, i64 10, i64 5678, i64 5}
;--- invalid-kind.ll
define void @test(ptr %0) {
call void %0(), !prof !0
ret void
}
!0 = !{!"VP", i32 3, i32 20, i64 1234, i64 10, i64 5678, i64 5}
; INVALID-KIND: Invalid VP !prof kind
;--- invalid-count.ll
define void @test(ptr %0) {
call void %0(), !prof !0
ret void
}
!0 = !{!"VP", i32 1, i64 1234, i64 10, i64 5678, i64 5}
; INVALID-COUNT: VP !prof should have an even number of arguments after 'VP'
;--- invalid-place.ll
define i32 @test(i32 %0) {
%r = add i32 %0, 1, !prof !0
ret i32 %r
}
!0 = !{!"VP", i32 1, i32 20, i64 1234, i64 10, i64 5678, i64 5}
; INVALID-PLACE: VP !prof indirect call or memop size expected to be applied to CallBase instructions only
;--- invalid-duplicate-values.ll
define void @test(ptr %0) {
call void %0(), !prof !0
ret void
}
!0 = !{!"VP", i32 0, i64 1234, i64 72657670687977694852, i64 1, i64 72657670687977694852, i64 2}
; INVALID-DUPLICATE-VALUES: VP !prof should not have duplicate profile values
;--- invalid-value-not-const-int.ll
define void @test(ptr %0) {
call void %0(), !prof !0
ret void
}
!0 = !{!"VP", i32 0, i64 100, !"oops", i64 50}
; INVALID-VALUE-NOT-CONST-INT: VP !prof value operand is not a const int