From f66851e37682ce538172b0945908227ada8d21ac Mon Sep 17 00:00:00 2001
From: ReinUsesLisp <reinuseslisp@airmail.cc>
Date: Wed, 21 Apr 2021 02:43:44 -0300
Subject: shader: Use memset to reset instruction arguments

---
 src/shader_recompiler/frontend/ir/microinstruction.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

(limited to 'src/shader_recompiler/frontend/ir/microinstruction.cpp')

diff --git a/src/shader_recompiler/frontend/ir/microinstruction.cpp b/src/shader_recompiler/frontend/ir/microinstruction.cpp
index 701746a0cc..e3350931b8 100644
--- a/src/shader_recompiler/frontend/ir/microinstruction.cpp
+++ b/src/shader_recompiler/frontend/ir/microinstruction.cpp
@@ -279,8 +279,10 @@ void Inst::ClearArgs() {
             if (!value.IsImmediate()) {
                 UndoUse(value);
             }
-            value = {};
         }
+        // Reset arguments to null
+        // std::memset was measured to be faster on MSVC than std::ranges:fill
+        std::memset(&args, 0, sizeof(args));
     }
 }
 
-- 
cgit v1.2.3-70-g09d2