diff --git a/src/mapleall/maple_be/src/cg/aarch64/aarch64_cgfunc.cpp b/src/mapleall/maple_be/src/cg/aarch64/aarch64_cgfunc.cpp index 834575ca2d1c8cc10645a870aceea791675c977a..d5b7bddcb4a805cdb27bb312bf3d905c8072cb41 100644 --- a/src/mapleall/maple_be/src/cg/aarch64/aarch64_cgfunc.cpp +++ b/src/mapleall/maple_be/src/cg/aarch64/aarch64_cgfunc.cpp @@ -9336,12 +9336,15 @@ RegOperand *AArch64CGFunc::AdjustOneElementVectorOperand(PrimType oType, RegOper } RegOperand *AArch64CGFunc::SelectVectorFromScalar(PrimType rType, Operand *src, PrimType sType) { - if (!IsPrimitiveVector(rType)) { - RegOperand *res = &CreateRegisterOperandOfType(PTY_f64); - Insn *insn = &GetCG()->BuildInstruction(MOP_xvmovdr, *res, *src); - GetCurBB()->AppendInsn(*insn); /* move xreg to dreg */ - static_cast(res)->SetIF64Vec(); - return static_cast(res); + if (!IsPrimitiveVector(rType)) { /* 64x1 type */ + if (src->IsConstImmediate()) { + RegOperand *res = &CreateRegisterOperandOfType(rType); + Insn *insn = &GetCG()->BuildInstruction(MOP_xmovri64, *res, *src); + GetCurBB()->AppendInsn(*insn); + return static_cast(res); + } else { + return &SelectCopy(*src, rType, rType); + } } RegOperand *res = &CreateRegisterOperandOfType(rType); /* result operand */ VectorRegSpec *vecSpec = GetMemoryPool()->New();