summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorVedant Kumar <vsk@apple.com>2018-06-26 22:46:41 +0000
committerVedant Kumar <vsk@apple.com>2018-06-26 22:46:41 +0000
commitb9c1a234d2c8a3f82d4d45b74bc1ea90bcb79195 (patch)
treed914d9ddc78418b2895eb8974e7e3b76ada63665 /clang/lib
parent289a7d4c7da8c408d5f9ddb06424d31b4b911b42 (diff)
downloadbcm5719-llvm-b9c1a234d2c8a3f82d4d45b74bc1ea90bcb79195.tar.gz
bcm5719-llvm-b9c1a234d2c8a3f82d4d45b74bc1ea90bcb79195.zip
[Debugify] Diagnose mis-sized dbg.values
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
Diffstat (limited to 'clang/lib')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud