[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
Fri Apr 22 03:17:00 PDT 2022


StephenFan added a comment.

In D123679#3461601 <https://reviews.llvm.org/D123679#3461601>, @luismarques wrote:

> The fix looks fine.
>
> Can you please clean up the Clang cruft from the MIR test file? And give it a meaningful name?
> Shouldn't we also check the result of the pass?
>
> If it helps, here's an automatically reduced test file, for reference:
>
>   |
>     %struct.a = type { i32 }
>     define i32 @b(%struct.a* %c) {
>       %ab2 = getelementptr inbounds %struct.a, %struct.a* %c, i64 0, i32 0
>       %1 = load i32, i32* %ab2, !tbaa !1
>       br label %e.epilog
>     e.epilog:
>       %a.0.g = phi i32 [ 1, %e.epilog]
>       br label %cleanup
>     cleanup:
>       %f.0 = phi i32 [ %a.0.g, %e.epilog ]
>       ret i32 %f.0}
>     !1 = !{}
>     

Oh, I forget to thank @luismarques  for giving me the reduced test file, and the updated test file is inspired by it. Thanks, Luis! 
But I want to remind you may be your automatically reduced tool is out-of-date, since the reduced test file you give me seems invalid.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D123679



More information about the llvm-commits mailing list