summaryrefslogtreecommitdiffstats
path: root/src/shader_recompiler/frontend
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/shader_recompiler/frontend/ir/value.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/shader_recompiler/frontend/ir/value.h b/src/shader_recompiler/frontend/ir/value.h
index 0c6bf684d..090cc1739 100644
--- a/src/shader_recompiler/frontend/ir/value.h
+++ b/src/shader_recompiler/frontend/ir/value.h
@@ -395,4 +395,17 @@ inline f64 Value::F64() const {
return inst.GetOpcode() == Opcode::Phi;
}
+[[nodiscard]] inline bool IsUndef(const Inst& inst) {
+ switch (inst.GetOpcode()) {
+ case Opcode::UndefU1:
+ case Opcode::UndefU8:
+ case Opcode::UndefU16:
+ case Opcode::UndefU32:
+ case Opcode::UndefU64:
+ return true;
+ default:
+ return false;
+ }
+}
+
} // namespace Shader::IR