mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-07-21 07:35:45 +00:00
glasm: Skip phi moves on undefined instructions
This commit is contained in:
parent
91a375b557
commit
459e3b17e6
2 changed files with 16 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue