[PATCH] D152408: AMDGPU: Avoid endpgm in middle of block for fallback trap lowering.
Ruiling, Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 7 18:37:49 PDT 2023
ruiling accepted this revision.
ruiling added a comment.
This revision is now accepted and ready to land.
I think we definitely should do this! just one inline comment.
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp:5669
+ if (std::next(MI.getIterator()) == BB.end()) {
+ BuildMI(BB, BB.end(), DL, B.getTII().get(AMDGPU::S_ENDPGM))
+ .addImm(0);
----------------
I am not sure whether BB might have a fall-through successor here, an assertion saying that won't happen might be helpful. We not only want s_endpgm be terminator, but also the end of function.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D152408/new/
https://reviews.llvm.org/D152408
More information about the llvm-commits
mailing list