mirror of
https://github.com/RPCS3/llvm.git
synced 2025-02-12 22:30:12 +00:00
![Vedant Kumar](/assets/img/avatar_default.png)
This results in small increases in the size of the .debug_loc section and the number of unique source variables in a stage2 build of opt. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@325301 91177308-0d34-0410-b5e6-96231b3b80d8
16 lines
648 B
LLVM
16 lines
648 B
LLVM
; RUN: opt -debugify -dce -S < %s | FileCheck %s
|
|
; RUN: opt -passes='module(debugify),function(dce)' -S < %s | FileCheck %s
|
|
|
|
; CHECK-LABEL: @test
|
|
define void @test() {
|
|
%add = add i32 1, 2
|
|
; CHECK-NEXT: call void @llvm.dbg.value(metadata i32 1, metadata [[add:![0-9]+]], metadata !DIExpression(DW_OP_plus_uconst, 2, DW_OP_stack_value))
|
|
%sub = sub i32 %add, 1
|
|
; CHECK-NEXT: call void @llvm.dbg.value(metadata i32 1, metadata [[sub:![0-9]+]], metadata !DIExpression(DW_OP_plus_uconst, 2, DW_OP_constu, 1, DW_OP_minus, DW_OP_stack_value))
|
|
; CHECK-NEXT: ret void
|
|
ret void
|
|
}
|
|
|
|
; CHECK: [[add]] = !DILocalVariable
|
|
; CHECK: [[sub]] = !DILocalVariable
|