diff options
| author | 2021-07-29 21:22:22 -0300 | |
|---|---|---|
| committer | 2021-07-29 21:22:52 -0300 | |
| commit | 8c9febe8f7ad5136615821e05a670bada794199b (patch) | |
| tree | 3577cfafd0f8f3609c22d9435a7f0617d1cc9b0f /src/shader_recompiler/ir_opt/constant_propagation_pass.cpp | |
| parent | Merge pull request #6751 from Morph1984/languagecode (diff) | |
| download | yuzu-8c9febe8f7ad5136615821e05a670bada794199b.tar.gz yuzu-8c9febe8f7ad5136615821e05a670bada794199b.tar.xz yuzu-8c9febe8f7ad5136615821e05a670bada794199b.zip | |
shader: Fold UnpackFloat2x16 and PackFloat2x16
Simplifies the code a bit when possible. These instructions should be
no-ops codegen wise.
Diffstat (limited to 'src/shader_recompiler/ir_opt/constant_propagation_pass.cpp')
| -rw-r--r-- | src/shader_recompiler/ir_opt/constant_propagation_pass.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/shader_recompiler/ir_opt/constant_propagation_pass.cpp b/src/shader_recompiler/ir_opt/constant_propagation_pass.cpp index 8dd6d6c2c..1e9ad0a0f 100644 --- a/src/shader_recompiler/ir_opt/constant_propagation_pass.cpp +++ b/src/shader_recompiler/ir_opt/constant_propagation_pass.cpp | |||
| @@ -476,6 +476,10 @@ void ConstantPropagation(IR::Block& block, IR::Inst& inst) { | |||
| 476 | return FoldInverseFunc(inst, IR::Opcode::UnpackHalf2x16); | 476 | return FoldInverseFunc(inst, IR::Opcode::UnpackHalf2x16); |
| 477 | case IR::Opcode::UnpackHalf2x16: | 477 | case IR::Opcode::UnpackHalf2x16: |
| 478 | return FoldInverseFunc(inst, IR::Opcode::PackHalf2x16); | 478 | return FoldInverseFunc(inst, IR::Opcode::PackHalf2x16); |
| 479 | case IR::Opcode::PackFloat2x16: | ||
| 480 | return FoldInverseFunc(inst, IR::Opcode::UnpackFloat2x16); | ||
| 481 | case IR::Opcode::UnpackFloat2x16: | ||
| 482 | return FoldInverseFunc(inst, IR::Opcode::PackFloat2x16); | ||
| 479 | case IR::Opcode::SelectU1: | 483 | case IR::Opcode::SelectU1: |
| 480 | case IR::Opcode::SelectU8: | 484 | case IR::Opcode::SelectU8: |
| 481 | case IR::Opcode::SelectU16: | 485 | case IR::Opcode::SelectU16: |