[llvm] [Matrix] Propagate shape information through PHI insts (PR #141681)
Jon Roelofs via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 2 08:04:23 PDT 2025
================
@@ -561,6 +590,27 @@ class LowerMatrixIntrinsics {
MatrixVal = M.embedInVector(Builder);
}
+ // If it's a PHI, split it now. We'll take care of fixing up the operands
+ // later once we're in VisitPHI.
+ if (auto *PHI = dyn_cast<PHINode>(MatrixVal)) {
----------------
jroelofs wrote:
If the PHI is lowered after one of its users (which might be another PHI), then getMatrix would embed the matrix in a vector on behalf of the PHI which we want to replace, which is exactly what we're trying to avoid. I'm not sure it _needs_ to be here, but I don't see a better way to do it. Open to suggestions if you've got something in mind.
https://github.com/llvm/llvm-project/pull/141681
More information about the llvm-commits
mailing list