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
76 lines
3.4 KiB
LLVM
76 lines
3.4 KiB
LLVM
; RUN: opt -S -passes=dse -dse-memoryssa-scanlimit=2 < %s | FileCheck %s
|
|
; RUN: opt -S -strip-debug -passes=dse -dse-memoryssa-scanlimit=2 < %s | FileCheck %s
|
|
|
|
; Test case to check that DSE gets the same result even if we have a dbg value
|
|
; between the memcpy.
|
|
|
|
; This test case is less relevant for the MemorySSA backed version of DSE, as
|
|
; debug values are not modeled in MemorySSA and are skipped regardless of the
|
|
; exploration limit.
|
|
|
|
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
|
|
target triple = "x86_64-unknown-linux-gnu"
|
|
|
|
@g = common global [1 x i8] zeroinitializer, align 1, !dbg !0
|
|
|
|
; Function Attrs: noinline nounwind uwtable
|
|
define void @foo() !dbg !14 {
|
|
entry:
|
|
%i = alloca i8, align 1
|
|
store i8 1, ptr %i, align 1, !dbg !19
|
|
call void @llvm.dbg.value(metadata i32 0, i64 0, metadata !17, metadata !DIExpression()), !dbg !18
|
|
call void @llvm.dbg.value(metadata i32 0, i64 0, metadata !17, metadata !DIExpression()), !dbg !18
|
|
call void @llvm.dbg.value(metadata i32 0, i64 0, metadata !17, metadata !DIExpression()), !dbg !18
|
|
call void @llvm.dbg.value(metadata i32 0, i64 0, metadata !17, metadata !DIExpression()), !dbg !18
|
|
call void @llvm.dbg.value(metadata i32 0, i64 0, metadata !17, metadata !DIExpression()), !dbg !18
|
|
call void @llvm.dbg.value(metadata i32 0, i64 0, metadata !17, metadata !DIExpression()), !dbg !18
|
|
call void @llvm.memcpy.p0.p0.i64(ptr %i, ptr @g, i64 1, i1 false), !dbg !20
|
|
br label %bb2
|
|
|
|
bb2: ; preds = @g
|
|
ret void, !dbg !21
|
|
}
|
|
|
|
; Function Attrs: nounwind readnone speculatable
|
|
declare void @llvm.dbg.value(metadata, i64, metadata, metadata) #1
|
|
|
|
; Function Attrs: argmemonly nounwind
|
|
declare void @llvm.memcpy.p0.p0.i64(ptr nocapture writeonly, ptr nocapture readonly, i64, i1) #2
|
|
|
|
attributes #1 = { nounwind readnone speculatable }
|
|
attributes #2 = { argmemonly nounwind }
|
|
|
|
!llvm.dbg.cu = !{!2}
|
|
!llvm.module.flags = !{!10, !11, !12}
|
|
!llvm.ident = !{!13}
|
|
|
|
!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())
|
|
!1 = distinct !DIGlobalVariable(name: "g", scope: !2, file: !3, line: 3, type: !6, isLocal: false, isDefinition: true)
|
|
!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "clang version 6.0.0", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, globals: !5)
|
|
!3 = !DIFile(filename: "foo.c", directory: "/bar")
|
|
!4 = !{}
|
|
!5 = !{!0}
|
|
!6 = !DICompositeType(tag: DW_TAG_array_type, baseType: !7, size: 8, elements: !8)
|
|
!7 = !DIBasicType(name: "char", size: 8, encoding: DW_ATE_signed_char)
|
|
!8 = !{!9}
|
|
!9 = !DISubrange(count: 1)
|
|
!10 = !{i32 2, !"Dwarf Version", i32 4}
|
|
!11 = !{i32 2, !"Debug Info Version", i32 3}
|
|
!12 = !{i32 1, !"wchar_size", i32 4}
|
|
!13 = !{!"clang version 6.0.0"}
|
|
!14 = distinct !DISubprogram(name: "foo", scope: !3, file: !3, line: 5, type: !15, isLocal: false, isDefinition: true, scopeLine: 6, isOptimized: false, unit: !2, retainedNodes: !4)
|
|
!15 = !DISubroutineType(types: !16)
|
|
!16 = !{null}
|
|
!17 = !DILocalVariable(name: "i", scope: !14, file: !3, line: 7, type: !7)
|
|
!18 = !DILocation(line: 7, column: 10, scope: !14)
|
|
!19 = !DILocation(line: 8, column: 7, scope: !14)
|
|
!20 = !DILocation(line: 9, column: 5, scope: !14)
|
|
!21 = !DILocation(line: 10, column: 1, scope: !14)
|
|
|
|
; Check that the both the store and memcpy are removed because they both access
|
|
; an alloca that is not read.
|
|
; CHECK-LABEL: foo
|
|
; CHECK-NOT: store i8
|
|
; CHECK-NOT: call void @llvm.memcpy
|
|
; CHECK: ret void
|