[all-commits] [llvm/llvm-project] f24e2e: [GlobalISel] fix crash in IRTranslator, MachineIRB...

Dominik Montada via All-commits all-commits at lists.llvm.org
Thu Jun 11 01:48:08 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: f24e2e9eebde4b7a1d10b11a2c0acd6fe9905712
      https://github.com/llvm/llvm-project/commit/f24e2e9eebde4b7a1d10b11a2c0acd6fe9905712
  Author: Dominik Montada <dominik.montada at hightec-rt.com>
  Date:   2020-06-11 (Thu, 11 Jun 2020)

  Changed paths:
    M llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp
    M llvm/test/CodeGen/AArch64/GlobalISel/debug-insts.ll

  Log Message:
  -----------
  [GlobalISel] fix crash in IRTranslator, MachineIRBuilder when translating @llvm.dbg.value intrinsic and using -debug

Summary:
Fix crash when using -debug caused by the GlobalISel observer trying to print
an incomplete DBG_VALUE instruction. This was caused by the MachineIRBuilder
using buildInstr, which immediately inserts the instruction causing print,
instead of using BuildMI to first build up the instruction and using
insertInstr when finished.

Add RUN-line to existing debug-insts.ll test with -debug flag set to make sure
no crash is happening.

Also fixed a missing %s in the 2nd RUN-line of the same test.

Reviewers: t.p.northover, aditya_nandakumar, aemerson, dsanders, arsenm

Reviewed By: arsenm

Subscribers: wdng, arsenm, rovka, hiraditya, volkan, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D76934




More information about the All-commits mailing list