[PATCH] D128539: [GISel] Don't fold convergent instruction across CFG
Quentin Colombet via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 28 10:45:14 PDT 2022
qcolombet added a comment.
> I'm not sure what context this gets called in. Maybe it's possible to hit this for DPP instructions?
This is called during instruction selection from the patterns that have been generated from SDISel.
Essentially, if you have a Pat that takes two or more instructions and fold them.
Thanks for the pointer, I'll take a look.
================
Comment at: llvm/lib/CodeGen/GlobalISel/InstructionSelector.cpp:63
+ // Convergent instructions cannot be moved in the CFG.
+ if (MI.isConvergent() && MI.getParent() != IntoMI.getParent())
+ return false;
----------------
arsenm wrote:
> The block based check will probably break down with convergence tokens. Could this just skip convergent altogether?
We could, but I was worried this would introduce regressions when the pattern would legitimately apply.
In particular, if we don't fold when the things are in the same block, we will regress compared to SDISel.
When the convergence tokens land (they are not landed right?), we'll have to fix SDISel, so maybe it is okay to have to fix GISel at that point?
I.e., for now let's match SDISel?
What do you think?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D128539/new/
https://reviews.llvm.org/D128539
More information about the llvm-commits
mailing list