From 514a6b07eedace58b4a0c95282bdfc729623d1d9 Mon Sep 17 00:00:00 2001
From: ReinUsesLisp <reinuseslisp@airmail.cc>
Date: Tue, 30 Mar 2021 03:19:50 -0300
Subject: shader: Store type of phi nodes in flags

This is needed because pseudo-instructions where invalidated.
---
 src/shader_recompiler/frontend/ir/microinstruction.cpp | 4 ++++
 1 file changed, 4 insertions(+)

(limited to 'src/shader_recompiler/frontend/ir/microinstruction.cpp')

diff --git a/src/shader_recompiler/frontend/ir/microinstruction.cpp b/src/shader_recompiler/frontend/ir/microinstruction.cpp
index c3ba6b5222..074c71d533 100644
--- a/src/shader_recompiler/frontend/ir/microinstruction.cpp
+++ b/src/shader_recompiler/frontend/ir/microinstruction.cpp
@@ -193,6 +193,10 @@ void Inst::AddPhiOperand(Block* predecessor, const Value& value) {
     if (!value.IsImmediate()) {
         Use(value);
     }
+    if (Flags<IR::Type>() == IR::Type::Void) {
+        // Set the type of the phi node
+        SetFlags<IR::Type>(value.Type());
+    }
     phi_args.emplace_back(predecessor, value);
 }
 
-- 
cgit v1.2.3-70-g09d2