diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2021-02-24 05:21:30 -0300 |
---|---|---|
committer | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-07-22 21:51:22 -0400 |
commit | e87a502da2d5a8356a639d53c0a16a77890de4c7 (patch) | |
tree | 00fd1a9a32c0334c49189098829b782a37533c46 /src/shader_recompiler/frontend/ir/value.cpp | |
parent | 9d6a98d950da39dd2a7ca5ad25525de4fb825415 (diff) |
shader: Fix control flow
Diffstat (limited to 'src/shader_recompiler/frontend/ir/value.cpp')
-rw-r--r-- | src/shader_recompiler/frontend/ir/value.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/shader_recompiler/frontend/ir/value.cpp b/src/shader_recompiler/frontend/ir/value.cpp index 718314213d..791ba26906 100644 --- a/src/shader_recompiler/frontend/ir/value.cpp +++ b/src/shader_recompiler/frontend/ir/value.cpp @@ -36,6 +36,10 @@ bool Value::IsIdentity() const noexcept { return type == Type::Opaque && inst->Opcode() == Opcode::Identity; } +bool Value::IsPhi() const noexcept { + return type == Type::Opaque && inst->Opcode() == Opcode::Phi; +} + bool Value::IsEmpty() const noexcept { return type == Type::Void; } @@ -52,7 +56,7 @@ bool Value::IsLabel() const noexcept { } IR::Type Value::Type() const noexcept { - if (IsIdentity()) { + if (IsIdentity() || IsPhi()) { return inst->Arg(0).Type(); } if (type == Type::Opaque) { |