Files
TheRock/compiler/amd-llvm/llvm/test/CodeGen/X86/basic-block-sections-module2.ll
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

125 lines
4.4 KiB
LLVM

;; This file tests various ways of specifying the debug info filename in the basic block sections profile.
;; Specifying correct filenames.
; RUN: echo '!test1 M=./test_dirname1/test_filename1' > %t1
; RUN: echo '!!0' >> %t1
; RUN: echo '!test2 M=.//test_filename2' >> %t1
; RUN: echo '!!0' >> %t1
; RUN: echo '!test3 M=test_filename3' >> %t1
; RUN: echo '!!0' >> %t1
; RUN: echo '!test4 M=/test_dirname4/test_filename4' >> %t1
; RUN: echo '!!0' >> %t1
; RUN: echo '!test5' >> %t1
; RUN: echo '!!0' >> %t1
; RUN: llc < %s -mtriple=x86_64 -function-sections -basic-block-sections=%t1 | FileCheck %s -check-prefix=RIGHT-MODULE
;; Specifying wrong filenames.
; RUN: echo '!test1 M=/test_dirname/test_filename1' > %t2
; RUN: echo '!!0' >> %t2
; RUN: echo '!test1 M=../test_filename1' >> %t2
; RUN: echo '!!0' >> %t2
; RUN: echo '!test2 M=.test_filename2' >> %t2
; RUN: echo '!!0' >> %t2
; RUN: echo '!test4 M=./test_dirname4/test_filename4' >> %t2
; RUN: echo '!!0' >> %t2
; RUN: echo '!test5 M=any_filename' >> %t1
; RUN: echo '!!0' >> %t1
; RUN: llc < %s -mtriple=x86_64 -function-sections -basic-block-sections=%t2 | FileCheck %s -check-prefix=WRONG-MODULE
define dso_local i32 @test1(i32 noundef %0) #0 !dbg !10 {
%2 = alloca i32, align 4
%3 = alloca i32, align 4
store i32 %0, ptr %3, align 4
%4 = load i32, ptr %3, align 4
%5 = icmp slt i32 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 -1, ptr %2, align 4
ret i32 0
7:
ret i32 1
}
define dso_local i32 @test2(i32 noundef %0) #0 !dbg !11 {
%2 = alloca i32, align 4
%3 = alloca i32, align 4
store i32 %0, ptr %3, align 4
%4 = load i32, ptr %3, align 4
%5 = icmp slt i32 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 -1, ptr %2, align 4
ret i32 0
7:
ret i32 1
}
define dso_local i32 @test3(i32 noundef %0) #0 !dbg !12 {
%2 = alloca i32, align 4
%3 = alloca i32, align 4
store i32 %0, ptr %3, align 4
%4 = load i32, ptr %3, align 4
%5 = icmp slt i32 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 -1, ptr %2, align 4
ret i32 0
7:
ret i32 1
}
define dso_local i32 @test4(i32 noundef %0) #0 !dbg !13 {
%2 = alloca i32, align 4
%3 = alloca i32, align 4
store i32 %0, ptr %3, align 4
%4 = load i32, ptr %3, align 4
%5 = icmp slt i32 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 -1, ptr %2, align 4
ret i32 0
7:
ret i32 1
}
define dso_local i32 @test5(i32 noundef %0) #0 {
%2 = alloca i32, align 4
%3 = alloca i32, align 4
store i32 %0, ptr %3, align 4
%4 = load i32, ptr %3, align 4
%5 = icmp slt i32 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 -1, ptr %2, align 4
ret i32 0
7:
ret i32 1
}
!llvm.dbg.cu = !{!0, !1, !2, !3}
!14 = !{null}
!15 = !DISubroutineType(types: !14)
!llvm.module.flags = !{!8, !9}
!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !4)
!1 = distinct !DICompileUnit(language: DW_LANG_C99, file: !5)
!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !6)
!3 = distinct !DICompileUnit(language: DW_LANG_C99, file: !7)
!4 = !DIFile(filename: "test_dirname1/test_filename1", directory: "test_dirname1")
!5 = !DIFile(filename: "test_filename2", directory: "")
!6 = !DIFile(filename: "./test_filename3", directory: ".")
!7 = !DIFile(filename: "/test_dirname4/test_filename4", directory: "/test_dirname4")
!8 = !{i32 7, !"Dwarf Version", i32 5}
!9 = !{i32 2, !"Debug Info Version", i32 3}
!10 = distinct !DISubprogram(name: "test1", scope: !4, type: !15, unit: !0)
!11 = distinct !DISubprogram(name: "test2", scope: !5, type: !15, unit: !1)
!12 = distinct !DISubprogram(name: "test3", scope: !6, type: !15, unit: !2)
!13 = distinct !DISubprogram(name: "test4", scope: !7, type: !15, unit: !3)
;; Check that the split section is created when using the correct module name, or no module name.
;
; RIGHT-MODULE: .section .text.split.test1,"ax",@progbits
; RIGHT-MODULE: .section .text.split.test2,"ax",@progbits
; RIGHT-MODULE: .section .text.split.test3,"ax",@progbits
; RIGHT-MODULE: .section .text.split.test4,"ax",@progbits
; RIGHT-MODULE: .section .text.split.test5,"ax",@progbits
; WRONG-MODULE-NOT: .section .text.split.test{{[1-5]+}},"ax",@progbits