[llvm] [Uniformity] Avoid marking all PHIs as divergent in join blocks (PR #157808)

Jay Foad via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 25 03:03:04 PDT 2025


================
@@ -84,6 +84,26 @@ bool MachineSSAContext::isConstantOrUndefValuePhi(const MachineInstr &Phi) {
   return true;
 }
 
+template <>
+void MachineSSAContext::getPhiInputs(
+    const MachineInstr &Phi, SmallVectorImpl<Register> &Values,
+    SmallVectorImpl<const MachineBasicBlock *> &Blocks) const {
+  if (!Phi.isPHI())
----------------
jayfoad wrote:

Surely you can assert this? It would seem weird to define getPhiInputs any other way.

https://github.com/llvm/llvm-project/pull/157808


More information about the llvm-commits mailing list