Index: lib/Target/AArch64/AArch64ISelLowering.cpp =================================================================== --- lib/Target/AArch64/AArch64ISelLowering.cpp +++ lib/Target/AArch64/AArch64ISelLowering.cpp @@ -2641,6 +2641,7 @@ SelectionDAG &DAG) const { unsigned IntNo = cast(Op.getOperand(0))->getZExtValue(); SDLoc dl(Op); + auto VT = Op.getValueType(); switch (IntNo) { default: return SDValue(); // Don't custom lower most intrinsics. case Intrinsic::thread_pointer: { @@ -2648,20 +2649,15 @@ return DAG.getNode(AArch64ISD::THREAD_POINTER, dl, PtrVT); } case Intrinsic::aarch64_neon_abs: - return DAG.getNode(ISD::ABS, dl, Op.getValueType(), - Op.getOperand(1)); + return DAG.getNode(ISD::ABS, dl, VT, Op.getOperand(1)); case Intrinsic::aarch64_neon_smax: - return DAG.getNode(ISD::SMAX, dl, Op.getValueType(), - Op.getOperand(1), Op.getOperand(2)); + return DAG.getNode(ISD::SMAX, dl, VT, Op.getOperand(1), Op.getOperand(2)); case Intrinsic::aarch64_neon_umax: - return DAG.getNode(ISD::UMAX, dl, Op.getValueType(), - Op.getOperand(1), Op.getOperand(2)); + return DAG.getNode(ISD::UMAX, dl, VT, Op.getOperand(1), Op.getOperand(2)); case Intrinsic::aarch64_neon_smin: - return DAG.getNode(ISD::SMIN, dl, Op.getValueType(), - Op.getOperand(1), Op.getOperand(2)); + return DAG.getNode(ISD::SMIN, dl, VT, Op.getOperand(1), Op.getOperand(2)); case Intrinsic::aarch64_neon_umin: - return DAG.getNode(ISD::UMIN, dl, Op.getValueType(), - Op.getOperand(1), Op.getOperand(2)); + return DAG.getNode(ISD::UMIN, dl, VT, Op.getOperand(1), Op.getOperand(2)); } }