xref: /llvm-project/llvm/test/DebugInfo/salvage-cast-debug-info.ll (revision 094572701dce4aaf36f4521d6cf750420d39f206)
1; RUN: opt %s -passes=debugify,early-cse -earlycse-debug-hash -S | FileCheck %s
2; RUN: opt --experimental-debuginfo-iterators=false %s -passes=debugify,early-cse -earlycse-debug-hash -S | FileCheck %s
3define i32 @foo(i64 %nose, i32 %more) {
4; CHECK-LABEL: @foo(
5; CHECK: #dbg_value(i64 %nose, [[V1:![0-9]+]], !DIExpression(DW_OP_LLVM_convert, 64, DW_ATE_unsigned, DW_OP_LLVM_convert, 32, DW_ATE_unsigned
6; CHECK: #dbg_value(i64 %nose.shift, [[V2:![0-9]+]]
7; CHECK: #dbg_value(i64 %nose.shift, [[V3:![0-9]+]], !DIExpression(DW_OP_LLVM_convert, 64, DW_ATE_unsigned, DW_OP_LLVM_convert, 32, DW_ATE_unsigned
8
9entry:
10  %nose.trunc = trunc i64 %nose to i32
11  %nose.shift = lshr i64 %nose, 32
12  %nose.trunc.2 = trunc i64 %nose.shift to i32
13  %add = add nsw i32 %more, 1
14  ret i32 %add
15}
16
17!llvm.module.flags = !{!0, !1}
18!llvm.ident = !{!2}
19
20!0 = !{i32 1, !"wchar_size", i32 2}
21!1 = !{i32 7, !"PIC Level", i32 2}
22!2 = !{!"clang version 10.0.0 "}
23
24; CHECK: [[V1]] = !DILocalVariable(
25; CHECK: [[V2]] = !DILocalVariable(
26; CHECK: [[V3]] = !DILocalVariable(
27