diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2021-03-30 03:19:50 -0300 |
---|---|---|
committer | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-07-22 21:51:25 -0400 |
commit | 514a6b07eedace58b4a0c95282bdfc729623d1d9 (patch) | |
tree | b384c882fa5e24ce9a0a2d287076d23949b3e266 /src/shader_recompiler/frontend/ir/microinstruction.cpp | |
parent | b0d5572abfe1f14e02d8219f0a4d7dd09ff36fd1 (diff) |
shader: Store type of phi nodes in flags
This is needed because pseudo-instructions where invalidated.
Diffstat (limited to 'src/shader_recompiler/frontend/ir/microinstruction.cpp')
-rw-r--r-- | src/shader_recompiler/frontend/ir/microinstruction.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
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); } |