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
75 lines
3.3 KiB
LLVM
75 lines
3.3 KiB
LLVM
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --scrub-attributes
|
|
; RUN: opt < %s -passes=argpromotion -S | FileCheck %s
|
|
|
|
declare void @sink(i32)
|
|
|
|
define internal void @test(ptr %X) !dbg !2 {
|
|
; CHECK-LABEL: define {{[^@]+}}@test
|
|
; CHECK-SAME: (i32 [[X_0_VAL_0_VAL:%.*]]) !dbg [[DBG3:![0-9]+]] {
|
|
; CHECK-NEXT: call void @sink(i32 [[X_0_VAL_0_VAL]])
|
|
; CHECK-NEXT: ret void
|
|
;
|
|
%1 = load ptr, ptr %X, align 8
|
|
%2 = load i32, ptr %1, align 8
|
|
call void @sink(i32 %2)
|
|
ret void
|
|
}
|
|
|
|
%struct.pair = type { i32, i32 }
|
|
|
|
; Do not promote because there is a store of the pointer %P itself. Even if %P
|
|
; had been promoted as a byval argument, the result would have been not
|
|
; optimizable for SROA.
|
|
define internal void @test_byval(ptr byval(%struct.pair) align 4 %P) {
|
|
; CHECK-LABEL: define {{[^@]+}}@test_byval
|
|
; CHECK-SAME: (ptr byval([[STRUCT_PAIR:%.*]]) align 4 [[P:%.*]]) {
|
|
; CHECK-NEXT: [[TMP1:%.*]] = alloca ptr, align 8
|
|
; CHECK-NEXT: store ptr [[P]], ptr [[TMP1]], align 8
|
|
; CHECK-NEXT: ret void
|
|
;
|
|
%1 = alloca ptr, align 8
|
|
store ptr %P, ptr %1, align 8 ; to protect from promotion
|
|
ret void
|
|
}
|
|
|
|
define void @caller(ptr %Y, ptr %P) {
|
|
; CHECK-LABEL: define {{[^@]+}}@caller
|
|
; CHECK-SAME: (ptr [[Y:%.*]], ptr [[P:%.*]]) {
|
|
; CHECK-NEXT: [[Y_VAL:%.*]] = load ptr, ptr [[Y]], align 8, !dbg [[DBG4:![0-9]+]]
|
|
; CHECK-NEXT: [[Y_VAL_VAL:%.*]] = load i32, ptr [[Y_VAL]], align 8, !dbg [[DBG4]]
|
|
; CHECK-NEXT: call void @test(i32 [[Y_VAL_VAL]]), !dbg [[DBG4]]
|
|
; CHECK-NEXT: call void @test_byval(ptr byval([[STRUCT_PAIR:%.*]]) align 4 [[P]]), !dbg [[DBG5:![0-9]+]]
|
|
; CHECK-NEXT: ret void
|
|
;
|
|
call void @test(ptr %Y), !dbg !1
|
|
|
|
call void @test_byval(ptr byval(%struct.pair) align 4 %P), !dbg !6
|
|
ret void
|
|
}
|
|
|
|
|
|
!llvm.module.flags = !{!0}
|
|
!llvm.dbg.cu = !{!3}
|
|
|
|
!0 = !{i32 2, !"Debug Info Version", i32 3}
|
|
!1 = !DILocation(line: 8, scope: !2)
|
|
!2 = distinct !DISubprogram(name: "test", file: !5, line: 3, type: !7, isLocal: true, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, unit: !3, scopeLine: 3, scope: null)
|
|
!3 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: LineTablesOnly, file: !5)
|
|
!5 = !DIFile(filename: "test.c", directory: "")
|
|
!6 = !DILocation(line: 9, scope: !2)
|
|
!7 = !DISubroutineType(types: !8)
|
|
!8 = !{null, !9}
|
|
!9 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !10)
|
|
!10 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
|
|
|
|
; CHECK: !0 = !{i32 2, !"Debug Info Version", i32 3}
|
|
; CHECK-NEXT: !1 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !2, producer: "clang version 3.5.0 ", isOptimized: false, runtimeVersion: 0, emissionKind: LineTablesOnly)
|
|
; CHECK-NEXT: !2 = !DIFile(filename: "test.c", directory: "")
|
|
; CHECK-NEXT: !3 = distinct !DISubprogram(name: "test", scope: null, file: !2, line: 3, type: !4, scopeLine: 3, flags: DIFlagPrototyped, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1)
|
|
; CHECK-NEXT: !4 = !DISubroutineType(cc: DW_CC_nocall, types: !5)
|
|
; CHECK-NEXT: !5 = !{null, !6}
|
|
; CHECK-NEXT: !6 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !7)
|
|
; CHECK-NEXT: !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
|
|
; CHECK-NEXT: !8 = !DILocation(line: 8, scope: !3)
|
|
; CHECK-NEXT: !9 = !DILocation(line: 9, scope: !3)
|