fix(shader): stabilize scalar provenance phis in cyclic CFGs

This commit is contained in:
nmzik committed 2026-07-29 21:05:24 +02:00
1 parent 65a0f0baa7
commit 832bc84100
2 files changed
+37 -3

No files matched your search

@@ -784,10 +784,10 @@ private:
if (incoming.empty()) {
return ScalarProvenance::Undefined;
}
if (incoming.size() == 1) {
return incoming[0];
}
if (*phi == ScalarProvenance::Undefined) {
if (incoming.size() == 1) {
return incoming[0];
}
*phi = AddValue({ScalarValueOp::Phi, block.start_pc});
}
m_graph.values[*phi].phi_args = std::move(incoming);