[PATCH] D88684: llvm-reduce: Don't replace intrinsic calls with undef

Yuanfang Chen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 7 18:48:27 PDT 2020


ychen added a comment.

In D88684#2318361 <https://reviews.llvm.org/D88684#2318361>, @arsenm wrote:

> In D88684#2318108 <https://reviews.llvm.org/D88684#2318108>, @ychen wrote:
>
>> The test tieing to AMDGPU seems less ideal for general functionality. I've seen llvm.dbg.value caused the same problem, maybe we could use that?
>
> The debug intrinsics require a *lot* of metadata overhead simply to satsify the operations. The other metadata using intrinsics are experimental, so this seemed like the least fragile way to test it

How about this one? Adapted and reduced from llvm/test/Verifier/llvm.dbg.intrinsic-dbg-attachment.ll.

  define void @foo() {
  entry:
    call void @llvm.dbg.value(
        metadata i8* undef,
        metadata !DILocalVariable(scope: !3),
        metadata !DIExpression()),
      !dbg !DILocation(scope: !3)
    ret void
  }
  
  declare void @llvm.dbg.value(metadata, metadata, metadata)
  
  !llvm.module.flags = !{!0}
  !0 = !{i32 2, !"Debug Info Version", i32 3}
  !1 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !2)
  !2 = !DIFile(filename: "f2", directory: "")
  !3 = distinct !DISubprogram(name: "foo", unit: !1)




CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D88684/new/

https://reviews.llvm.org/D88684



More information about the llvm-commits mailing list