[RISCV] Don't getDebugLoc for the end node of MBB iterator
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 Reviewed By: luismarques Differential Revision: https://reviews.llvm.org/D123679
Loading
Please sign in to comment