[PATCH] D123679: [RISCV] Don't getDebugLoc for the end node of MBB iterator

luxufan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 13 06:53:15 PDT 2022


StephenFan created this revision.
StephenFan added reviewers: jrtc27, asb, luismarques, lewis-revill, evandro.
Herald added subscribers: sunshaoce, VincentWu, luke957, vkmr, frasercrmck, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, kito-cheng, niosHD, sabuasal, simoncook, johnrusso, rbar, hiraditya, arichardson.
Herald added a project: All.
StephenFan requested review of this revision.
Herald added subscribers: llvm-commits, pcwang-thead, eopXD, MaskRay.
Herald added a project: LLVM.

Because of shrink wrapping, the block to insert epilog may don't have
instructions (Only debug instructions). And the position to insert may
point to MBB.end() that don't have a DebugLoc. This patch fix this
problem.

The test program was copied from the issue:https://github.com/llvm/llvm-project/issues/53662


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D123679

Files:
  llvm/lib/Target/RISCV/RISCVFrameLowering.cpp
  llvm/test/CodeGen/RISCV/xform_ah-min.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D123679.422503.patch
Type: text/x-patch
Size: 5714 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220413/511346b4/attachment.bin>


More information about the llvm-commits mailing list