diff options
| author | stozer <stephen.tozer@sony.com> | 2019-12-17 09:37:17 +0000 |
|---|---|---|
| committer | stozer <stephen.tozer@sony.com> | 2019-12-18 11:09:18 +0000 |
| commit | bb1b0bc4e57428ce364d3d6c075ff03cb8973462 (patch) | |
| tree | 94b07c626e27d7f5000cf1c316dfc6d6c600c8e4 /llvm/test/Transforms/InstCombine/unavailable-debug.ll | |
| parent | bc5b7e21e32b23603f4d6148adeb88cd34dd287e (diff) | |
| download | bcm5719-llvm-bb1b0bc4e57428ce364d3d6c075ff03cb8973462.tar.gz bcm5719-llvm-bb1b0bc4e57428ce364d3d6c075ff03cb8973462.zip | |
[DebugInfo] Correctly handle salvaged casts and split fragments at ISel
Previously, LLVM had no functional way of performing casts inside of a
DIExpression(), which made salvaging cast instructions other than Noop
casts impossible. This patch enables the salvaging of casts by using the
DW_OP_LLVM_convert operator for SExt and Trunc instructions.
There is another issue which is exposed by this fix, in which fragment
DIExpressions (which are preserved more readily by this patch) for
values that must be split across registers in ISel trigger an assertion,
as the 'split' fragments extend beyond the bounds of the fragment
DIExpression causing an error. This patch also fixes this issue by
checking the fragment status of DIExpressions which are to be split, and
dropping fragments that are invalid.
Diffstat (limited to 'llvm/test/Transforms/InstCombine/unavailable-debug.ll')
| -rw-r--r-- | llvm/test/Transforms/InstCombine/unavailable-debug.ll | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/test/Transforms/InstCombine/unavailable-debug.ll b/llvm/test/Transforms/InstCombine/unavailable-debug.ll index 703c1c2898f..e3f0d7cf22d 100644 --- a/llvm/test/Transforms/InstCombine/unavailable-debug.ll +++ b/llvm/test/Transforms/InstCombine/unavailable-debug.ll @@ -2,7 +2,7 @@ ; Make sure to update the debug value after dead code elimination. ; CHECK: %call = call signext i8 @b(i32 6), !dbg !39 -; CHECK-NEXT: call void @llvm.dbg.value(metadata i32 undef, metadata !30, metadata !DIExpression()), !dbg !38 +; CHECK-NEXT: call void @llvm.dbg.value(metadata i8 %call, metadata !30, metadata !DIExpression(DW_OP_LLVM_convert, 8, DW_ATE_signed, DW_OP_LLVM_convert, 32, DW_ATE_signed, DW_OP_stack_value)), !dbg !38 @e = common local_unnamed_addr global i8 0, align 1, !dbg !0 @c = common local_unnamed_addr global i32 0, align 4, !dbg !6 |

