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

Jay Foad via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 29 00:42:25 PDT 2025


================
@@ -68,6 +69,23 @@ bool SSAContext::isConstantOrUndefValuePhi(const Instruction &Instr) {
   return false;
 }
 
+template <>
+void SSAContext::getPhiInputs(
+    const Instruction &Instr, SmallVectorImpl<const Value *> &Values,
+    SmallVectorImpl<const BasicBlock *> &Blocks) const {
+  if (auto *Phi = dyn_cast<PHINode>(&Instr)) {
----------------
jayfoad wrote:

Same here, Instr must be a PHINode

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


More information about the llvm-commits mailing list