diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2021-05-18 00:24:09 +0200 |
---|---|---|
committer | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-07-23 03:51:31 +0200 |
commit | fb3ba62b3a47ad645b007d5031ed9f8aaa7cb5c0 (patch) | |
tree | a646ef0f5b2fde47b18f00231157282323c46bf0 /src/shader_recompiler/backend/glasm/emit_glasm_bitwise_conversion.cpp | |
parent | glasm: Remove unintentional comma on vector insert (diff) | |
download | yuzu-fb3ba62b3a47ad645b007d5031ed9f8aaa7cb5c0.tar yuzu-fb3ba62b3a47ad645b007d5031ed9f8aaa7cb5c0.tar.gz yuzu-fb3ba62b3a47ad645b007d5031ed9f8aaa7cb5c0.tar.bz2 yuzu-fb3ba62b3a47ad645b007d5031ed9f8aaa7cb5c0.tar.lz yuzu-fb3ba62b3a47ad645b007d5031ed9f8aaa7cb5c0.tar.xz yuzu-fb3ba62b3a47ad645b007d5031ed9f8aaa7cb5c0.tar.zst yuzu-fb3ba62b3a47ad645b007d5031ed9f8aaa7cb5c0.zip |
Diffstat (limited to '')
-rw-r--r-- | src/shader_recompiler/backend/glasm/emit_glasm_bitwise_conversion.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/shader_recompiler/backend/glasm/emit_glasm_bitwise_conversion.cpp b/src/shader_recompiler/backend/glasm/emit_glasm_bitwise_conversion.cpp index a6c66b826..cdbf6e93e 100644 --- a/src/shader_recompiler/backend/glasm/emit_glasm_bitwise_conversion.cpp +++ b/src/shader_recompiler/backend/glasm/emit_glasm_bitwise_conversion.cpp @@ -12,12 +12,10 @@ static void Alias(IR::Inst& inst, const IR::Value& value) { if (value.IsImmediate()) { return; } - IR::Inst* const value_inst{value.InstRecursive()}; - if (inst.GetOpcode() == IR::Opcode::Identity) { - value_inst->DestructiveAddUsage(inst.UseCount()); - value_inst->DestructiveRemoveUsage(); - } - inst.SetDefinition(value_inst->Definition<Id>()); + IR::Inst& value_inst{RegAlloc::AliasInst(*value.Inst())}; + value_inst.DestructiveAddUsage(inst.UseCount()); + value_inst.DestructiveRemoveUsage(); + inst.SetDefinition(value_inst.Definition<Id>()); } void EmitIdentity(EmitContext&, IR::Inst& inst, const IR::Value& value) { |