summaryrefslogtreecommitdiffstats
path: root/llvm/test/DebugInfo/debugify-bogus-dbg-value.ll
Commit message (Collapse)AuthorAgeFilesLines
* [Debugify] Allow unsigned values narrower than their variablesVedant Kumar2018-07-061-3/+10
| | | | | | | | Suppress the diagnostic for mis-sized dbg.values when a value operand is narrower than the unsigned variable it describes. Assume that a debugger would implicitly zero-extend these values. llvm-svn: 336452
* [Debugify] Diagnose mis-sized dbg.valuesVedant Kumar2018-06-261-0/+52
Report an error in -check-debugify when the size of a dbg.value operand doesn't match up with the size of the variable it describes. Eventually this check should be moved into the IR verifier. For the moment, it's useful to include the check in -check-debugify as a means of catching regressions and finding existing bugs. Here are some instances of bugs the new check finds in the -O2 pipeline (all in InstCombine): 1) A float is used where a double is expected: ERROR: dbg.value operand has size 32, but its variable has size 64: call void @llvm.dbg.value(metadata float %expf, metadata !12, metadata !DIExpression()), !dbg !15 2) An i8 is used where an i32 is expected: ERROR: dbg.value operand has size 8, but its variable has size 32: call void @llvm.dbg.value(metadata i8 %t4, metadata !14, metadata !DIExpression()), !dbg !24 3) A <4 x i32> is used where something twice as large is expected (perhaps a <4 x i64>, I haven't double-checked): ERROR: dbg.value operand has size 128, but its variable has size 256: call void @llvm.dbg.value(metadata <4 x i32> %4, metadata !40, metadata !DIExpression()), !dbg !95 Differential Revision: https://reviews.llvm.org/D48408 llvm-svn: 335682
OpenPOWER on IntegriCloud