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
90 lines
4.9 KiB
LLVM
90 lines
4.9 KiB
LLVM
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 4
|
|
; RUN: opt -passes='instcombine' -S < %s | FileCheck %s
|
|
|
|
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"
|
|
target triple = "x86_64-unknown-linux-gnu"
|
|
|
|
define i32 @foo() !dbg !5 {
|
|
; CHECK-LABEL: define i32 @foo(
|
|
; CHECK-SAME: ) !dbg [[DBG5:![0-9]+]] {
|
|
; CHECK-NEXT: entry:
|
|
; CHECK-NEXT: [[VAR:%.*]] = alloca i32, align 4
|
|
; CHECK-NEXT: #dbg_value(i32 42, [[META11:![0-9]+]], !DIExpression(DIOpArg(0, i32)), [[META12:![0-9]+]])
|
|
; CHECK-NEXT: store i32 42, ptr [[VAR]], align 4
|
|
; CHECK-NEXT: #dbg_value(ptr [[VAR]], [[META11]], !DIExpression(DIOpArg(0, ptr), DIOpDeref(i32)), [[META12]])
|
|
; CHECK-NEXT: call void @escape(ptr nonnull [[VAR]])
|
|
; CHECK-NEXT: [[TMP0:%.*]] = load i32, ptr [[VAR]], align 4
|
|
; CHECK-NEXT: #dbg_value(i32 [[TMP0]], [[META11]], !DIExpression(DIOpArg(0, i32)), [[META12]])
|
|
; CHECK-NEXT: ret i32 [[TMP0]]
|
|
;
|
|
entry:
|
|
%var = alloca i32, align 4
|
|
#dbg_declare(ptr %var, !11, !DIExpression(DIOpArg(0, ptr), DIOpDeref(i32)), !12)
|
|
store i32 42, ptr %var, align 4
|
|
call void @escape(ptr %var)
|
|
%0 = load i32, ptr %var, align 4
|
|
ret i32 %0
|
|
}
|
|
|
|
define void @bar() !dbg !15 {
|
|
; CHECK-LABEL: define void @bar(
|
|
; CHECK-SAME: ) !dbg [[DBG13:![0-9]+]] {
|
|
; CHECK-NEXT: [[VAR:%.*]] = alloca i32, align 4, addrspace(5)
|
|
; CHECK-NEXT: [[VAR_ASCAST:%.*]] = addrspacecast ptr addrspace(5) [[VAR]] to ptr
|
|
; CHECK-NEXT: #dbg_value(i32 42, [[META15:![0-9]+]], !DIExpression(DIOpArg(0, i32)), [[META16:![0-9]+]])
|
|
; CHECK-NEXT: store i32 42, ptr [[VAR_ASCAST]], align 4
|
|
; CHECK-NEXT: #dbg_value(ptr addrspace(5) [[VAR]], [[META15]], !DIExpression(DIOpArg(0, ptr addrspace(5)), DIOpDeref(i32)), [[META16]])
|
|
; CHECK-NEXT: call void @escape(ptr nonnull [[VAR_ASCAST]])
|
|
; CHECK-NEXT: ret void
|
|
;
|
|
%var = alloca i32, align 4, addrspace(5)
|
|
%var.ascast = addrspacecast ptr addrspace(5) %var to ptr
|
|
#dbg_declare(ptr addrspace(5) %var, !17, !DIExpression(DIOpArg(0, ptr addrspace(5)), DIOpDeref(i32)), !18)
|
|
store i32 42, ptr %var.ascast, align 4
|
|
call void @escape(ptr %var.ascast)
|
|
ret void
|
|
}
|
|
|
|
declare void @escape(ptr)
|
|
|
|
!llvm.dbg.cu = !{!0}
|
|
!llvm.module.flags = !{!2, !3}
|
|
!llvm.ident = !{!4}
|
|
|
|
!0 = distinct !DICompileUnit(language: DW_LANG_C11, file: !1, producer: "clang 19.0.0", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, splitDebugInlining: false, nameTableKind: None)
|
|
!1 = !DIFile(filename: "t.c", directory: "/")
|
|
!2 = !{i32 7, !"Dwarf Version", i32 5}
|
|
!3 = !{i32 2, !"Debug Info Version", i32 3}
|
|
!4 = !{!"clang 19.0.0"}
|
|
!5 = distinct !DISubprogram(name: "main", scope: !6, file: !6, line: 4, type: !7, scopeLine: 4, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !10)
|
|
!6 = !DIFile(filename: "t.cpp", directory: "/")
|
|
!7 = !DISubroutineType(types: !8)
|
|
!8 = !{!9}
|
|
!9 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
|
|
!10 = !{!11}
|
|
!11 = !DILocalVariable(name: "var", scope: !5, file: !6, line: 5, type: !9)
|
|
!12 = !DILocation(line: 1, column: 1, scope: !5)
|
|
!13 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !9, size: 64)
|
|
!14 = !DILocalVariable(name: "ptr", scope: !5, file: !6, line: 5, type: !13)
|
|
!15 = distinct !DISubprogram(name: "bar", scope: !6, file: !6, line: 4, type: !7, scopeLine: 4, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !16)
|
|
!16 = !{!17}
|
|
!17 = !DILocalVariable(name: "var", scope: !15, file: !6, line: 5, type: !9)
|
|
!18 = !DILocation(line: 1, column: 1, scope: !15)
|
|
|
|
;.
|
|
; CHECK: [[META0:![0-9]+]] = distinct !DICompileUnit(language: DW_LANG_C11, file: [[META1:![0-9]+]], producer: "clang 19.0.0", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, splitDebugInlining: false, nameTableKind: None)
|
|
; CHECK: [[META1]] = !DIFile(filename: "t.c", directory: {{.*}})
|
|
; CHECK: [[DBG5]] = distinct !DISubprogram(name: "main", scope: [[META6:![0-9]+]], file: [[META6]], line: 4, type: [[META7:![0-9]+]], scopeLine: 4, spFlags: DISPFlagDefinition, unit: [[META0]], retainedNodes: [[META10:![0-9]+]])
|
|
; CHECK: [[META6]] = !DIFile(filename: "t.cpp", directory: {{.*}})
|
|
; CHECK: [[META7]] = !DISubroutineType(types: [[META8:![0-9]+]])
|
|
; CHECK: [[META8]] = !{[[META9:![0-9]+]]}
|
|
; CHECK: [[META9]] = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
|
|
; CHECK: [[META10]] = !{[[META11]]}
|
|
; CHECK: [[META11]] = !DILocalVariable(name: "var", scope: [[DBG5]], file: [[META6]], line: 5, type: [[META9]])
|
|
; CHECK: [[META12]] = !DILocation(line: 0, scope: [[DBG5]])
|
|
; CHECK: [[DBG13]] = distinct !DISubprogram(name: "bar", scope: [[META6]], file: [[META6]], line: 4, type: [[META7]], scopeLine: 4, spFlags: DISPFlagDefinition, unit: [[META0]], retainedNodes: [[META14:![0-9]+]])
|
|
; CHECK: [[META14]] = !{[[META15]]}
|
|
; CHECK: [[META15]] = !DILocalVariable(name: "var", scope: [[DBG13]], file: [[META6]], line: 5, type: [[META9]])
|
|
; CHECK: [[META16]] = !DILocation(line: 0, scope: [[DBG13]])
|
|
;.
|