summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2021-04-19 21:36:57 +0200
committerameerj <52414509+ameerj@users.noreply.github.com>2021-07-23 03:51:28 +0200
commita8d46a5eae4e0d65c08f6574cffc48bc55d00940 (patch)
treeded7e72824650f4329450b320432f7121c7b862e
parentshader: Simplify code for local memory (diff)
downloadyuzu-a8d46a5eae4e0d65c08f6574cffc48bc55d00940.tar
yuzu-a8d46a5eae4e0d65c08f6574cffc48bc55d00940.tar.gz
yuzu-a8d46a5eae4e0d65c08f6574cffc48bc55d00940.tar.bz2
yuzu-a8d46a5eae4e0d65c08f6574cffc48bc55d00940.tar.lz
yuzu-a8d46a5eae4e0d65c08f6574cffc48bc55d00940.tar.xz
yuzu-a8d46a5eae4e0d65c08f6574cffc48bc55d00940.tar.zst
yuzu-a8d46a5eae4e0d65c08f6574cffc48bc55d00940.zip
-rw-r--r--src/shader_recompiler/ir_opt/constant_propagation_pass.cpp3
1 files changed, 3 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 7e86f64a8..2206f93c2 100644
--- a/src/shader_recompiler/ir_opt/constant_propagation_pass.cpp
+++ b/src/shader_recompiler/ir_opt/constant_propagation_pass.cpp
@@ -482,6 +482,9 @@ void ConstantPropagation(IR::Block& block, IR::Inst& inst) {
case IR::Opcode::IMul32:
FoldWhenAllImmediates(inst, [](u32 a, u32 b) { return a * b; });
return;
+ case IR::Opcode::ShiftRightArithmetic32:
+ FoldWhenAllImmediates(inst, [](s32 a, s32 b) { return static_cast<u32>(a >> b); });
+ return;
case IR::Opcode::BitCastF32U32:
return FoldBitCast<IR::Opcode::BitCastF32U32, f32, u32>(inst, IR::Opcode::BitCastU32F32);
case IR::Opcode::BitCastU32F32: