From f5df0c2a7504ad2dc07634db83e7c58f9eb05573 Mon Sep 17 00:00:00 2001 From: Green Date: Sat, 2 Nov 2024 14:39:42 +0100 Subject: [PATCH] Update IrTranslateBuiltins.cpp --- CodeGen/src/IrTranslateBuiltins.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CodeGen/src/IrTranslateBuiltins.cpp b/CodeGen/src/IrTranslateBuiltins.cpp index f94b3b23..0bd98fba 100644 --- a/CodeGen/src/IrTranslateBuiltins.cpp +++ b/CodeGen/src/IrTranslateBuiltins.cpp @@ -959,8 +959,8 @@ static BuiltinImplResult translateBuiltinVectorNormalize( IrOp inv = build.inst(IrCmd::DIV_NUM, build.constDouble(1.0), mag); IrOp invvec = build.inst(IrCmd::NUM_TO_VEC, inv); - IrOp v = build.inst(IrCmd::LOAD_TVALUE, arg1, build.constInt(0), build.constTag(LUA_TVECTOR)); - IrOp norm = build.inst(IrCmd::MUL_VEC, v, invvec); + IrOp vec = build.inst(IrCmd::LOAD_TVALUE, arg1, build.constInt(0), build.constTag(LUA_TVECTOR)); + IrOp norm = build.inst(IrCmd::MUL_VEC, vec, invvec); IrOp result = build.inst(IrCmd::TAG_VECTOR, norm); build.inst(IrCmd::STORE_TVALUE, build.vmReg(ra), result);