mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-22 23:02:47 +01:00
shader: Fold UnpackFloat2x16 and PackFloat2x16
Simplifies the code a bit when possible. These instructions should be no-ops codegen wise.
This commit is contained in:
parent
23b3333f72
commit
8c9febe8f7
1 changed files with 4 additions and 0 deletions
|
@ -476,6 +476,10 @@ void ConstantPropagation(IR::Block& block, IR::Inst& inst) {
|
||||||
return FoldInverseFunc(inst, IR::Opcode::UnpackHalf2x16);
|
return FoldInverseFunc(inst, IR::Opcode::UnpackHalf2x16);
|
||||||
case IR::Opcode::UnpackHalf2x16:
|
case IR::Opcode::UnpackHalf2x16:
|
||||||
return FoldInverseFunc(inst, IR::Opcode::PackHalf2x16);
|
return FoldInverseFunc(inst, IR::Opcode::PackHalf2x16);
|
||||||
|
case IR::Opcode::PackFloat2x16:
|
||||||
|
return FoldInverseFunc(inst, IR::Opcode::UnpackFloat2x16);
|
||||||
|
case IR::Opcode::UnpackFloat2x16:
|
||||||
|
return FoldInverseFunc(inst, IR::Opcode::PackFloat2x16);
|
||||||
case IR::Opcode::SelectU1:
|
case IR::Opcode::SelectU1:
|
||||||
case IR::Opcode::SelectU8:
|
case IR::Opcode::SelectU8:
|
||||||
case IR::Opcode::SelectU16:
|
case IR::Opcode::SelectU16:
|
||||||
|
|
Loading…
Reference in a new issue