| case ARM::BI__builtin_arm_mve_vldrdq_gather_base_wb_s64: |
| case ARM::BI__builtin_arm_mve_vldrdq_gather_base_wb_u64: |
| case ARM::BI__builtin_arm_mve_vldrwq_gather_base_wb_f32: |
| case ARM::BI__builtin_arm_mve_vldrwq_gather_base_wb_s32: |
| case ARM::BI__builtin_arm_mve_vldrwq_gather_base_wb_u32: { |
| llvm::Type * Param0; |
| llvm::Type * Param1; |
| switch (BuiltinID) { |
| case ARM::BI__builtin_arm_mve_vldrdq_gather_base_wb_s64: |
| Param0 = llvm::FixedVectorType::get(Int64Ty, 2); |
| Param1 = llvm::FixedVectorType::get(Int64Ty, 2); |
| break; |
| case ARM::BI__builtin_arm_mve_vldrdq_gather_base_wb_u64: |
| Param0 = llvm::FixedVectorType::get(Int64Ty, 2); |
| Param1 = llvm::FixedVectorType::get(Int64Ty, 2); |
| break; |
| case ARM::BI__builtin_arm_mve_vldrwq_gather_base_wb_f32: |
| Param0 = llvm::FixedVectorType::get(FloatTy, 4); |
| Param1 = llvm::FixedVectorType::get(Int32Ty, 4); |
| break; |
| case ARM::BI__builtin_arm_mve_vldrwq_gather_base_wb_s32: |
| Param0 = llvm::FixedVectorType::get(Int32Ty, 4); |
| Param1 = llvm::FixedVectorType::get(Int32Ty, 4); |
| break; |
| case ARM::BI__builtin_arm_mve_vldrwq_gather_base_wb_u32: |
| Param0 = llvm::FixedVectorType::get(Int32Ty, 4); |
| Param1 = llvm::FixedVectorType::get(Int32Ty, 4); |
| break; |
| } |
| Address Val0 = EmitPointerWithAlignment(E->getArg(0)); |
| Value *Val1 = Builder.CreateLoad(Val0); |
| Value *Val2 = EmitScalarExpr(E->getArg(1)); |
| Value *Val3 = Builder.CreateCall(CGM.getIntrinsic(Intrinsic::arm_mve_vldr_gather_base_wb, {Param0, Param1}), {Val1, Val2}); |
| Value *Val4 = Builder.CreateExtractValue(Val3, static_cast<unsigned>(1)); |
| Builder.CreateStore(Val4, Val0); |
| return Builder.CreateExtractValue(Val3, static_cast<unsigned>(0)); |
| } |
| case ARM::BI__builtin_arm_mve_vddupq_wb_u16: |
| case ARM::BI__builtin_arm_mve_vddupq_wb_u32: |
| case ARM::BI__builtin_arm_mve_vddupq_wb_u8: |
| case ARM::BI__builtin_arm_mve_vidupq_wb_u16: |
| case ARM::BI__builtin_arm_mve_vidupq_wb_u32: |
| case ARM::BI__builtin_arm_mve_vidupq_wb_u8: { |
| Intrinsic::ID Param0; |
| llvm::Type * Param1; |
| switch (BuiltinID) { |
| case ARM::BI__builtin_arm_mve_vddupq_wb_u16: |
| Param0 = Intrinsic::arm_mve_vddup; |
| Param1 = llvm::FixedVectorType::get(Int16Ty, 8); |
| break; |
| case ARM::BI__builtin_arm_mve_vddupq_wb_u32: |
| Param0 = Intrinsic::arm_mve_vddup; |
| Param1 = llvm::FixedVectorType::get(Int32Ty, 4); |
| break; |
| case ARM::BI__builtin_arm_mve_vddupq_wb_u8: |
| Param0 = Intrinsic::arm_mve_vddup; |
| Param1 = llvm::FixedVectorType::get(Int8Ty, 16); |
| break; |
| case ARM::BI__builtin_arm_mve_vidupq_wb_u16: |
| Param0 = Intrinsic::arm_mve_vidup; |
| Param1 = llvm::FixedVectorType::get(Int16Ty, 8); |
| break; |
| case ARM::BI__builtin_arm_mve_vidupq_wb_u32: |
| Param0 = Intrinsic::arm_mve_vidup; |
| Param1 = llvm::FixedVectorType::get(Int32Ty, 4); |
| break; |
| case ARM::BI__builtin_arm_mve_vidupq_wb_u8: |
| Param0 = Intrinsic::arm_mve_vidup; |
| Param1 = llvm::FixedVectorType::get(Int8Ty, 16); |
| break; |
| } |
| Address Val0 = EmitPointerWithAlignment(E->getArg(0)); |
| Value *Val1 = Builder.CreateLoad(Val0); |
| Value *Val2 = EmitScalarExpr(E->getArg(1)); |
| Value *Val3 = Builder.CreateCall(CGM.getIntrinsic(Param0, {Param1}), {Val1, Val2}); |
| Value *Val4 = Builder.CreateExtractValue(Val3, static_cast<unsigned>(1)); |
| Builder.CreateStore(Val4, Val0); |
| return Builder.CreateExtractValue(Val3, static_cast<unsigned>(0)); |
| } |
| case ARM::BI__builtin_arm_mve_vstrdq_scatter_base_wb_s64: |
| case ARM::BI__builtin_arm_mve_vstrdq_scatter_base_wb_u64: |
| case ARM::BI__builtin_arm_mve_vstrwq_scatter_base_wb_f32: |
| case ARM::BI__builtin_arm_mve_vstrwq_scatter_base_wb_s32: |
| case ARM::BI__builtin_arm_mve_vstrwq_scatter_base_wb_u32: { |
| llvm::Type * Param0; |
| llvm::Type * Param1; |
| switch (BuiltinID) { |
| case ARM::BI__builtin_arm_mve_vstrdq_scatter_base_wb_s64: |
| Param0 = llvm::FixedVectorType::get(Int64Ty, 2); |
| Param1 = llvm::FixedVectorType::get(Int64Ty, 2); |
| break; |
| case ARM::BI__builtin_arm_mve_vstrdq_scatter_base_wb_u64: |
| Param0 = llvm::FixedVectorType::get(Int64Ty, 2); |
| Param1 = llvm::FixedVectorType::get(Int64Ty, 2); |
| break; |
| case ARM::BI__builtin_arm_mve_vstrwq_scatter_base_wb_f32: |
| Param0 = llvm::FixedVectorType::get(Int32Ty, 4); |
| Param1 = llvm::FixedVectorType::get(FloatTy, 4); |
| break; |
| case ARM::BI__builtin_arm_mve_vstrwq_scatter_base_wb_s32: |
| Param0 = llvm::FixedVectorType::get(Int32Ty, 4); |
| Param1 = llvm::FixedVectorType::get(Int32Ty, 4); |
| break; |
| case ARM::BI__builtin_arm_mve_vstrwq_scatter_base_wb_u32: |
| Param0 = llvm::FixedVectorType::get(Int32Ty, 4); |
| Param1 = llvm::FixedVectorType::get(Int32Ty, 4); |
| break; |
| } |
| Address Val0 = EmitPointerWithAlignment(E->getArg(0)); |
| Value *Val1 = Builder.CreateLoad(Val0); |
| Value *Val2 = EmitScalarExpr(E->getArg(1)); |
| Value *Val3 = EmitScalarExpr(E->getArg(2)); |
| Value *Val4 = Builder.CreateCall(CGM.getIntrinsic(Intrinsic::arm_mve_vstr_scatter_base_wb, {Param0, Param1}), {Val1, Val2, Val3}); |
| return Builder.CreateStore(Val4, Val0); |
| } |
| case ARM::BI__builtin_arm_mve_vdwdupq_wb_u16: |
| case ARM::BI__builtin_arm_mve_vdwdupq_wb_u32: |
| case ARM::BI__builtin_arm_mve_vdwdupq_wb_u8: |
| case ARM::BI__builtin_arm_mve_viwdupq_wb_u16: |
| case ARM::BI__builtin_arm_mve_viwdupq_wb_u32: |
| case ARM::BI__builtin_arm_mve_viwdupq_wb_u8: { |
| Intrinsic::ID Param0; |
| llvm::Type * Param1; |
| switch (BuiltinID) { |
| case ARM::BI__builtin_arm_mve_vdwdupq_wb_u16: |
| Param0 = Intrinsic::arm_mve_vdwdup; |
| Param1 = llvm::FixedVectorType::get(Int16Ty, 8); |
| break; |
| case ARM::BI__builtin_arm_mve_vdwdupq_wb_u32: |
| Param0 = Intrinsic::arm_mve_vdwdup; |
| Param1 = llvm::FixedVectorType::get(Int32Ty, 4); |
| break; |
| case ARM::BI__builtin_arm_mve_vdwdupq_wb_u8: |
| Param0 = Intrinsic::arm_mve_vdwdup; |
| Param1 = llvm::FixedVectorType::get(Int8Ty, 16); |
| break; |
| case ARM::BI__builtin_arm_mve_viwdupq_wb_u16: |
| Param0 = Intrinsic::arm_mve_viwdup; |
| Param1 = llvm::FixedVectorType::get(Int16Ty, 8); |
| break; |
| case ARM::BI__builtin_arm_mve_viwdupq_wb_u32: |
| Param0 = Intrinsic::arm_mve_viwdup; |
| Param1 = llvm::FixedVectorType::get(Int32Ty, 4); |
| break; |
| case ARM::BI__builtin_arm_mve_viwdupq_wb_u8: |
| Param0 = Intrinsic::arm_mve_viwdup; |
| Param1 = llvm::FixedVectorType::get(Int8Ty, 16); |
| break; |
| } |
| Address Val0 = EmitPointerWithAlignment(E->getArg(0)); |
| Value *Val1 = Builder.CreateLoad(Val0); |
| Value *Val2 = EmitScalarExpr(E->getArg(1)); |
| Value *Val3 = EmitScalarExpr(E->getArg(2)); |
| Value *Val4 = Builder.CreateCall(CGM.getIntrinsic(Param0, {Param1}), {Val1, Val2, Val3}); |
| Value *Val5 = Builder.CreateExtractValue(Val4, static_cast<unsigned>(1)); |
| Builder.CreateStore(Val5, Val0); |
| return Builder.CreateExtractValue(Val4, static_cast<unsigned>(0)); |
| } |
| case ARM::BI__builtin_arm_mve_vldrdq_gather_base_wb_z_s64: |
| case ARM::BI__builtin_arm_mve_vldrdq_gather_base_wb_z_u64: |
| case ARM::BI__builtin_arm_mve_vldrwq_gather_base_wb_z_f32: |
| case ARM::BI__builtin_arm_mve_vldrwq_gather_base_wb_z_s32: |
| case ARM::BI__builtin_arm_mve_vldrwq_gather_base_wb_z_u32: { |
| llvm::Type * Param0; |
| llvm::Type * Param1; |
| switch (BuiltinID) { |
| case ARM::BI__builtin_arm_mve_vldrdq_gather_base_wb_z_s64: |
| Param0 = llvm::FixedVectorType::get(Int64Ty, 2); |
| Param1 = llvm::FixedVectorType::get(Int64Ty, 2); |
| break; |
| case ARM::BI__builtin_arm_mve_vldrdq_gather_base_wb_z_u64: |
| Param0 = llvm::FixedVectorType::get(Int64Ty, 2); |
| Param1 = llvm::FixedVectorType::get(Int64Ty, 2); |
| break; |
| case ARM::BI__builtin_arm_mve_vldrwq_gather_base_wb_z_f32: |
| Param0 = llvm::FixedVectorType::get(FloatTy, 4); |
| Param1 = llvm::FixedVectorType::get(Int32Ty, 4); |
| break; |
| case ARM::BI__builtin_arm_mve_vldrwq_gather_base_wb_z_s32: |
| Param0 = llvm::FixedVectorType::get(Int32Ty, 4); |
| Param1 = llvm::FixedVectorType::get(Int32Ty, 4); |
| break; |
| case ARM::BI__builtin_arm_mve_vldrwq_gather_base_wb_z_u32: |
| Param0 = llvm::FixedVectorType::get(Int32Ty, 4); |
| Param1 = llvm::FixedVectorType::get(Int32Ty, 4); |
| break; |
| } |
| Address Val0 = EmitPointerWithAlignment(E->getArg(0)); |
| Value *Val1 = Builder.CreateLoad(Val0); |
| Value *Val2 = EmitScalarExpr(E->getArg(1)); |
| Value *Val3 = EmitScalarExpr(E->getArg(2)); |
| Value *Val4 = Builder.CreateIntCast(Val3, Int32Ty, false); |
| Value *Val5 = Builder.CreateCall(CGM.getIntrinsic(Intrinsic::arm_mve_pred_i2v, {llvm::FixedVectorType::get(Builder.getInt1Ty(), 4)}), {Val4}); |
| Value *Val6 = Builder.CreateCall(CGM.getIntrinsic(Intrinsic::arm_mve_vldr_gather_base_wb_predicated, {Param0, Param1, llvm::FixedVectorType::get(Builder.getInt1Ty(), 4)}), {Val1, Val2, Val5}); |
| Value *Val7 = Builder.CreateExtractValue(Val6, static_cast<unsigned>(1)); |
| Builder.CreateStore(Val7, Val0); |
| return Builder.CreateExtractValue(Val6, static_cast<unsigned>(0)); |
| } |
| case ARM::BI__builtin_arm_mve_vstrdq_scatter_base_wb_p_s64: |
| case ARM::BI__builtin_arm_mve_vstrdq_scatter_base_wb_p_u64: |
| case ARM::BI__builtin_arm_mve_vstrwq_scatter_base_wb_p_f32: |
| case ARM::BI__builtin_arm_mve_vstrwq_scatter_base_wb_p_s32: |
| case ARM::BI__builtin_arm_mve_vstrwq_scatter_base_wb_p_u32: { |
| llvm::Type * Param0; |
| llvm::Type * Param1; |
| switch (BuiltinID) { |
| case ARM::BI__builtin_arm_mve_vstrdq_scatter_base_wb_p_s64: |
| Param0 = llvm::FixedVectorType::get(Int64Ty, 2); |
| Param1 = llvm::FixedVectorType::get(Int64Ty, 2); |
| break; |
| case ARM::BI__builtin_arm_mve_vstrdq_scatter_base_wb_p_u64: |
| Param0 = llvm::FixedVectorType::get(Int64Ty, 2); |
| Param1 = llvm::FixedVectorType::get(Int64Ty, 2); |
| break; |
| case ARM::BI__builtin_arm_mve_vstrwq_scatter_base_wb_p_f32: |
| Param0 = llvm::FixedVectorType::get(Int32Ty, 4); |
| Param1 = llvm::FixedVectorType::get(FloatTy, 4); |
| break; |
| case ARM::BI__builtin_arm_mve_vstrwq_scatter_base_wb_p_s32: |
| Param0 = llvm::FixedVectorType::get(Int32Ty, 4); |
| Param1 = llvm::FixedVectorType::get(Int32Ty, 4); |
| break; |
| case ARM::BI__builtin_arm_mve_vstrwq_scatter_base_wb_p_u32: |
| Param0 = llvm::FixedVectorType::get(Int32Ty, 4); |
| Param1 = llvm::FixedVectorType::get(Int32Ty, 4); |
| break; |
| } |
| Address Val0 = EmitPointerWithAlignment(E->getArg(0)); |
| Value *Val1 = Builder.CreateLoad(Val0); |
| Value *Val2 = EmitScalarExpr(E->getArg(1)); |
| Value *Val3 = EmitScalarExpr(E->getArg(2)); |
| Value *Val4 = EmitScalarExpr(E->getArg(3)); |
| Value *Val5 = Builder.CreateIntCast(Val4, Int32Ty, false); |
| Value *Val6 = Builder.CreateCall(CGM.getIntrinsic(Intrinsic::arm_mve_pred_i2v, {llvm::FixedVectorType::get(Builder.getInt1Ty(), 4)}), {Val5}); |
| Value *Val7 = Builder.CreateCall(CGM.getIntrinsic(Intrinsic::arm_mve_vstr_scatter_base_wb_predicated, {Param0, Param1, llvm::FixedVectorType::get(Builder.getInt1Ty(), 4)}), {Val1, Val2, Val3, Val6}); |
| return Builder.CreateStore(Val7, Val0); |
| } |
| case ARM::BI__builtin_arm_mve_vld1q_f16: |
| case ARM::BI__builtin_arm_mve_vld1q_s16: |
| case ARM::BI__builtin_arm_mve_vld1q_u16: |
| case ARM::BI__builtin_arm_mve_vldrhq_f16: |
| case ARM::BI__builtin_arm_mve_vldrhq_s16: |
| case ARM::BI__builtin_arm_mve_vldrhq_u16: { |
| llvm::Type * Param0; |
| switch (BuiltinID) { |
| case ARM::BI__builtin_arm_mve_vld1q_f16: |
| Param0 = llvm::PointerType::getUnqual(llvm::FixedVectorType::get(HalfTy, 8)); |
| break; |
| case ARM::BI__builtin_arm_mve_vld1q_s16: |
| Param0 = llvm::PointerType::getUnqual(llvm::FixedVectorType::get(Int16Ty, 8)); |
| break; |
| case ARM::BI__builtin_arm_mve_vld1q_u16: |
| Param0 = llvm::PointerType::getUnqual(llvm::FixedVectorType::get(Int16Ty, 8)); |
| break; |
| case ARM::BI__builtin_arm_mve_vldrhq_f16: |
| Param0 = llvm::PointerType::getUnqual(llvm::FixedVectorType::get(HalfTy, 8)); |
| break; |
| case ARM::BI__builtin_arm_mve_vldrhq_s16: |
| Param0 = llvm::PointerType::getUnqual(llvm::FixedVectorType::get(Int16Ty, 8)); |
| break; |
| case ARM::BI__builtin_arm_mve_vldrhq_u16: |
| Param0 = llvm::PointerType::getUnqual(llvm::FixedVectorType::get(Int16Ty, 8)); |
| break; |
| } |
| Address Val0 = EmitPointerWithAlignment(E->getArg(0)); |
| Value *Val1 = Builder.CreatePointerCast((Val0.getPointer()), Param0); |
| Address Val2 = Address(Val1, CharUnits::fromQuantity(2)); |
| return Builder.CreateLoad(Val2); |
| } |
| case ARM::BI__builtin_arm_mve_vld1q_f32: |
| case ARM::BI__builtin_arm_mve_vld1q_s32: |
| case ARM::BI__builtin_arm_mve_vld1q_u32: |
| case ARM::BI__builtin_arm_mve_vldrwq_f32: |
| case ARM::BI__builtin_arm_mve_vldrwq_s32: |
| case ARM::BI__builtin_arm_mve_vldrwq_u32: { |
| llvm::Type * Param0; |
| switch (BuiltinID) { |
| case ARM::BI__builtin_arm_mve_vld1q_f32: |
| Param0 = llvm::PointerType::getUnqual(llvm::FixedVectorType::get(FloatTy, 4)); |
| break; |
| case ARM::BI__builtin_arm_mve_vld1q_s32: |
| Param0 = llvm::PointerType::getUnqual(llvm::FixedVectorType::get(Int32Ty, 4)); |
| break; |
| case ARM::BI__builtin_arm_mve_vld1q_u32: |
| Param0 = llvm::PointerType::getUnqual(llvm::FixedVectorType::get(Int32Ty, 4)); |
| break; |
| case ARM::BI__builtin_arm_mve_vldrwq_f32: |
| Param0 = llvm::PointerType::getUnqual(llvm::FixedVectorType::get(FloatTy, 4)); |
| break; |
| case ARM::BI__builtin_arm_mve_vldrwq_s32: |
| Param0 = llvm::PointerType::getUnqual(llvm::FixedVectorType::get(Int32Ty, 4)); |
| break; |
| case ARM::BI__builtin_arm_mve_vldrwq_u32: |
| Param0 = llvm::PointerType::getUnqual(llvm::FixedVectorType::get(Int32Ty, 4)); |
| break; |
| } |
| Address Val0 = EmitPointerWithAlignment(E->getArg(0)); |
| Value *Val1 = Builder.CreatePointerCast((Val0.getPointer()), Param0); |
| Address Val2 = Address(Val1, CharUnits::fromQuantity(4)); |
| return Builder.CreateLoad(Val2); |
| } |
| case ARM::BI__builtin_arm_mve_vld1q_z_f32: |
| case ARM::BI__builtin_arm_mve_vldrwq_z_f32: { |
| Address Val0 = EmitPointerWithAlignment(E->getArg(0)); |
| Value *Val1 = Builder.CreatePointerCast((Val0.getPointer()), llvm::PointerType::getUnqual(llvm::FixedVectorType::get(FloatTy, 4))); |
| Value *Val2 = llvm::ConstantInt::get(Int32Ty, 4); |
| Value *Val3 = EmitScalarExpr(E->getArg(1)); |
| Value *Val4 = Builder.CreateIntCast(Val3, Int32Ty, false); |
| Value *Val5 = Builder.CreateCall(CGM.getIntrinsic(Intrinsic::arm_mve_pred_i2v, {llvm::FixedVectorType::get(Builder.getInt1Ty(), 4)}), {Val4}); |
| llvm::Type *Val6 = llvm::FixedVectorType::get(FloatTy, 4); |
| Value *Val7 = llvm::Constant::getNullValue(Val6); |
| return Builder.CreateCall(CGM.getIntrinsic(Intrinsic::masked_load, {llvm::FixedVectorType::get(FloatTy, 4), llvm::PointerType::getUnqual(llvm::FixedVectorType::get(FloatTy, 4))}), {Val1, Val2, Val5, Val7}); |
| } |
| case ARM::BI__builtin_arm_mve_vld1q_z_f16: |
| case ARM::BI__builtin_arm_mve_vldrhq_z_f16: { |
| Address Val0 = EmitPointerWithAlignment(E->getArg(0)); |
| Value *Val1 = Builder.CreatePointerCast((Val0.getPointer()), llvm::PointerType::getUnqual(llvm::FixedVectorType::get(HalfTy, 8))); |
| Value *Val2 = llvm::ConstantInt::get(Int32Ty, 2); |
| Value *Val3 = EmitScalarExpr(E->getArg(1)); |
| Value *Val4 = Builder.CreateIntCast(Val3, Int32Ty, false); |
| Value *Val5 = Builder.CreateCall(CGM.getIntrinsic(Intrinsic::arm_mve_pred_i2v, {llvm::FixedVectorType::get(Builder.getInt1Ty(), 8)}), {Val4}); |
| llvm::Type *Val6 = llvm::FixedVectorType::get(HalfTy, 8); |
| Value *Val7 = llvm::Constant::getNullValue(Val6); |
| return Builder.CreateCall(CGM.getIntrinsic(Intrinsic::masked_load, {llvm::FixedVectorType::get(HalfTy, 8), llvm::PointerType::getUnqual(llvm::FixedVectorType::get(HalfTy, 8))}), {Val1, Val2, Val5, Val7}); |
| } |
| case ARM::BI__builtin_arm_mve_vldrhq_s32: |
| case ARM::BI__builtin_arm_mve_vldrhq_u32: { |
| bool Param0; |
| switch (BuiltinID) { |
| case ARM::BI__builtin_arm_mve_vldrhq_s32: |
| Param0 = 0; |
| break; |
| case ARM::BI__builtin_arm_mve_vldrhq_u32: |
| Param0 = 1; |
| break; |
| } |
| Address Val0 = EmitPointerWithAlignment(E->getArg(0)); |
| Value *Val1 = Builder.CreatePointerCast((Val0.getPointer()), llvm::PointerType::getUnqual(llvm::FixedVectorType::get(Int16Ty, 4))); |
| Address Val2 = Address(Val1, CharUnits::fromQuantity(2)); |
| Value *Val3 = Builder.CreateLoad(Val2); |
| llvm::Type *Val4 = llvm::FixedVectorType::get(Int32Ty, 4); |
| return SignOrZeroExtend(Builder, Val3, Val4, static_cast<bool>(Param0)); |
| } |
| case ARM::BI__builtin_arm_mve_vldrhq_z_s32: |
| case ARM::BI__builtin_arm_mve_vldrhq_z_u32: { |
| bool Param0; |
| switch (BuiltinID) { |
| case ARM::BI__builtin_arm_mve_vldrhq_z_s32: |
| Param0 = 0; |
| break; |
| case ARM::BI__builtin_arm_mve_vldrhq_z_u32: |
| Param0 = 1; |
| break; |
| } |
| Address Val0 = EmitPointerWithAlignment(E->getArg(0)); |
| Value *Val1 = Builder.CreatePointerCast((Val0.getPointer()), llvm::PointerType::getUnqual(llvm::FixedVectorType::get(Int16Ty, 4))); |
| Value *Val2 = llvm::ConstantInt::get(Int32Ty, 2); |
| Value *Val3 = EmitScalarExpr(E->getArg(1)); |
| Value *Val4 = Builder.CreateIntCast(Val3, Int32Ty, false); |
| Value *Val5 = Builder.CreateCall(CGM.getIntrinsic(Intrinsic::arm_mve_pred_i2v, {llvm::FixedVectorType::get(Builder.getInt1Ty(), 4)}), {Val4}); |
| llvm::Type *Val6 = llvm::FixedVectorType::get(Int16Ty, 4); |
| Value *Val7 = llvm::Constant::getNullValue(Val6); |
| Value *Val8 = Builder.CreateCall(CGM.getIntrinsic(Intrinsic::masked_load, {llvm::FixedVectorType::get(Int16Ty, 4), llvm::PointerType::getUnqual(llvm::FixedVectorType::get(Int16Ty, 4))}), {Val1, Val2, Val5, Val7}); |
| llvm::Type *Val9 = llvm::FixedVectorType::get(Int32Ty, 4); |
| return SignOrZeroExtend(Builder, Val8, Val9, static_cast<bool>(Param0)); |
| } |
| case ARM::BI__builtin_arm_mve_vld1q_z_s16: |
| case ARM::BI__builtin_arm_mve_vld1q_z_u16: |
| case ARM::BI__builtin_arm_mve_vldrhq_z_s16: |
| case ARM::BI__builtin_arm_mve_vldrhq_z_u16: { |
| Address Val0 = EmitPointerWithAlignment(E->getArg(0)); |
| Value *Val1 = Builder.CreatePointerCast((Val0.getPointer()), llvm::PointerType::getUnqual(llvm::FixedVectorType::get(Int16Ty, 8))); |
| Value *Val2 = llvm::ConstantInt::get(Int32Ty, 2); |
| Value *Val3 = EmitScalarExpr(E->getArg(1)); |
| Value *Val4 = Builder.CreateIntCast(Val3, Int32Ty, false); |
| Value *Val5 = Builder.CreateCall(CGM.getIntrinsic(Intrinsic::arm_mve_pred_i2v, {llvm::FixedVectorType::get(Builder.getInt1Ty(), 8)}), {Val4}); |
| llvm::Type *Val6 = llvm::FixedVectorType::get(Int16Ty, 8); |
| Value *Val7 = llvm::Constant::getNullValue(Val6); |
| return Builder.CreateCall(CGM.getIntrinsic(Intrinsic::masked_load, {llvm::FixedVectorType::get(Int16Ty, 8), llvm::PointerType::getUnqual(llvm::FixedVectorType::get(Int16Ty, 8))}), {Val1, Val2, Val5, Val7}); |
| } |
| case ARM::BI__builtin_arm_mve_vld1q_z_s32: |
| case ARM::BI__builtin_arm_mve_vld1q_z_u32: |
| case ARM::BI__builtin_arm_mve_vldrwq_z_s32: |
| case ARM::BI__builtin_arm_mve_vldrwq_z_u32: { |
| Address Val0 = EmitPointerWithAlignment(E->getArg(0)); |
| Value *Val1 = Builder.CreatePointerCast((Val0.getPointer()), llvm::PointerType::getUnqual(llvm::FixedVectorType::get(Int32Ty, 4))); |
| Value *Val2 = llvm::ConstantInt::get(Int32Ty, 4); |
| Value *Val3 = EmitScalarExpr(E->getArg(1)); |
| Value *Val4 = Builder.CreateIntCast(Val3, Int32Ty, false); |
| Value *Val5 = Builder.CreateCall(CGM.getIntrinsic(Intrinsic::arm_mve_pred_i2v, {llvm::FixedVectorType::get(Builder.getInt1Ty(), 4)}), {Val4}); |
| llvm::Type *Val6 = llvm::FixedVectorType::get(Int32Ty, 4); |
| Value *Val7 = llvm::Constant::getNullValue(Val6); |
| return Builder.CreateCall(CGM.getIntrinsic(Intrinsic::masked_load, {llvm::FixedVectorType::get(Int32Ty, 4), llvm::PointerType::getUnqual(llvm::FixedVectorType::get(Int32Ty, 4))}), {Val1, Val2, Val5, Val7}); |
| } |
| case ARM::BI__builtin_arm_mve_vld1q_s8: |
| case ARM::BI__builtin_arm_mve_vld1q_u8: |
| case ARM::BI__builtin_arm_mve_vldrbq_s8: |
| case ARM::BI__builtin_arm_mve_vldrbq_u8: { |
| Address Val0 = EmitPointerWithAlignment(E->getArg(0)); |
| Value *Val1 = Builder.CreatePointerCast((Val0.getPointer()), llvm::PointerType::getUnqual(llvm::FixedVectorType::get(Int8Ty, 16))); |
| Address Val2 = Address(Val1, CharUnits::fromQuantity(1)); |
| return Builder.CreateLoad(Val2); |
| } |
| case ARM::BI__builtin_arm_mve_vld1q_z_s8: |
| case ARM::BI__builtin_arm_mve_vld1q_z_u8: |
| case ARM::BI__builtin_arm_mve_vldrbq_z_s8: |
| case ARM::BI__builtin_arm_mve_vldrbq_z_u8: { |
| Address Val0 = EmitPointerWithAlignment(E->getArg(0)); |
| Value *Val1 = Builder.CreatePointerCast((Val0.getPointer()), llvm::PointerType::getUnqual(llvm::FixedVectorType::get(Int8Ty, 16))); |
| Value *Val2 = llvm::ConstantInt::get(Int32Ty, 1); |
| Value *Val3 = EmitScalarExpr(E->getArg(1)); |
| Value *Val4 = Builder.CreateIntCast(Val3, Int32Ty, false); |
| Value *Val5 = Builder.CreateCall(CGM.getIntrinsic(Intrinsic::arm_mve_pred_i2v, {llvm::FixedVectorType::get(Builder.getInt1Ty(), 16)}), {Val4}); |
| llvm::Type *Val6 = llvm::FixedVectorType::get(Int8Ty, 16); |
| Value *Val7 = llvm::Constant::getNullValue(Val6); |
| return Builder.CreateCall(CGM.getIntrinsic(Intrinsic::masked_load, {llvm::FixedVectorType::get(Int8Ty, 16), llvm::PointerType::getUnqual(llvm::FixedVectorType::get(Int8Ty, 16))}), {Val1, Val2, Val5, Val7}); |
| } |
| case ARM::BI__builtin_arm_mve_vldrbq_s32: |
| case ARM::BI__builtin_arm_mve_vldrbq_u32: { |
| bool Param0; |
| switch (BuiltinID) { |
| case ARM::BI__builtin_arm_mve_vldrbq_s32: |
| Param0 = 0; |
| break; |
| case ARM::BI__builtin_arm_mve_vldrbq_u32: |
| Param0 = 1; |
| break; |
| } |
| Address Val0 = EmitPointerWithAlignment(E->getArg(0)); |
| Value *Val1 = Builder.CreatePointerCast((Val0.getPointer()), llvm::PointerType::getUnqual(llvm::FixedVectorType::get(Int8Ty, 4))); |
| Address Val2 = Address(Val1, CharUnits::fromQuantity(1)); |
| Value *Val3 = Builder.CreateLoad(Val2); |
| llvm::Type *Val4 = llvm::FixedVectorType::get(Int32Ty, 4); |
| return SignOrZeroExtend(Builder, Val3, Val4, static_cast<bool>(Param0)); |
| } |
| case ARM::BI__builtin_arm_mve_vldrbq_z_s32: |
| case ARM::BI__builtin_arm_mve_vldrbq_z_u32: { |
| bool Param0; |
| switch (BuiltinID) { |
| case ARM::BI__builtin_arm_mve_vldrbq_z_s32: |
| Param0 = 0; |
| break; |
| case ARM::BI__builtin_arm_mve_vldrbq_z_u32: |
| Param0 = 1; |
| break; |
| } |
| Address Val0 = EmitPointerWithAlignment(E->getArg(0)); |
| Value *Val1 = Builder.CreatePointerCast((Val0.getPointer()), llvm::PointerType::getUnqual(llvm::FixedVectorType::get(Int8Ty, 4))); |
| Value *Val2 = llvm::ConstantInt::get(Int32Ty, 1); |
| Value *Val3 = EmitScalarExpr(E->getArg(1)); |
| Value *Val4 = Builder.CreateIntCast(Val3, Int32Ty, false); |
| Value *Val5 = Builder.CreateCall(CGM.getIntrinsic(Intrinsic::arm_mve_pred_i2v, {llvm::FixedVectorType::get(Builder.getInt1Ty(), 4)}), {Val4}); |
| llvm::Type *Val6 = llvm::FixedVectorType::get(Int8Ty, 4); |
| Value *Val7 = llvm::Constant::getNullValue(Val6); |
| Value *Val8 = Builder.CreateCall(CGM.getIntrinsic(Intrinsic::masked_load, {llvm::FixedVectorType::get(Int8Ty, 4), llvm::PointerType::getUnqual(llvm::FixedVectorType::get(Int8Ty, 4))}), {Val1, Val2, Val5, Val7}); |
| llvm::Type *Val9 = llvm::FixedVectorType::get(Int32Ty, 4); |
| return SignOrZeroExtend(Builder, Val8, Val9, static_cast<bool>(Param0)); |
| } |
| case ARM::BI__builtin_arm_mve_vldrbq_s16: |
| case ARM::BI__builtin_arm_mve_vldrbq_u16: { |
| bool Param0; |
| switch (BuiltinID) { |
| case ARM::BI__builtin_arm_mve_vldrbq_s16: |
| Param0 = 0; |
| break; |
| case ARM::BI__builtin_arm_mve_vldrbq_u16: |
| Param0 = 1; |
| break; |
| } |
| Address Val0 = EmitPointerWithAlignment(E->getArg(0)); |
| Value *Val1 = Builder.CreatePointerCast((Val0.getPointer()), llvm::PointerType::getUnqual(llvm::FixedVectorType::get(Int8Ty, 8))); |
| Address Val2 = Address(Val1, CharUnits::fromQuantity(1)); |
| Value *Val3 = Builder.CreateLoad(Val2); |
| llvm::Type *Val4 = llvm::FixedVectorType::get(Int16Ty, 8); |
| return SignOrZeroExtend(Builder, Val3, Val4, static_cast<bool>(Param0)); |
| } |
| case ARM::BI__builtin_arm_mve_vldrbq_z_s16: |
| case ARM::BI__builtin_arm_mve_vldrbq_z_u16: { |
| bool Param0; |
| switch (BuiltinID) { |
| case ARM::BI__builtin_arm_mve_vldrbq_z_s16: |
| Param0 = 0; |
| break; |
| case ARM::BI__builtin_arm_mve_vldrbq_z_u16: |
| Param0 = 1; |
| break; |
| } |
| Address Val0 = EmitPointerWithAlignment(E->getArg(0)); |
| Value *Val1 = Builder.CreatePointerCast((Val0.getPointer()), llvm::PointerType::getUnqual(llvm::FixedVectorType::get(Int8Ty, 8))); |
| Value *Val2 = llvm::ConstantInt::get(Int32Ty, 1); |
| Value *Val3 = EmitScalarExpr(E->getArg(1)); |
| Value *Val4 = Builder.CreateIntCast(Val3, Int32Ty, false); |
| Value *Val5 = Builder.CreateCall(CGM.getIntrinsic(Intrinsic::arm_mve_pred_i2v, {llvm::FixedVectorType::get(Builder.getInt1Ty(), 8)}), {Val4}); |
| llvm::Type *Val6 = llvm::FixedVectorType::get(Int8Ty, 8); |
| Value *Val7 = llvm::Constant::getNullValue(Val6); |
| Value *Val8 = Builder.CreateCall(CGM.getIntrinsic(Intrinsic::masked_load, {llvm::FixedVectorType::get(Int8Ty, 8), llvm::PointerType::getUnqual(llvm::FixedVectorType::get(Int8Ty, 8))}), {Val1, Val2, Val5, Val7}); |
| llvm::Type *Val9 = llvm::FixedVectorType::get(Int16Ty, 8); |
| return SignOrZeroExtend(Builder, Val8, Val9, static_cast<bool>(Param0)); |
| } |
| case ARM::BI__builtin_arm_mve_vstrbq_scatter_offset_p_s16: |
| case ARM::BI__builtin_arm_mve_vstrbq_scatter_offset_p_s32: |
| case ARM::BI__builtin_arm_mve_vstrbq_scatter_offset_p_s8: |
| case ARM::BI__builtin_arm_mve_vstrbq_scatter_offset_p_u16: |
| case ARM::BI__builtin_arm_mve_vstrbq_scatter_offset_p_u32: |
| case ARM::BI__builtin_arm_mve_vstrbq_scatter_offset_p_u8: |
| case ARM::BI__builtin_arm_mve_vstrdq_scatter_offset_p_s64: |
| case ARM::BI__builtin_arm_mve_vstrdq_scatter_offset_p_u64: |
| case ARM::BI__builtin_arm_mve_vstrdq_scatter_shifted_offset_p_s64: |
| case ARM::BI__builtin_arm_mve_vstrdq_scatter_shifted_offset_p_u64: |
| case ARM::BI__builtin_arm_mve_vstrhq_scatter_offset_p_f16: |
| case ARM::BI__builtin_arm_mve_vstrhq_scatter_offset_p_s16: |
| case ARM::BI__builtin_arm_mve_vstrhq_scatter_offset_p_s32: |
| case ARM::BI__builtin_arm_mve_vstrhq_scatter_offset_p_u16: |
| case ARM::BI__builtin_arm_mve_vstrhq_scatter_offset_p_u32: |
| case ARM::BI__builtin_arm_mve_vstrhq_scatter_shifted_offset_p_f16: |
| case ARM::BI__builtin_arm_mve_vstrhq_scatter_shifted_offset_p_s16: |
| case ARM::BI__builtin_arm_mve_vstrhq_scatter_shifted_offset_p_s32: |
| case ARM::BI__builtin_arm_mve_vstrhq_scatter_shifted_offset_p_u16: |
| case ARM::BI__builtin_arm_mve_vstrhq_scatter_shifted_offset_p_u32: |
| case ARM::BI__builtin_arm_mve_vstrwq_scatter_offset_p_f32: |
| case ARM::BI__builtin_arm_mve_vstrwq_scatter_offset_p_s32: |
| case ARM::BI__builtin_arm_mve_vstrwq_scatter_offset_p_u32: |
| case ARM::BI__builtin_arm_mve_vstrwq_scatter_shifted_offset_p_f32: |
| case ARM::BI__builtin_arm_mve_vstrwq_scatter_shifted_offset_p_s32: |
| case ARM::BI__builtin_arm_mve_vstrwq_scatter_shifted_offset_p_u32: { |
| uint32_t Param0; |
| uint32_t Param1; |
| llvm::Type * Param2; |
| llvm::Type * Param3; |
| llvm::Type * Param4; |
| llvm::Type * Param5; |
| switch (BuiltinID) { |
| case ARM::BI__builtin_arm_mve_vstrbq_scatter_offset_p_s16: |
| Param0 = 8; |
| Param1 = 0; |
| Param2 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 8); |
| Param3 = llvm::PointerType::getUnqual(Int8Ty); |
| Param4 = llvm::FixedVectorType::get(Int16Ty, 8); |
| Param5 = llvm::FixedVectorType::get(Int16Ty, 8); |
| break; |
| case ARM::BI__builtin_arm_mve_vstrbq_scatter_offset_p_s32: |
| Param0 = 8; |
| Param1 = 0; |
| Param2 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 4); |
| Param3 = llvm::PointerType::getUnqual(Int8Ty); |
| Param4 = llvm::FixedVectorType::get(Int32Ty, 4); |
| Param5 = llvm::FixedVectorType::get(Int32Ty, 4); |
| break; |
| case ARM::BI__builtin_arm_mve_vstrbq_scatter_offset_p_s8: |
| Param0 = 8; |
| Param1 = 0; |
| Param2 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 16); |
| Param3 = llvm::PointerType::getUnqual(Int8Ty); |
| Param4 = llvm::FixedVectorType::get(Int8Ty, 16); |
| Param5 = llvm::FixedVectorType::get(Int8Ty, 16); |
| break; |
| case ARM::BI__builtin_arm_mve_vstrbq_scatter_offset_p_u16: |
| Param0 = 8; |
| Param1 = 0; |
| Param2 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 8); |
| Param3 = llvm::PointerType::getUnqual(Int8Ty); |
| Param4 = llvm::FixedVectorType::get(Int16Ty, 8); |
| Param5 = llvm::FixedVectorType::get(Int16Ty, 8); |
| break; |
| case ARM::BI__builtin_arm_mve_vstrbq_scatter_offset_p_u32: |
| Param0 = 8; |
| Param1 = 0; |
| Param2 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 4); |
| Param3 = llvm::PointerType::getUnqual(Int8Ty); |
| Param4 = llvm::FixedVectorType::get(Int32Ty, 4); |
| Param5 = llvm::FixedVectorType::get(Int32Ty, 4); |
| break; |
| case ARM::BI__builtin_arm_mve_vstrbq_scatter_offset_p_u8: |
| Param0 = 8; |
| Param1 = 0; |
| Param2 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 16); |
| Param3 = llvm::PointerType::getUnqual(Int8Ty); |
| Param4 = llvm::FixedVectorType::get(Int8Ty, 16); |
| Param5 = llvm::FixedVectorType::get(Int8Ty, 16); |
| break; |
| case ARM::BI__builtin_arm_mve_vstrdq_scatter_offset_p_s64: |
| Param0 = 64; |
| Param1 = 0; |
| Param2 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 4); |
| Param3 = llvm::PointerType::getUnqual(Int64Ty); |
| Param4 = llvm::FixedVectorType::get(Int64Ty, 2); |
| Param5 = llvm::FixedVectorType::get(Int64Ty, 2); |
| break; |
| case ARM::BI__builtin_arm_mve_vstrdq_scatter_offset_p_u64: |
| Param0 = 64; |
| Param1 = 0; |
| Param2 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 4); |
| Param3 = llvm::PointerType::getUnqual(Int64Ty); |
| Param4 = llvm::FixedVectorType::get(Int64Ty, 2); |
| Param5 = llvm::FixedVectorType::get(Int64Ty, 2); |
| break; |
| case ARM::BI__builtin_arm_mve_vstrdq_scatter_shifted_offset_p_s64: |
| Param0 = 64; |
| Param1 = 3; |
| Param2 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 4); |
| Param3 = llvm::PointerType::getUnqual(Int64Ty); |
| Param4 = llvm::FixedVectorType::get(Int64Ty, 2); |
| Param5 = llvm::FixedVectorType::get(Int64Ty, 2); |
| break; |
| case ARM::BI__builtin_arm_mve_vstrdq_scatter_shifted_offset_p_u64: |
| Param0 = 64; |
| Param1 = 3; |
| Param2 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 4); |
| Param3 = llvm::PointerType::getUnqual(Int64Ty); |
| Param4 = llvm::FixedVectorType::get(Int64Ty, 2); |
| Param5 = llvm::FixedVectorType::get(Int64Ty, 2); |
| break; |
| case ARM::BI__builtin_arm_mve_vstrhq_scatter_offset_p_f16: |
| Param0 = 16; |
| Param1 = 0; |
| Param2 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 8); |
| Param3 = llvm::PointerType::getUnqual(HalfTy); |
| Param4 = llvm::FixedVectorType::get(Int16Ty, 8); |
| Param5 = llvm::FixedVectorType::get(HalfTy, 8); |
| break; |
| case ARM::BI__builtin_arm_mve_vstrhq_scatter_offset_p_s16: |
| Param0 = 16; |
| Param1 = 0; |
| Param2 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 8); |
| Param3 = llvm::PointerType::getUnqual(Int16Ty); |
| Param4 = llvm::FixedVectorType::get(Int16Ty, 8); |
| Param5 = llvm::FixedVectorType::get(Int16Ty, 8); |
| break; |
| case ARM::BI__builtin_arm_mve_vstrhq_scatter_offset_p_s32: |
| Param0 = 16; |
| Param1 = 0; |
| Param2 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 4); |
| Param3 = llvm::PointerType::getUnqual(Int16Ty); |
| Param4 = llvm::FixedVectorType::get(Int32Ty, 4); |
| Param5 = llvm::FixedVectorType::get(Int32Ty, 4); |
| break; |
| case ARM::BI__builtin_arm_mve_vstrhq_scatter_offset_p_u16: |
| Param0 = 16; |
| Param1 = 0; |
| Param2 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 8); |
| Param3 = llvm::PointerType::getUnqual(Int16Ty); |
| Param4 = llvm::FixedVectorType::get(Int16Ty, 8); |
| Param5 = llvm::FixedVectorType::get(Int16Ty, 8); |
| break; |
| case ARM::BI__builtin_arm_mve_vstrhq_scatter_offset_p_u32: |
| Param0 = 16; |
| Param1 = 0; |
| Param2 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 4); |
| Param3 = llvm::PointerType::getUnqual(Int16Ty); |
| Param4 = llvm::FixedVectorType::get(Int32Ty, 4); |
| Param5 = llvm::FixedVectorType::get(Int32Ty, 4); |
| break; |
| case ARM::BI__builtin_arm_mve_vstrhq_scatter_shifted_offset_p_f16: |
| Param0 = 16; |
| Param1 = 1; |
| Param2 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 8); |
| Param3 = llvm::PointerType::getUnqual(HalfTy); |
| Param4 = llvm::FixedVectorType::get(Int16Ty, 8); |
| Param5 = llvm::FixedVectorType::get(HalfTy, 8); |
| break; |
| case ARM::BI__builtin_arm_mve_vstrhq_scatter_shifted_offset_p_s16: |
| Param0 = 16; |
| Param1 = 1; |
| Param2 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 8); |
| Param3 = llvm::PointerType::getUnqual(Int16Ty); |
| Param4 = llvm::FixedVectorType::get(Int16Ty, 8); |
| Param5 = llvm::FixedVectorType::get(Int16Ty, 8); |
| break; |
| case ARM::BI__builtin_arm_mve_vstrhq_scatter_shifted_offset_p_s32: |
| Param0 = 16; |
| Param1 = 1; |
| Param2 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 4); |
| Param3 = llvm::PointerType::getUnqual(Int16Ty); |
| Param4 = llvm::FixedVectorType::get(Int32Ty, 4); |
| Param5 = llvm::FixedVectorType::get(Int32Ty, 4); |
| break; |
| case ARM::BI__builtin_arm_mve_vstrhq_scatter_shifted_offset_p_u16: |
| Param0 = 16; |
| Param1 = 1; |
| Param2 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 8); |
| Param3 = llvm::PointerType::getUnqual(Int16Ty); |
| Param4 = llvm::FixedVectorType::get(Int16Ty, 8); |
| Param5 = llvm::FixedVectorType::get(Int16Ty, 8); |
| break; |
| case ARM::BI__builtin_arm_mve_vstrhq_scatter_shifted_offset_p_u32: |
| Param0 = 16; |
| Param1 = 1; |
| Param2 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 4); |
| Param3 = llvm::PointerType::getUnqual(Int16Ty); |
| Param4 = llvm::FixedVectorType::get(Int32Ty, 4); |
| Param5 = llvm::FixedVectorType::get(Int32Ty, 4); |
| break; |
| case ARM::BI__builtin_arm_mve_vstrwq_scatter_offset_p_f32: |
| Param0 = 32; |
| Param1 = 0; |
| Param2 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 4); |
| Param3 = llvm::PointerType::getUnqual(FloatTy); |
| Param4 = llvm::FixedVectorType::get(Int32Ty, 4); |
| Param5 = llvm::FixedVectorType::get(FloatTy, 4); |
| break; |
| case ARM::BI__builtin_arm_mve_vstrwq_scatter_offset_p_s32: |
| Param0 = 32; |
| Param1 = 0; |
| Param2 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 4); |
| Param3 = llvm::PointerType::getUnqual(Int32Ty); |
| Param4 = llvm::FixedVectorType::get(Int32Ty, 4); |
| Param5 = llvm::FixedVectorType::get(Int32Ty, 4); |
| break; |
| case ARM::BI__builtin_arm_mve_vstrwq_scatter_offset_p_u32: |
| Param0 = 32; |
| Param1 = 0; |
| Param2 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 4); |
| Param3 = llvm::PointerType::getUnqual(Int32Ty); |
| Param4 = llvm::FixedVectorType::get(Int32Ty, 4); |
| Param5 = llvm::FixedVectorType::get(Int32Ty, 4); |
| break; |
| case ARM::BI__builtin_arm_mve_vstrwq_scatter_shifted_offset_p_f32: |
| Param0 = 32; |
| Param1 = 2; |
| Param2 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 4); |
| Param3 = llvm::PointerType::getUnqual(FloatTy); |
| Param4 = llvm::FixedVectorType::get(Int32Ty, 4); |
| Param5 = llvm::FixedVectorType::get(FloatTy, 4); |
| break; |
| case ARM::BI__builtin_arm_mve_vstrwq_scatter_shifted_offset_p_s32: |
| Param0 = 32; |
| Param1 = 2; |
| Param2 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 4); |
| Param3 = llvm::PointerType::getUnqual(Int32Ty); |
| Param4 = llvm::FixedVectorType::get(Int32Ty, 4); |
| Param5 = llvm::FixedVectorType::get(Int32Ty, 4); |
| break; |
| case ARM::BI__builtin_arm_mve_vstrwq_scatter_shifted_offset_p_u32: |
| Param0 = 32; |
| Param1 = 2; |
| Param2 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 4); |
| Param3 = llvm::PointerType::getUnqual(Int32Ty); |
| Param4 = llvm::FixedVectorType::get(Int32Ty, 4); |
| Param5 = llvm::FixedVectorType::get(Int32Ty, 4); |
| break; |
| } |
| Address Val0 = EmitPointerWithAlignment(E->getArg(0)); |
| Value *Val1 = EmitScalarExpr(E->getArg(1)); |
| Value *Val2 = EmitScalarExpr(E->getArg(2)); |
| Value *Val3 = llvm::ConstantInt::get(Int32Ty, Param0); |
| Value *Val4 = llvm::ConstantInt::get(Int32Ty, Param1); |
| Value *Val5 = EmitScalarExpr(E->getArg(3)); |
| Value *Val6 = Builder.CreateIntCast(Val5, Int32Ty, false); |
| Value *Val7 = Builder.CreateCall(CGM.getIntrinsic(Intrinsic::arm_mve_pred_i2v, {Param2}), {Val6}); |
| return Builder.CreateCall(CGM.getIntrinsic(Intrinsic::arm_mve_vstr_scatter_offset_predicated, {Param3, Param4, Param5, Param2}), {(Val0.getPointer()), Val1, Val2, Val3, Val4, Val7}); |
| } |
| case ARM::BI__builtin_arm_mve_vstrbq_scatter_offset_s16: |
| case ARM::BI__builtin_arm_mve_vstrbq_scatter_offset_s32: |
| case ARM::BI__builtin_arm_mve_vstrbq_scatter_offset_s8: |
| case ARM::BI__builtin_arm_mve_vstrbq_scatter_offset_u16: |
| case ARM::BI__builtin_arm_mve_vstrbq_scatter_offset_u32: |
| case ARM::BI__builtin_arm_mve_vstrbq_scatter_offset_u8: |
| case ARM::BI__builtin_arm_mve_vstrdq_scatter_offset_s64: |
| case ARM::BI__builtin_arm_mve_vstrdq_scatter_offset_u64: |
| case ARM::BI__builtin_arm_mve_vstrdq_scatter_shifted_offset_s64: |
| case ARM::BI__builtin_arm_mve_vstrdq_scatter_shifted_offset_u64: |
| case ARM::BI__builtin_arm_mve_vstrhq_scatter_offset_f16: |
| case ARM::BI__builtin_arm_mve_vstrhq_scatter_offset_s16: |
| case ARM::BI__builtin_arm_mve_vstrhq_scatter_offset_s32: |
| case ARM::BI__builtin_arm_mve_vstrhq_scatter_offset_u16: |
| case ARM::BI__builtin_arm_mve_vstrhq_scatter_offset_u32: |
| case ARM::BI__builtin_arm_mve_vstrhq_scatter_shifted_offset_f16: |
| case ARM::BI__builtin_arm_mve_vstrhq_scatter_shifted_offset_s16: |
| case ARM::BI__builtin_arm_mve_vstrhq_scatter_shifted_offset_s32: |
| case ARM::BI__builtin_arm_mve_vstrhq_scatter_shifted_offset_u16: |
| case ARM::BI__builtin_arm_mve_vstrhq_scatter_shifted_offset_u32: |
| case ARM::BI__builtin_arm_mve_vstrwq_scatter_offset_f32: |
| case ARM::BI__builtin_arm_mve_vstrwq_scatter_offset_s32: |
| case ARM::BI__builtin_arm_mve_vstrwq_scatter_offset_u32: |
| case ARM::BI__builtin_arm_mve_vstrwq_scatter_shifted_offset_f32: |
| case ARM::BI__builtin_arm_mve_vstrwq_scatter_shifted_offset_s32: |
| case ARM::BI__builtin_arm_mve_vstrwq_scatter_shifted_offset_u32: { |
| uint32_t Param0; |
| uint32_t Param1; |
| llvm::Type * Param2; |
| llvm::Type * Param3; |
| llvm::Type * Param4; |
| switch (BuiltinID) { |
| case ARM::BI__builtin_arm_mve_vstrbq_scatter_offset_s16: |
| Param0 = 8; |
| Param1 = 0; |
| Param2 = llvm::PointerType::getUnqual(Int8Ty); |
| Param3 = llvm::FixedVectorType::get(Int16Ty, 8); |
| Param4 = llvm::FixedVectorType::get(Int16Ty, 8); |
| break; |
| case ARM::BI__builtin_arm_mve_vstrbq_scatter_offset_s32: |
| Param0 = 8; |
| Param1 = 0; |
| Param2 = llvm::PointerType::getUnqual(Int8Ty); |
| Param3 = llvm::FixedVectorType::get(Int32Ty, 4); |
| Param4 = llvm::FixedVectorType::get(Int32Ty, 4); |
| break; |
| case ARM::BI__builtin_arm_mve_vstrbq_scatter_offset_s8: |
| Param0 = 8; |
| Param1 = 0; |
| Param2 = llvm::PointerType::getUnqual(Int8Ty); |
| Param3 = llvm::FixedVectorType::get(Int8Ty, 16); |
| Param4 = llvm::FixedVectorType::get(Int8Ty, 16); |
| break; |
| case ARM::BI__builtin_arm_mve_vstrbq_scatter_offset_u16: |
| Param0 = 8; |
| Param1 = 0; |
| Param2 = llvm::PointerType::getUnqual(Int8Ty); |
| Param3 = llvm::FixedVectorType::get(Int16Ty, 8); |
| Param4 = llvm::FixedVectorType::get(Int16Ty, 8); |
| break; |
| case ARM::BI__builtin_arm_mve_vstrbq_scatter_offset_u32: |
| Param0 = 8; |
| Param1 = 0; |
| Param2 = llvm::PointerType::getUnqual(Int8Ty); |
| Param3 = llvm::FixedVectorType::get(Int32Ty, 4); |
| Param4 = llvm::FixedVectorType::get(Int32Ty, 4); |
| break; |
| case ARM::BI__builtin_arm_mve_vstrbq_scatter_offset_u8: |
| Param0 = 8; |
| Param1 = 0; |
| Param2 = llvm::PointerType::getUnqual(Int8Ty); |
| Param3 = llvm::FixedVectorType::get(Int8Ty, 16); |
| Param4 = llvm::FixedVectorType::get(Int8Ty, 16); |
| break; |
| case ARM::BI__builtin_arm_mve_vstrdq_scatter_offset_s64: |
| Param0 = 64; |
| Param1 = 0; |
| Param2 = llvm::PointerType::getUnqual(Int64Ty); |
| Param3 = llvm::FixedVectorType::get(Int64Ty, 2); |
| Param4 = llvm::FixedVectorType::get(Int64Ty, 2); |
| break; |
| case ARM::BI__builtin_arm_mve_vstrdq_scatter_offset_u64: |
| Param0 = 64; |
| Param1 = 0; |
| Param2 = llvm::PointerType::getUnqual(Int64Ty); |
| Param3 = llvm::FixedVectorType::get(Int64Ty, 2); |
| Param4 = llvm::FixedVectorType::get(Int64Ty, 2); |
| break; |
| case ARM::BI__builtin_arm_mve_vstrdq_scatter_shifted_offset_s64: |
| Param0 = 64; |
| Param1 = 3; |
| Param2 = llvm::PointerType::getUnqual(Int64Ty); |
| Param3 = llvm::FixedVectorType::get(Int64Ty, 2); |
| Param4 = llvm::FixedVectorType::get(Int64Ty, 2); |
| break; |
| case ARM::BI__builtin_arm_mve_vstrdq_scatter_shifted_offset_u64: |
| Param0 = 64; |
| Param1 = 3; |
| Param2 = llvm::PointerType::getUnqual(Int64Ty); |
| Param3 = llvm::FixedVectorType::get(Int64Ty, 2); |
| Param4 = llvm::FixedVectorType::get(Int64Ty, 2); |
| break; |
| case ARM::BI__builtin_arm_mve_vstrhq_scatter_offset_f16: |
| Param0 = 16; |
| Param1 = 0; |
| Param2 = llvm::PointerType::getUnqual(HalfTy); |
| Param3 = llvm::FixedVectorType::get(Int16Ty, 8); |
| Param4 = llvm::FixedVectorType::get(HalfTy, 8); |
| break; |
| case ARM::BI__builtin_arm_mve_vstrhq_scatter_offset_s16: |
| Param0 = 16; |
| Param1 = 0; |
| Param2 = llvm::PointerType::getUnqual(Int16Ty); |
| Param3 = llvm::FixedVectorType::get(Int16Ty, 8); |
| Param4 = llvm::FixedVectorType::get(Int16Ty, 8); |
| break; |
| case ARM::BI__builtin_arm_mve_vstrhq_scatter_offset_s32: |
| Param0 = 16; |
| Param1 = 0; |
| Param2 = llvm::PointerType::getUnqual(Int16Ty); |
| Param3 = llvm::FixedVectorType::get(Int32Ty, 4); |
| Param4 = llvm::FixedVectorType::get(Int32Ty, 4); |
| break; |
| case ARM::BI__builtin_arm_mve_vstrhq_scatter_offset_u16: |
| Param0 = 16; |
| Param1 = 0; |
| Param2 = llvm::PointerType::getUnqual(Int16Ty); |
| Param3 = llvm::FixedVectorType::get(Int16Ty, 8); |
| Param4 = llvm::FixedVectorType::get(Int16Ty, 8); |
| break; |
| case ARM::BI__builtin_arm_mve_vstrhq_scatter_offset_u32: |
| Param0 = 16; |
| Param1 = 0; |
| Param2 = llvm::PointerType::getUnqual(Int16Ty); |
| Param3 = llvm::FixedVectorType::get(Int32Ty, 4); |
| Param4 = llvm::FixedVectorType::get(Int32Ty, 4); |
| break; |
| case ARM::BI__builtin_arm_mve_vstrhq_scatter_shifted_offset_f16: |
| Param0 = 16; |
| Param1 = 1; |
| Param2 = llvm::PointerType::getUnqual(HalfTy); |
| Param3 = llvm::FixedVectorType::get(Int16Ty, 8); |
| Param4 = llvm::FixedVectorType::get(HalfTy, 8); |
| break; |
| case ARM::BI__builtin_arm_mve_vstrhq_scatter_shifted_offset_s16: |
| Param0 = 16; |
| Param1 = 1; |
| Param2 = llvm::PointerType::getUnqual(Int16Ty); |
| Param3 = llvm::FixedVectorType::get(Int16Ty, 8); |
| Param4 = llvm::FixedVectorType::get(Int16Ty, 8); |
| break; |
| case ARM::BI__builtin_arm_mve_vstrhq_scatter_shifted_offset_s32: |
| Param0 = 16; |
| Param1 = 1; |
| Param2 = llvm::PointerType::getUnqual(Int16Ty); |
| Param3 = llvm::FixedVectorType::get(Int32Ty, 4); |
| Param4 = llvm::FixedVectorType::get(Int32Ty, 4); |
| break; |
| case ARM::BI__builtin_arm_mve_vstrhq_scatter_shifted_offset_u16: |
| Param0 = 16; |
| Param1 = 1; |
| Param2 = llvm::PointerType::getUnqual(Int16Ty); |
| Param3 = llvm::FixedVectorType::get(Int16Ty, 8); |
| Param4 = llvm::FixedVectorType::get(Int16Ty, 8); |
| break; |
| case ARM::BI__builtin_arm_mve_vstrhq_scatter_shifted_offset_u32: |
| Param0 = 16; |
| Param1 = 1; |
| Param2 = llvm::PointerType::getUnqual(Int16Ty); |
| Param3 = llvm::FixedVectorType::get(Int32Ty, 4); |
| Param4 = llvm::FixedVectorType::get(Int32Ty, 4); |
| break; |
| case ARM::BI__builtin_arm_mve_vstrwq_scatter_offset_f32: |
| Param0 = 32; |
| Param1 = 0; |
| Param2 = llvm::PointerType::getUnqual(FloatTy); |
| Param3 = llvm::FixedVectorType::get(Int32Ty, 4); |
| Param4 = llvm::FixedVectorType::get(FloatTy, 4); |
| break; |
| case ARM::BI__builtin_arm_mve_vstrwq_scatter_offset_s32: |
| Param0 = 32; |
| Param1 = 0; |
| Param2 = llvm::PointerType::getUnqual(Int32Ty); |
| Param3 = llvm::FixedVectorType::get(Int32Ty, 4); |
| Param4 = llvm::FixedVectorType::get(Int32Ty, 4); |
| break; |
| case ARM::BI__builtin_arm_mve_vstrwq_scatter_offset_u32: |
| Param0 = 32; |
| Param1 = 0; |
| Param2 = llvm::PointerType::getUnqual(Int32Ty); |
| Param3 = llvm::FixedVectorType::get(Int32Ty, 4); |
| Param4 = llvm::FixedVectorType::get(Int32Ty, 4); |
| break; |
| case ARM::BI__builtin_arm_mve_vstrwq_scatter_shifted_offset_f32: |
| Param0 = 32; |
| Param1 = 2; |
| Param2 = llvm::PointerType::getUnqual(FloatTy); |
| Param3 = llvm::FixedVectorType::get(Int32Ty, 4); |
| Param4 = llvm::FixedVectorType::get(FloatTy, 4); |
| break; |
| case ARM::BI__builtin_arm_mve_vstrwq_scatter_shifted_offset_s32: |
| Param0 = 32; |
| Param1 = 2; |
| Param2 = llvm::PointerType::getUnqual(Int32Ty); |
| Param3 = llvm::FixedVectorType::get(Int32Ty, 4); |
| Param4 = llvm::FixedVectorType::get(Int32Ty, 4); |
| break; |
| case ARM::BI__builtin_arm_mve_vstrwq_scatter_shifted_offset_u32: |
| Param0 = 32; |
| Param1 = 2; |
| Param2 = llvm::PointerType::getUnqual(Int32Ty); |
| Param3 = llvm::FixedVectorType::get(Int32Ty, 4); |
| Param4 = llvm::FixedVectorType::get(Int32Ty, 4); |
| break; |
| } |
| Address Val0 = EmitPointerWithAlignment(E->getArg(0)); |
| Value *Val1 = EmitScalarExpr(E->getArg(1)); |
| Value *Val2 = EmitScalarExpr(E->getArg(2)); |
| Value *Val3 = llvm::ConstantInt::get(Int32Ty, Param0); |
| Value *Val4 = llvm::ConstantInt::get(Int32Ty, Param1); |
| return Builder.CreateCall(CGM.getIntrinsic(Intrinsic::arm_mve_vstr_scatter_offset, {Param2, Param3, Param4}), {(Val0.getPointer()), Val1, Val2, Val3, Val4}); |
| } |
| case ARM::BI__builtin_arm_mve_vldrbq_gather_offset_z_s16: |
| case ARM::BI__builtin_arm_mve_vldrbq_gather_offset_z_s32: |
| case ARM::BI__builtin_arm_mve_vldrbq_gather_offset_z_s8: |
| case ARM::BI__builtin_arm_mve_vldrbq_gather_offset_z_u16: |
| case ARM::BI__builtin_arm_mve_vldrbq_gather_offset_z_u32: |
| case ARM::BI__builtin_arm_mve_vldrbq_gather_offset_z_u8: |
| case ARM::BI__builtin_arm_mve_vldrdq_gather_offset_z_s64: |
| case ARM::BI__builtin_arm_mve_vldrdq_gather_offset_z_u64: |
| case ARM::BI__builtin_arm_mve_vldrdq_gather_shifted_offset_z_s64: |
| case ARM::BI__builtin_arm_mve_vldrdq_gather_shifted_offset_z_u64: |
| case ARM::BI__builtin_arm_mve_vldrhq_gather_offset_z_f16: |
| case ARM::BI__builtin_arm_mve_vldrhq_gather_offset_z_s16: |
| case ARM::BI__builtin_arm_mve_vldrhq_gather_offset_z_s32: |
| case ARM::BI__builtin_arm_mve_vldrhq_gather_offset_z_u16: |
| case ARM::BI__builtin_arm_mve_vldrhq_gather_offset_z_u32: |
| case ARM::BI__builtin_arm_mve_vldrhq_gather_shifted_offset_z_f16: |
| case ARM::BI__builtin_arm_mve_vldrhq_gather_shifted_offset_z_s16: |
| case ARM::BI__builtin_arm_mve_vldrhq_gather_shifted_offset_z_s32: |
| case ARM::BI__builtin_arm_mve_vldrhq_gather_shifted_offset_z_u16: |
| case ARM::BI__builtin_arm_mve_vldrhq_gather_shifted_offset_z_u32: |
| case ARM::BI__builtin_arm_mve_vldrwq_gather_offset_z_f32: |
| case ARM::BI__builtin_arm_mve_vldrwq_gather_offset_z_s32: |
| case ARM::BI__builtin_arm_mve_vldrwq_gather_offset_z_u32: |
| case ARM::BI__builtin_arm_mve_vldrwq_gather_shifted_offset_z_f32: |
| case ARM::BI__builtin_arm_mve_vldrwq_gather_shifted_offset_z_s32: |
| case ARM::BI__builtin_arm_mve_vldrwq_gather_shifted_offset_z_u32: { |
| uint32_t Param0; |
| uint32_t Param1; |
| uint32_t Param2; |
| llvm::Type * Param3; |
| llvm::Type * Param4; |
| llvm::Type * Param5; |
| llvm::Type * Param6; |
| switch (BuiltinID) { |
| case ARM::BI__builtin_arm_mve_vldrbq_gather_offset_z_s16: |
| Param0 = 8; |
| Param1 = 0; |
| Param2 = 0; |
| Param3 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 8); |
| Param4 = llvm::FixedVectorType::get(Int16Ty, 8); |
| Param5 = llvm::PointerType::getUnqual(Int8Ty); |
| Param6 = llvm::FixedVectorType::get(Int16Ty, 8); |
| break; |
| case ARM::BI__builtin_arm_mve_vldrbq_gather_offset_z_s32: |
| Param0 = 8; |
| Param1 = 0; |
| Param2 = 0; |
| Param3 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 4); |
| Param4 = llvm::FixedVectorType::get(Int32Ty, 4); |
| Param5 = llvm::PointerType::getUnqual(Int8Ty); |
| Param6 = llvm::FixedVectorType::get(Int32Ty, 4); |
| break; |
| case ARM::BI__builtin_arm_mve_vldrbq_gather_offset_z_s8: |
| Param0 = 8; |
| Param1 = 0; |
| Param2 = 0; |
| Param3 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 16); |
| Param4 = llvm::FixedVectorType::get(Int8Ty, 16); |
| Param5 = llvm::PointerType::getUnqual(Int8Ty); |
| Param6 = llvm::FixedVectorType::get(Int8Ty, 16); |
| break; |
| case ARM::BI__builtin_arm_mve_vldrbq_gather_offset_z_u16: |
| Param0 = 8; |
| Param1 = 0; |
| Param2 = 1; |
| Param3 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 8); |
| Param4 = llvm::FixedVectorType::get(Int16Ty, 8); |
| Param5 = llvm::PointerType::getUnqual(Int8Ty); |
| Param6 = llvm::FixedVectorType::get(Int16Ty, 8); |
| break; |
| case ARM::BI__builtin_arm_mve_vldrbq_gather_offset_z_u32: |
| Param0 = 8; |
| Param1 = 0; |
| Param2 = 1; |
| Param3 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 4); |
| Param4 = llvm::FixedVectorType::get(Int32Ty, 4); |
| Param5 = llvm::PointerType::getUnqual(Int8Ty); |
| Param6 = llvm::FixedVectorType::get(Int32Ty, 4); |
| break; |
| case ARM::BI__builtin_arm_mve_vldrbq_gather_offset_z_u8: |
| Param0 = 8; |
| Param1 = 0; |
| Param2 = 1; |
| Param3 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 16); |
| Param4 = llvm::FixedVectorType::get(Int8Ty, 16); |
| Param5 = llvm::PointerType::getUnqual(Int8Ty); |
| Param6 = llvm::FixedVectorType::get(Int8Ty, 16); |
| break; |
| case ARM::BI__builtin_arm_mve_vldrdq_gather_offset_z_s64: |
| Param0 = 64; |
| Param1 = 0; |
| Param2 = 0; |
| Param3 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 4); |
| Param4 = llvm::FixedVectorType::get(Int64Ty, 2); |
| Param5 = llvm::PointerType::getUnqual(Int64Ty); |
| Param6 = llvm::FixedVectorType::get(Int64Ty, 2); |
| break; |
| case ARM::BI__builtin_arm_mve_vldrdq_gather_offset_z_u64: |
| Param0 = 64; |
| Param1 = 0; |
| Param2 = 1; |
| Param3 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 4); |
| Param4 = llvm::FixedVectorType::get(Int64Ty, 2); |
| Param5 = llvm::PointerType::getUnqual(Int64Ty); |
| Param6 = llvm::FixedVectorType::get(Int64Ty, 2); |
| break; |
| case ARM::BI__builtin_arm_mve_vldrdq_gather_shifted_offset_z_s64: |
| Param0 = 64; |
| Param1 = 3; |
| Param2 = 0; |
| Param3 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 4); |
| Param4 = llvm::FixedVectorType::get(Int64Ty, 2); |
| Param5 = llvm::PointerType::getUnqual(Int64Ty); |
| Param6 = llvm::FixedVectorType::get(Int64Ty, 2); |
| break; |
| case ARM::BI__builtin_arm_mve_vldrdq_gather_shifted_offset_z_u64: |
| Param0 = 64; |
| Param1 = 3; |
| Param2 = 1; |
| Param3 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 4); |
| Param4 = llvm::FixedVectorType::get(Int64Ty, 2); |
| Param5 = llvm::PointerType::getUnqual(Int64Ty); |
| Param6 = llvm::FixedVectorType::get(Int64Ty, 2); |
| break; |
| case ARM::BI__builtin_arm_mve_vldrhq_gather_offset_z_f16: |
| Param0 = 16; |
| Param1 = 0; |
| Param2 = 0; |
| Param3 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 8); |
| Param4 = llvm::FixedVectorType::get(HalfTy, 8); |
| Param5 = llvm::PointerType::getUnqual(HalfTy); |
| Param6 = llvm::FixedVectorType::get(Int16Ty, 8); |
| break; |
| case ARM::BI__builtin_arm_mve_vldrhq_gather_offset_z_s16: |
| Param0 = 16; |
| Param1 = 0; |
| Param2 = 0; |
| Param3 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 8); |
| Param4 = llvm::FixedVectorType::get(Int16Ty, 8); |
| Param5 = llvm::PointerType::getUnqual(Int16Ty); |
| Param6 = llvm::FixedVectorType::get(Int16Ty, 8); |
| break; |
| case ARM::BI__builtin_arm_mve_vldrhq_gather_offset_z_s32: |
| Param0 = 16; |
| Param1 = 0; |
| Param2 = 0; |
| Param3 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 4); |
| Param4 = llvm::FixedVectorType::get(Int32Ty, 4); |
| Param5 = llvm::PointerType::getUnqual(Int16Ty); |
| Param6 = llvm::FixedVectorType::get(Int32Ty, 4); |
| break; |
| case ARM::BI__builtin_arm_mve_vldrhq_gather_offset_z_u16: |
| Param0 = 16; |
| Param1 = 0; |
| Param2 = 1; |
| Param3 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 8); |
| Param4 = llvm::FixedVectorType::get(Int16Ty, 8); |
| Param5 = llvm::PointerType::getUnqual(Int16Ty); |
| Param6 = llvm::FixedVectorType::get(Int16Ty, 8); |
| break; |
| case ARM::BI__builtin_arm_mve_vldrhq_gather_offset_z_u32: |
| Param0 = 16; |
| Param1 = 0; |
| Param2 = 1; |
| Param3 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 4); |
| Param4 = llvm::FixedVectorType::get(Int32Ty, 4); |
| Param5 = llvm::PointerType::getUnqual(Int16Ty); |
| Param6 = llvm::FixedVectorType::get(Int32Ty, 4); |
| break; |
| case ARM::BI__builtin_arm_mve_vldrhq_gather_shifted_offset_z_f16: |
| Param0 = 16; |
| Param1 = 1; |
| Param2 = 0; |
| Param3 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 8); |
| Param4 = llvm::FixedVectorType::get(HalfTy, 8); |
| Param5 = llvm::PointerType::getUnqual(HalfTy); |
| Param6 = llvm::FixedVectorType::get(Int16Ty, 8); |
| break; |
| case ARM::BI__builtin_arm_mve_vldrhq_gather_shifted_offset_z_s16: |
| Param0 = 16; |
| Param1 = 1; |
| Param2 = 0; |
| Param3 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 8); |
| Param4 = llvm::FixedVectorType::get(Int16Ty, 8); |
| Param5 = llvm::PointerType::getUnqual(Int16Ty); |
| Param6 = llvm::FixedVectorType::get(Int16Ty, 8); |
| break; |
| case ARM::BI__builtin_arm_mve_vldrhq_gather_shifted_offset_z_s32: |
| Param0 = 16; |
| Param1 = 1; |
| Param2 = 0; |
| Param3 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 4); |
| Param4 = llvm::FixedVectorType::get(Int32Ty, 4); |
| Param5 = llvm::PointerType::getUnqual(Int16Ty); |
| Param6 = llvm::FixedVectorType::get(Int32Ty, 4); |
| break; |
| case ARM::BI__builtin_arm_mve_vldrhq_gather_shifted_offset_z_u16: |
| Param0 = 16; |
| Param1 = 1; |
| Param2 = 1; |
| Param3 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 8); |
| Param4 = llvm::FixedVectorType::get(Int16Ty, 8); |
| Param5 = llvm::PointerType::getUnqual(Int16Ty); |
| Param6 = llvm::FixedVectorType::get(Int16Ty, 8); |
| break; |
| case ARM::BI__builtin_arm_mve_vldrhq_gather_shifted_offset_z_u32: |
| Param0 = 16; |
| Param1 = 1; |
| Param2 = 1; |
| Param3 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 4); |
| Param4 = llvm::FixedVectorType::get(Int32Ty, 4); |
| Param5 = llvm::PointerType::getUnqual(Int16Ty); |
| Param6 = llvm::FixedVectorType::get(Int32Ty, 4); |
| break; |
| case ARM::BI__builtin_arm_mve_vldrwq_gather_offset_z_f32: |
| Param0 = 32; |
| Param1 = 0; |
| Param2 = 0; |
| Param3 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 4); |
| Param4 = llvm::FixedVectorType::get(FloatTy, 4); |
| Param5 = llvm::PointerType::getUnqual(FloatTy); |
| Param6 = llvm::FixedVectorType::get(Int32Ty, 4); |
| break; |
| case ARM::BI__builtin_arm_mve_vldrwq_gather_offset_z_s32: |
| Param0 = 32; |
| Param1 = 0; |
| Param2 = 0; |
| Param3 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 4); |
| Param4 = llvm::FixedVectorType::get(Int32Ty, 4); |
| Param5 = llvm::PointerType::getUnqual(Int32Ty); |
| Param6 = llvm::FixedVectorType::get(Int32Ty, 4); |
| break; |
| case ARM::BI__builtin_arm_mve_vldrwq_gather_offset_z_u32: |
| Param0 = 32; |
| Param1 = 0; |
| Param2 = 1; |
| Param3 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 4); |
| Param4 = llvm::FixedVectorType::get(Int32Ty, 4); |
| Param5 = llvm::PointerType::getUnqual(Int32Ty); |
| Param6 = llvm::FixedVectorType::get(Int32Ty, 4); |
| break; |
| case ARM::BI__builtin_arm_mve_vldrwq_gather_shifted_offset_z_f32: |
| Param0 = 32; |
| Param1 = 2; |
| Param2 = 0; |
| Param3 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 4); |
| Param4 = llvm::FixedVectorType::get(FloatTy, 4); |
| Param5 = llvm::PointerType::getUnqual(FloatTy); |
| Param6 = llvm::FixedVectorType::get(Int32Ty, 4); |
| break; |
| case ARM::BI__builtin_arm_mve_vldrwq_gather_shifted_offset_z_s32: |
| Param0 = 32; |
| Param1 = 2; |
| Param2 = 0; |
| Param3 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 4); |
| Param4 = llvm::FixedVectorType::get(Int32Ty, 4); |
| Param5 = llvm::PointerType::getUnqual(Int32Ty); |
| Param6 = llvm::FixedVectorType::get(Int32Ty, 4); |
| break; |
| case ARM::BI__builtin_arm_mve_vldrwq_gather_shifted_offset_z_u32: |
| Param0 = 32; |
| Param1 = 2; |
| Param2 = 1; |
| Param3 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 4); |
| Param4 = llvm::FixedVectorType::get(Int32Ty, 4); |
| Param5 = llvm::PointerType::getUnqual(Int32Ty); |
| Param6 = llvm::FixedVectorType::get(Int32Ty, 4); |
| break; |
| } |
| Address Val0 = EmitPointerWithAlignment(E->getArg(0)); |
| Value *Val1 = EmitScalarExpr(E->getArg(1)); |
| Value *Val2 = llvm::ConstantInt::get(Int32Ty, Param0); |
| Value *Val3 = llvm::ConstantInt::get(Int32Ty, Param1); |
| Value *Val4 = llvm::ConstantInt::get(Int32Ty, Param2); |
| Value *Val5 = EmitScalarExpr(E->getArg(2)); |
| Value *Val6 = Builder.CreateIntCast(Val5, Int32Ty, false); |
| Value *Val7 = Builder.CreateCall(CGM.getIntrinsic(Intrinsic::arm_mve_pred_i2v, {Param3}), {Val6}); |
| return Builder.CreateCall(CGM.getIntrinsic(Intrinsic::arm_mve_vldr_gather_offset_predicated, {Param4, Param5, Param6, Param3}), {(Val0.getPointer()), Val1, Val2, Val3, Val4, Val7}); |
| } |
| case ARM::BI__builtin_arm_mve_vldrbq_gather_offset_s16: |
| case ARM::BI__builtin_arm_mve_vldrbq_gather_offset_s32: |
| case ARM::BI__builtin_arm_mve_vldrbq_gather_offset_s8: |
| case ARM::BI__builtin_arm_mve_vldrbq_gather_offset_u16: |
| case ARM::BI__builtin_arm_mve_vldrbq_gather_offset_u32: |
| case ARM::BI__builtin_arm_mve_vldrbq_gather_offset_u8: |
| case ARM::BI__builtin_arm_mve_vldrdq_gather_offset_s64: |
| case ARM::BI__builtin_arm_mve_vldrdq_gather_offset_u64: |
| case ARM::BI__builtin_arm_mve_vldrdq_gather_shifted_offset_s64: |
| case ARM::BI__builtin_arm_mve_vldrdq_gather_shifted_offset_u64: |
| case ARM::BI__builtin_arm_mve_vldrhq_gather_offset_f16: |
| case ARM::BI__builtin_arm_mve_vldrhq_gather_offset_s16: |
| case ARM::BI__builtin_arm_mve_vldrhq_gather_offset_s32: |
| case ARM::BI__builtin_arm_mve_vldrhq_gather_offset_u16: |
| case ARM::BI__builtin_arm_mve_vldrhq_gather_offset_u32: |
| case ARM::BI__builtin_arm_mve_vldrhq_gather_shifted_offset_f16: |
| case ARM::BI__builtin_arm_mve_vldrhq_gather_shifted_offset_s16: |
| case ARM::BI__builtin_arm_mve_vldrhq_gather_shifted_offset_s32: |
| case ARM::BI__builtin_arm_mve_vldrhq_gather_shifted_offset_u16: |
| case ARM::BI__builtin_arm_mve_vldrhq_gather_shifted_offset_u32: |
| case ARM::BI__builtin_arm_mve_vldrwq_gather_offset_f32: |
| case ARM::BI__builtin_arm_mve_vldrwq_gather_offset_s32: |
| case ARM::BI__builtin_arm_mve_vldrwq_gather_offset_u32: |
| case ARM::BI__builtin_arm_mve_vldrwq_gather_shifted_offset_f32: |
| case ARM::BI__builtin_arm_mve_vldrwq_gather_shifted_offset_s32: |
| case ARM::BI__builtin_arm_mve_vldrwq_gather_shifted_offset_u32: { |
| uint32_t Param0; |
| uint32_t Param1; |
| uint32_t Param2; |
| llvm::Type * Param3; |
| llvm::Type * Param4; |
| llvm::Type * Param5; |
| switch (BuiltinID) { |
| case ARM::BI__builtin_arm_mve_vldrbq_gather_offset_s16: |
| Param0 = 8; |
| Param1 = 0; |
| Param2 = 0; |
| Param3 = llvm::FixedVectorType::get(Int16Ty, 8); |
| Param4 = llvm::PointerType::getUnqual(Int8Ty); |
| Param5 = llvm::FixedVectorType::get(Int16Ty, 8); |
| break; |
| case ARM::BI__builtin_arm_mve_vldrbq_gather_offset_s32: |
| Param0 = 8; |
| Param1 = 0; |
| Param2 = 0; |
| Param3 = llvm::FixedVectorType::get(Int32Ty, 4); |
| Param4 = llvm::PointerType::getUnqual(Int8Ty); |
| Param5 = llvm::FixedVectorType::get(Int32Ty, 4); |
| break; |
| case ARM::BI__builtin_arm_mve_vldrbq_gather_offset_s8: |
| Param0 = 8; |
| Param1 = 0; |
| Param2 = 0; |
| Param3 = llvm::FixedVectorType::get(Int8Ty, 16); |
| Param4 = llvm::PointerType::getUnqual(Int8Ty); |
| Param5 = llvm::FixedVectorType::get(Int8Ty, 16); |
| break; |
| case ARM::BI__builtin_arm_mve_vldrbq_gather_offset_u16: |
| Param0 = 8; |
| Param1 = 0; |
| Param2 = 1; |
| Param3 = llvm::FixedVectorType::get(Int16Ty, 8); |
| Param4 = llvm::PointerType::getUnqual(Int8Ty); |
| Param5 = llvm::FixedVectorType::get(Int16Ty, 8); |
| break; |
| case ARM::BI__builtin_arm_mve_vldrbq_gather_offset_u32: |
| Param0 = 8; |
| Param1 = 0; |
| Param2 = 1; |
| Param3 = llvm::FixedVectorType::get(Int32Ty, 4); |
| Param4 = llvm::PointerType::getUnqual(Int8Ty); |
| Param5 = llvm::FixedVectorType::get(Int32Ty, 4); |
| break; |
| case ARM::BI__builtin_arm_mve_vldrbq_gather_offset_u8: |
| Param0 = 8; |
| Param1 = 0; |
| Param2 = 1; |
| Param3 = llvm::FixedVectorType::get(Int8Ty, 16); |
| Param4 = llvm::PointerType::getUnqual(Int8Ty); |
| Param5 = llvm::FixedVectorType::get(Int8Ty, 16); |
| break; |
| case ARM::BI__builtin_arm_mve_vldrdq_gather_offset_s64: |
| Param0 = 64; |
| Param1 = 0; |
| Param2 = 0; |
| Param3 = llvm::FixedVectorType::get(Int64Ty, 2); |
| Param4 = llvm::PointerType::getUnqual(Int64Ty); |
| Param5 = llvm::FixedVectorType::get(Int64Ty, 2); |
| break; |
| case ARM::BI__builtin_arm_mve_vldrdq_gather_offset_u64: |
| Param0 = 64; |
| Param1 = 0; |
| Param2 = 1; |
| Param3 = llvm::FixedVectorType::get(Int64Ty, 2); |
| Param4 = llvm::PointerType::getUnqual(Int64Ty); |
| Param5 = llvm::FixedVectorType::get(Int64Ty, 2); |
| break; |
| case ARM::BI__builtin_arm_mve_vldrdq_gather_shifted_offset_s64: |
| Param0 = 64; |
| Param1 = 3; |
| Param2 = 0; |
| Param3 = llvm::FixedVectorType::get(Int64Ty, 2); |
| Param4 = llvm::PointerType::getUnqual(Int64Ty); |
| Param5 = llvm::FixedVectorType::get(Int64Ty, 2); |
| break; |
| case ARM::BI__builtin_arm_mve_vldrdq_gather_shifted_offset_u64: |
| Param0 = 64; |
| Param1 = 3; |
| Param2 = 1; |
| Param3 = llvm::FixedVectorType::get(Int64Ty, 2); |
| Param4 = llvm::PointerType::getUnqual(Int64Ty); |
| Param5 = llvm::FixedVectorType::get(Int64Ty, 2); |
| break; |
| case ARM::BI__builtin_arm_mve_vldrhq_gather_offset_f16: |
| Param0 = 16; |
| Param1 = 0; |
| Param2 = 0; |
| Param3 = llvm::FixedVectorType::get(HalfTy, 8); |
| Param4 = llvm::PointerType::getUnqual(HalfTy); |
| Param5 = llvm::FixedVectorType::get(Int16Ty, 8); |
| break; |
| case ARM::BI__builtin_arm_mve_vldrhq_gather_offset_s16: |
| Param0 = 16; |
| Param1 = 0; |
| Param2 = 0; |
| Param3 = llvm::FixedVectorType::get(Int16Ty, 8); |
| Param4 = llvm::PointerType::getUnqual(Int16Ty); |
| Param5 = llvm::FixedVectorType::get(Int16Ty, 8); |
| break; |
| case ARM::BI__builtin_arm_mve_vldrhq_gather_offset_s32: |
| Param0 = 16; |
| Param1 = 0; |
| Param2 = 0; |
| Param3 = llvm::FixedVectorType::get(Int32Ty, 4); |
| Param4 = llvm::PointerType::getUnqual(Int16Ty); |
| Param5 = llvm::FixedVectorType::get(Int32Ty, 4); |
| break; |
| case ARM::BI__builtin_arm_mve_vldrhq_gather_offset_u16: |
| Param0 = 16; |
| Param1 = 0; |
| Param2 = 1; |
| Param3 = llvm::FixedVectorType::get(Int16Ty, 8); |
| Param4 = llvm::PointerType::getUnqual(Int16Ty); |
| Param5 = llvm::FixedVectorType::get(Int16Ty, 8); |
| break; |
| case ARM::BI__builtin_arm_mve_vldrhq_gather_offset_u32: |
| Param0 = 16; |
| Param1 = 0; |
| Param2 = 1; |
| Param3 = llvm::FixedVectorType::get(Int32Ty, 4); |
| Param4 = llvm::PointerType::getUnqual(Int16Ty); |
| Param5 = llvm::FixedVectorType::get(Int32Ty, 4); |
| break; |
| case ARM::BI__builtin_arm_mve_vldrhq_gather_shifted_offset_f16: |
| Param0 = 16; |
| Param1 = 1; |
| Param2 = 0; |
| Param3 = llvm::FixedVectorType::get(HalfTy, 8); |
| Param4 = llvm::PointerType::getUnqual(HalfTy); |
| Param5 = llvm::FixedVectorType::get(Int16Ty, 8); |
| break; |
| case ARM::BI__builtin_arm_mve_vldrhq_gather_shifted_offset_s16: |
| Param0 = 16; |
| Param1 = 1; |
| Param2 = 0; |
| Param3 = llvm::FixedVectorType::get(Int16Ty, 8); |
| Param4 = llvm::PointerType::getUnqual(Int16Ty); |
| Param5 = llvm::FixedVectorType::get(Int16Ty, 8); |
| break; |
| case ARM::BI__builtin_arm_mve_vldrhq_gather_shifted_offset_s32: |
| Param0 = 16; |
| Param1 = 1; |
| Param2 = 0; |
| Param3 = llvm::FixedVectorType::get(Int32Ty, 4); |
| Param4 = llvm::PointerType::getUnqual(Int16Ty); |
| Param5 = llvm::FixedVectorType::get(Int32Ty, 4); |
| break; |
| case ARM::BI__builtin_arm_mve_vldrhq_gather_shifted_offset_u16: |
| Param0 = 16; |
| Param1 = 1; |
| Param2 = 1; |
| Param3 = llvm::FixedVectorType::get(Int16Ty, 8); |
| Param4 = llvm::PointerType::getUnqual(Int16Ty); |
| Param5 = llvm::FixedVectorType::get(Int16Ty, 8); |
| break; |
| case ARM::BI__builtin_arm_mve_vldrhq_gather_shifted_offset_u32: |
| Param0 = 16; |
| Param1 = 1; |
| Param2 = 1; |
| Param3 = llvm::FixedVectorType::get(Int32Ty, 4); |
| Param4 = llvm::PointerType::getUnqual(Int16Ty); |
| Param5 = llvm::FixedVectorType::get(Int32Ty, 4); |
| break; |
| case ARM::BI__builtin_arm_mve_vldrwq_gather_offset_f32: |
| Param0 = 32; |
| Param1 = 0; |
| Param2 = 0; |
| Param3 = llvm::FixedVectorType::get(FloatTy, 4); |
| Param4 = llvm::PointerType::getUnqual(FloatTy); |
| Param5 = llvm::FixedVectorType::get(Int32Ty, 4); |
| break; |
| case ARM::BI__builtin_arm_mve_vldrwq_gather_offset_s32: |
| Param0 = 32; |
| Param1 = 0; |
| Param2 = 0; |
| Param3 = llvm::FixedVectorType::get(Int32Ty, 4); |
| Param4 = llvm::PointerType::getUnqual(Int32Ty); |
| Param5 = llvm::FixedVectorType::get(Int32Ty, 4); |
| break; |
| case ARM::BI__builtin_arm_mve_vldrwq_gather_offset_u32: |
| Param0 = 32; |
| Param1 = 0; |
| Param2 = 1; |
| Param3 = llvm::FixedVectorType::get(Int32Ty, 4); |
| Param4 = llvm::PointerType::getUnqual(Int32Ty); |
| Param5 = llvm::FixedVectorType::get(Int32Ty, 4); |
| break; |
| case ARM::BI__builtin_arm_mve_vldrwq_gather_shifted_offset_f32: |
| Param0 = 32; |
| Param1 = 2; |
| Param2 = 0; |
| Param3 = llvm::FixedVectorType::get(FloatTy, 4); |
| Param4 = llvm::PointerType::getUnqual(FloatTy); |
| Param5 = llvm::FixedVectorType::get(Int32Ty, 4); |
| break; |
| case ARM::BI__builtin_arm_mve_vldrwq_gather_shifted_offset_s32: |
| Param0 = 32; |
| Param1 = 2; |
| Param2 = 0; |
| Param3 = llvm::FixedVectorType::get(Int32Ty, 4); |
| Param4 = llvm::PointerType::getUnqual(Int32Ty); |
| Param5 = llvm::FixedVectorType::get(Int32Ty, 4); |
| break; |
| case ARM::BI__builtin_arm_mve_vldrwq_gather_shifted_offset_u32: |
| Param0 = 32; |
| Param1 = 2; |
| Param2 = 1; |
| Param3 = llvm::FixedVectorType::get(Int32Ty, 4); |
| Param4 = llvm::PointerType::getUnqual(Int32Ty); |
| Param5 = llvm::FixedVectorType::get(Int32Ty, 4); |
| break; |
| } |
| Address Val0 = EmitPointerWithAlignment(E->getArg(0)); |
| Value *Val1 = EmitScalarExpr(E->getArg(1)); |
| Value *Val2 = llvm::ConstantInt::get(Int32Ty, Param0); |
| Value *Val3 = llvm::ConstantInt::get(Int32Ty, Param1); |
| Value *Val4 = llvm::ConstantInt::get(Int32Ty, Param2); |
| return Builder.CreateCall(CGM.getIntrinsic(Intrinsic::arm_mve_vldr_gather_offset, {Param3, Param4, Param5}), {(Val0.getPointer()), Val1, Val2, Val3, Val4}); |
| } |
| case ARM::BI__builtin_arm_mve_vshlcq_s16: |
| case ARM::BI__builtin_arm_mve_vshlcq_s32: |
| case ARM::BI__builtin_arm_mve_vshlcq_s8: |
| case ARM::BI__builtin_arm_mve_vshlcq_u16: |
| case ARM::BI__builtin_arm_mve_vshlcq_u32: |
| case ARM::BI__builtin_arm_mve_vshlcq_u8: { |
| llvm::Type * Param0; |
| switch (BuiltinID) { |
| case ARM::BI__builtin_arm_mve_vshlcq_s16: |
| Param0 = llvm::FixedVectorType::get(Int16Ty, 8); |
| break; |
| case ARM::BI__builtin_arm_mve_vshlcq_s32: |
| Param0 = llvm::FixedVectorType::get(Int32Ty, 4); |
| break; |
| case ARM::BI__builtin_arm_mve_vshlcq_s8: |
| Param0 = llvm::FixedVectorType::get(Int8Ty, 16); |
| break; |
| case ARM::BI__builtin_arm_mve_vshlcq_u16: |
| Param0 = llvm::FixedVectorType::get(Int16Ty, 8); |
| break; |
| case ARM::BI__builtin_arm_mve_vshlcq_u32: |
| Param0 = llvm::FixedVectorType::get(Int32Ty, 4); |
| break; |
| case ARM::BI__builtin_arm_mve_vshlcq_u8: |
| Param0 = llvm::FixedVectorType::get(Int8Ty, 16); |
| break; |
| } |
| Address Val0 = EmitPointerWithAlignment(E->getArg(1)); |
| Value *Val1 = Builder.CreateLoad(Val0); |
| Value *Val2 = EmitScalarExpr(E->getArg(0)); |
| Value *Val3 = EmitScalarExpr(E->getArg(2)); |
| Value *Val4 = Builder.CreateCall(CGM.getIntrinsic(Intrinsic::arm_mve_vshlc, {Param0}), {Val2, Val1, Val3}); |
| Value *Val5 = Builder.CreateExtractValue(Val4, static_cast<unsigned>(0)); |
| Builder.CreateStore(Val5, Val0); |
| return Builder.CreateExtractValue(Val4, static_cast<unsigned>(1)); |
| } |
| case ARM::BI__builtin_arm_mve_vddupq_m_wb_u16: |
| case ARM::BI__builtin_arm_mve_vddupq_m_wb_u32: |
| case ARM::BI__builtin_arm_mve_vddupq_m_wb_u8: |
| case ARM::BI__builtin_arm_mve_vidupq_m_wb_u16: |
| case ARM::BI__builtin_arm_mve_vidupq_m_wb_u32: |
| case ARM::BI__builtin_arm_mve_vidupq_m_wb_u8: |
| case ARM::BI__builtin_arm_mve_vshlcq_m_s16: |
| case ARM::BI__builtin_arm_mve_vshlcq_m_s32: |
| case ARM::BI__builtin_arm_mve_vshlcq_m_s8: |
| case ARM::BI__builtin_arm_mve_vshlcq_m_u16: |
| case ARM::BI__builtin_arm_mve_vshlcq_m_u32: |
| case ARM::BI__builtin_arm_mve_vshlcq_m_u8: { |
| llvm::Type * Param0; |
| Intrinsic::ID Param1; |
| llvm::Type * Param2; |
| unsigned Param3; |
| unsigned Param4; |
| switch (BuiltinID) { |
| case ARM::BI__builtin_arm_mve_vddupq_m_wb_u16: |
| Param0 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 8); |
| Param1 = Intrinsic::arm_mve_vddup_predicated; |
| Param2 = llvm::FixedVectorType::get(Int16Ty, 8); |
| Param3 = 1; |
| Param4 = 0; |
| break; |
| case ARM::BI__builtin_arm_mve_vddupq_m_wb_u32: |
| Param0 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 4); |
| Param1 = Intrinsic::arm_mve_vddup_predicated; |
| Param2 = llvm::FixedVectorType::get(Int32Ty, 4); |
| Param3 = 1; |
| Param4 = 0; |
| break; |
| case ARM::BI__builtin_arm_mve_vddupq_m_wb_u8: |
| Param0 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 16); |
| Param1 = Intrinsic::arm_mve_vddup_predicated; |
| Param2 = llvm::FixedVectorType::get(Int8Ty, 16); |
| Param3 = 1; |
| Param4 = 0; |
| break; |
| case ARM::BI__builtin_arm_mve_vidupq_m_wb_u16: |
| Param0 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 8); |
| Param1 = Intrinsic::arm_mve_vidup_predicated; |
| Param2 = llvm::FixedVectorType::get(Int16Ty, 8); |
| Param3 = 1; |
| Param4 = 0; |
| break; |
| case ARM::BI__builtin_arm_mve_vidupq_m_wb_u32: |
| Param0 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 4); |
| Param1 = Intrinsic::arm_mve_vidup_predicated; |
| Param2 = llvm::FixedVectorType::get(Int32Ty, 4); |
| Param3 = 1; |
| Param4 = 0; |
| break; |
| case ARM::BI__builtin_arm_mve_vidupq_m_wb_u8: |
| Param0 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 16); |
| Param1 = Intrinsic::arm_mve_vidup_predicated; |
| Param2 = llvm::FixedVectorType::get(Int8Ty, 16); |
| Param3 = 1; |
| Param4 = 0; |
| break; |
| case ARM::BI__builtin_arm_mve_vshlcq_m_s16: |
| Param0 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 8); |
| Param1 = Intrinsic::arm_mve_vshlc_predicated; |
| Param2 = llvm::FixedVectorType::get(Int16Ty, 8); |
| Param3 = 0; |
| Param4 = 1; |
| break; |
| case ARM::BI__builtin_arm_mve_vshlcq_m_s32: |
| Param0 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 4); |
| Param1 = Intrinsic::arm_mve_vshlc_predicated; |
| Param2 = llvm::FixedVectorType::get(Int32Ty, 4); |
| Param3 = 0; |
| Param4 = 1; |
| break; |
| case ARM::BI__builtin_arm_mve_vshlcq_m_s8: |
| Param0 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 16); |
| Param1 = Intrinsic::arm_mve_vshlc_predicated; |
| Param2 = llvm::FixedVectorType::get(Int8Ty, 16); |
| Param3 = 0; |
| Param4 = 1; |
| break; |
| case ARM::BI__builtin_arm_mve_vshlcq_m_u16: |
| Param0 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 8); |
| Param1 = Intrinsic::arm_mve_vshlc_predicated; |
| Param2 = llvm::FixedVectorType::get(Int16Ty, 8); |
| Param3 = 0; |
| Param4 = 1; |
| break; |
| case ARM::BI__builtin_arm_mve_vshlcq_m_u32: |
| Param0 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 4); |
| Param1 = Intrinsic::arm_mve_vshlc_predicated; |
| Param2 = llvm::FixedVectorType::get(Int32Ty, 4); |
| Param3 = 0; |
| Param4 = 1; |
| break; |
| case ARM::BI__builtin_arm_mve_vshlcq_m_u8: |
| Param0 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 16); |
| Param1 = Intrinsic::arm_mve_vshlc_predicated; |
| Param2 = llvm::FixedVectorType::get(Int8Ty, 16); |
| Param3 = 0; |
| Param4 = 1; |
| break; |
| } |
| Address Val0 = EmitPointerWithAlignment(E->getArg(1)); |
| Value *Val1 = Builder.CreateLoad(Val0); |
| Value *Val2 = EmitScalarExpr(E->getArg(0)); |
| Value *Val3 = EmitScalarExpr(E->getArg(2)); |
| Value *Val4 = EmitScalarExpr(E->getArg(3)); |
| Value *Val5 = Builder.CreateIntCast(Val4, Int32Ty, false); |
| Value *Val6 = Builder.CreateCall(CGM.getIntrinsic(Intrinsic::arm_mve_pred_i2v, {Param0}), {Val5}); |
| Value *Val7 = Builder.CreateCall(CGM.getIntrinsic(Param1, {Param2, Param0}), {Val2, Val1, Val3, Val6}); |
| Value *Val8 = Builder.CreateExtractValue(Val7, static_cast<unsigned>(Param3)); |
| Builder.CreateStore(Val8, Val0); |
| return Builder.CreateExtractValue(Val7, static_cast<unsigned>(Param4)); |
| } |
| case ARM::BI__builtin_arm_mve_vdwdupq_m_wb_u16: |
| case ARM::BI__builtin_arm_mve_vdwdupq_m_wb_u32: |
| case ARM::BI__builtin_arm_mve_vdwdupq_m_wb_u8: |
| case ARM::BI__builtin_arm_mve_viwdupq_m_wb_u16: |
| case ARM::BI__builtin_arm_mve_viwdupq_m_wb_u32: |
| case ARM::BI__builtin_arm_mve_viwdupq_m_wb_u8: { |
| llvm::Type * Param0; |
| Intrinsic::ID Param1; |
| llvm::Type * Param2; |
| switch (BuiltinID) { |
| case ARM::BI__builtin_arm_mve_vdwdupq_m_wb_u16: |
| Param0 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 8); |
| Param1 = Intrinsic::arm_mve_vdwdup_predicated; |
| Param2 = llvm::FixedVectorType::get(Int16Ty, 8); |
| break; |
| case ARM::BI__builtin_arm_mve_vdwdupq_m_wb_u32: |
| Param0 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 4); |
| Param1 = Intrinsic::arm_mve_vdwdup_predicated; |
| Param2 = llvm::FixedVectorType::get(Int32Ty, 4); |
| break; |
| case ARM::BI__builtin_arm_mve_vdwdupq_m_wb_u8: |
| Param0 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 16); |
| Param1 = Intrinsic::arm_mve_vdwdup_predicated; |
| Param2 = llvm::FixedVectorType::get(Int8Ty, 16); |
| break; |
| case ARM::BI__builtin_arm_mve_viwdupq_m_wb_u16: |
| Param0 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 8); |
| Param1 = Intrinsic::arm_mve_viwdup_predicated; |
| Param2 = llvm::FixedVectorType::get(Int16Ty, 8); |
| break; |
| case ARM::BI__builtin_arm_mve_viwdupq_m_wb_u32: |
| Param0 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 4); |
| Param1 = Intrinsic::arm_mve_viwdup_predicated; |
| Param2 = llvm::FixedVectorType::get(Int32Ty, 4); |
| break; |
| case ARM::BI__builtin_arm_mve_viwdupq_m_wb_u8: |
| Param0 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 16); |
| Param1 = Intrinsic::arm_mve_viwdup_predicated; |
| Param2 = llvm::FixedVectorType::get(Int8Ty, 16); |
| break; |
| } |
| Address Val0 = EmitPointerWithAlignment(E->getArg(1)); |
| Value *Val1 = Builder.CreateLoad(Val0); |
| Value *Val2 = EmitScalarExpr(E->getArg(0)); |
| Value *Val3 = EmitScalarExpr(E->getArg(2)); |
| Value *Val4 = EmitScalarExpr(E->getArg(3)); |
| Value *Val5 = EmitScalarExpr(E->getArg(4)); |
| Value *Val6 = Builder.CreateIntCast(Val5, Int32Ty, false); |
| Value *Val7 = Builder.CreateCall(CGM.getIntrinsic(Intrinsic::arm_mve_pred_i2v, {Param0}), {Val6}); |
| Value *Val8 = Builder.CreateCall(CGM.getIntrinsic(Param1, {Param2, Param0}), {Val2, Val1, Val3, Val4, Val7}); |
| Value *Val9 = Builder.CreateExtractValue(Val8, static_cast<unsigned>(1)); |
| Builder.CreateStore(Val9, Val0); |
| return Builder.CreateExtractValue(Val8, static_cast<unsigned>(0)); |
| } |
| case ARM::BI__builtin_arm_mve_vld2q_f16: |
| case ARM::BI__builtin_arm_mve_vld2q_f32: |
| case ARM::BI__builtin_arm_mve_vld2q_s16: |
| case ARM::BI__builtin_arm_mve_vld2q_s32: |
| case ARM::BI__builtin_arm_mve_vld2q_s8: |
| case ARM::BI__builtin_arm_mve_vld2q_u16: |
| case ARM::BI__builtin_arm_mve_vld2q_u32: |
| case ARM::BI__builtin_arm_mve_vld2q_u8: { |
| CustomCodeGenType = CustomCodeGen::VLD24; |
| IRIntr = Intrinsic::arm_mve_vld2q; |
| NumVectors = 2; |
| break; // custom code gen |
| } |
| case ARM::BI__builtin_arm_mve_vld4q_f16: |
| case ARM::BI__builtin_arm_mve_vld4q_f32: |
| case ARM::BI__builtin_arm_mve_vld4q_s16: |
| case ARM::BI__builtin_arm_mve_vld4q_s32: |
| case ARM::BI__builtin_arm_mve_vld4q_s8: |
| case ARM::BI__builtin_arm_mve_vld4q_u16: |
| case ARM::BI__builtin_arm_mve_vld4q_u32: |
| case ARM::BI__builtin_arm_mve_vld4q_u8: { |
| CustomCodeGenType = CustomCodeGen::VLD24; |
| IRIntr = Intrinsic::arm_mve_vld4q; |
| NumVectors = 4; |
| break; // custom code gen |
| } |
| case ARM::BI__builtin_arm_mve_vst2q_f16: |
| case ARM::BI__builtin_arm_mve_vst2q_f32: |
| case ARM::BI__builtin_arm_mve_vst2q_s16: |
| case ARM::BI__builtin_arm_mve_vst2q_s32: |
| case ARM::BI__builtin_arm_mve_vst2q_s8: |
| case ARM::BI__builtin_arm_mve_vst2q_u16: |
| case ARM::BI__builtin_arm_mve_vst2q_u32: |
| case ARM::BI__builtin_arm_mve_vst2q_u8: { |
| CustomCodeGenType = CustomCodeGen::VST24; |
| IRIntr = Intrinsic::arm_mve_vst2q; |
| NumVectors = 2; |
| break; // custom code gen |
| } |
| case ARM::BI__builtin_arm_mve_vst4q_f16: |
| case ARM::BI__builtin_arm_mve_vst4q_f32: |
| case ARM::BI__builtin_arm_mve_vst4q_s16: |
| case ARM::BI__builtin_arm_mve_vst4q_s32: |
| case ARM::BI__builtin_arm_mve_vst4q_s8: |
| case ARM::BI__builtin_arm_mve_vst4q_u16: |
| case ARM::BI__builtin_arm_mve_vst4q_u32: |
| case ARM::BI__builtin_arm_mve_vst4q_u8: { |
| CustomCodeGenType = CustomCodeGen::VST24; |
| IRIntr = Intrinsic::arm_mve_vst4q; |
| NumVectors = 4; |
| break; // custom code gen |
| } |
| case ARM::BI__builtin_arm_mve_vmaxnmaq_f16: |
| case ARM::BI__builtin_arm_mve_vmaxnmaq_f32: |
| case ARM::BI__builtin_arm_mve_vminnmaq_f16: |
| case ARM::BI__builtin_arm_mve_vminnmaq_f32: { |
| llvm::Type * Param0; |
| Intrinsic::ID Param1; |
| switch (BuiltinID) { |
| case ARM::BI__builtin_arm_mve_vmaxnmaq_f16: |
| Param0 = llvm::FixedVectorType::get(HalfTy, 8); |
| Param1 = Intrinsic::maxnum; |
| break; |
| case ARM::BI__builtin_arm_mve_vmaxnmaq_f32: |
| Param0 = llvm::FixedVectorType::get(FloatTy, 4); |
| Param1 = Intrinsic::maxnum; |
| break; |
| case ARM::BI__builtin_arm_mve_vminnmaq_f16: |
| Param0 = llvm::FixedVectorType::get(HalfTy, 8); |
| Param1 = Intrinsic::minnum; |
| break; |
| case ARM::BI__builtin_arm_mve_vminnmaq_f32: |
| Param0 = llvm::FixedVectorType::get(FloatTy, 4); |
| Param1 = Intrinsic::minnum; |
| break; |
| } |
| Value *Val0 = EmitScalarExpr(E->getArg(0)); |
| Value *Val1 = Builder.CreateCall(CGM.getIntrinsic(Intrinsic::fabs, {Param0}), {Val0}); |
| Value *Val2 = EmitScalarExpr(E->getArg(1)); |
| Value *Val3 = Builder.CreateCall(CGM.getIntrinsic(Intrinsic::fabs, {Param0}), {Val2}); |
| return Builder.CreateCall(CGM.getIntrinsic(Param1, {Param0}), {Val1, Val3}); |
| } |
| case ARM::BI__builtin_arm_mve_vctp16q: |
| case ARM::BI__builtin_arm_mve_vctp32q: |
| case ARM::BI__builtin_arm_mve_vctp64q: |
| case ARM::BI__builtin_arm_mve_vctp8q: { |
| Intrinsic::ID Param0; |
| llvm::Type * Param1; |
| switch (BuiltinID) { |
| case ARM::BI__builtin_arm_mve_vctp16q: |
| Param0 = Intrinsic::arm_mve_vctp16; |
| Param1 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 8); |
| break; |
| case ARM::BI__builtin_arm_mve_vctp32q: |
| Param0 = Intrinsic::arm_mve_vctp32; |
| Param1 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 4); |
| break; |
| case ARM::BI__builtin_arm_mve_vctp64q: |
| Param0 = Intrinsic::arm_mve_vctp64; |
| Param1 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 4); |
| break; |
| case ARM::BI__builtin_arm_mve_vctp8q: |
| Param0 = Intrinsic::arm_mve_vctp8; |
| Param1 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 16); |
| break; |
| } |
| Value *Val0 = EmitScalarExpr(E->getArg(0)); |
| Value *Val1 = Builder.CreateCall(CGM.getIntrinsic(Param0), {Val0}); |
| Value *Val2 = Builder.CreateCall(CGM.getIntrinsic(Intrinsic::arm_mve_pred_v2i, {Param1}), {Val1}); |
| return Builder.CreateIntCast(Val2, Int16Ty, false); |
| } |
| case ARM::BI__builtin_arm_mve_vmvnq_n_s32: |
| case ARM::BI__builtin_arm_mve_vmvnq_n_u32: { |
| bool Param0; |
| switch (BuiltinID) { |
| case ARM::BI__builtin_arm_mve_vmvnq_n_s32: |
| Param0 = true; |
| break; |
| case ARM::BI__builtin_arm_mve_vmvnq_n_u32: |
| Param0 = false; |
| break; |
| } |
| Value *Val0 = EmitScalarExpr(E->getArg(0)); |
| Value *Val1 = Builder.CreateIntCast(Val0, Int32Ty, Param0); |
| Value *Val2 = ARMMVEVectorSplat(Builder, Val1); |
| return Builder.CreateNot(Val2); |
| } |
| case ARM::BI__builtin_arm_mve_vmvnq_n_s16: |
| case ARM::BI__builtin_arm_mve_vmvnq_n_u16: { |
| bool Param0; |
| switch (BuiltinID) { |
| case ARM::BI__builtin_arm_mve_vmvnq_n_s16: |
| Param0 = true; |
| break; |
| case ARM::BI__builtin_arm_mve_vmvnq_n_u16: |
| Param0 = false; |
| break; |
| } |
| Value *Val0 = EmitScalarExpr(E->getArg(0)); |
| Value *Val1 = Builder.CreateIntCast(Val0, Int32Ty, false); |
| Value *Val2 = Builder.CreateIntCast(Val1, Int16Ty, Param0); |
| Value *Val3 = ARMMVEVectorSplat(Builder, Val2); |
| return Builder.CreateNot(Val3); |
| } |
| case ARM::BI__builtin_arm_mve_vmaxavq_s16: |
| case ARM::BI__builtin_arm_mve_vmaxavq_s8: |
| case ARM::BI__builtin_arm_mve_vminavq_s16: |
| case ARM::BI__builtin_arm_mve_vminavq_s8: { |
| Intrinsic::ID Param0; |
| llvm::Type * Param1; |
| llvm::Type * Param2; |
| switch (BuiltinID) { |
| case ARM::BI__builtin_arm_mve_vmaxavq_s16: |
| Param0 = Intrinsic::arm_mve_maxav; |
| Param1 = llvm::FixedVectorType::get(Int16Ty, 8); |
| Param2 = Int16Ty; |
| break; |
| case ARM::BI__builtin_arm_mve_vmaxavq_s8: |
| Param0 = Intrinsic::arm_mve_maxav; |
| Param1 = llvm::FixedVectorType::get(Int8Ty, 16); |
| Param2 = Int8Ty; |
| break; |
| case ARM::BI__builtin_arm_mve_vminavq_s16: |
| Param0 = Intrinsic::arm_mve_minav; |
| Param1 = llvm::FixedVectorType::get(Int16Ty, 8); |
| Param2 = Int16Ty; |
| break; |
| case ARM::BI__builtin_arm_mve_vminavq_s8: |
| Param0 = Intrinsic::arm_mve_minav; |
| Param1 = llvm::FixedVectorType::get(Int8Ty, 16); |
| Param2 = Int8Ty; |
| break; |
| } |
| Value *Val0 = EmitScalarExpr(E->getArg(0)); |
| Value *Val1 = Builder.CreateIntCast(Val0, Int32Ty, false); |
| Value *Val2 = EmitScalarExpr(E->getArg(1)); |
| Value *Val3 = Builder.CreateCall(CGM.getIntrinsic(Param0, {Param1}), {Val1, Val2}); |
| return Builder.CreateIntCast(Val3, Param2, false); |
| } |
| case ARM::BI__builtin_arm_mve_vmaxavq_p_s16: |
| case ARM::BI__builtin_arm_mve_vmaxavq_p_s8: |
| case ARM::BI__builtin_arm_mve_vminavq_p_s16: |
| case ARM::BI__builtin_arm_mve_vminavq_p_s8: { |
| llvm::Type * Param0; |
| Intrinsic::ID Param1; |
| llvm::Type * Param2; |
| llvm::Type * Param3; |
| switch (BuiltinID) { |
| case ARM::BI__builtin_arm_mve_vmaxavq_p_s16: |
| Param0 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 8); |
| Param1 = Intrinsic::arm_mve_maxav_predicated; |
| Param2 = llvm::FixedVectorType::get(Int16Ty, 8); |
| Param3 = Int16Ty; |
| break; |
| case ARM::BI__builtin_arm_mve_vmaxavq_p_s8: |
| Param0 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 16); |
| Param1 = Intrinsic::arm_mve_maxav_predicated; |
| Param2 = llvm::FixedVectorType::get(Int8Ty, 16); |
| Param3 = Int8Ty; |
| break; |
| case ARM::BI__builtin_arm_mve_vminavq_p_s16: |
| Param0 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 8); |
| Param1 = Intrinsic::arm_mve_minav_predicated; |
| Param2 = llvm::FixedVectorType::get(Int16Ty, 8); |
| Param3 = Int16Ty; |
| break; |
| case ARM::BI__builtin_arm_mve_vminavq_p_s8: |
| Param0 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 16); |
| Param1 = Intrinsic::arm_mve_minav_predicated; |
| Param2 = llvm::FixedVectorType::get(Int8Ty, 16); |
| Param3 = Int8Ty; |
| break; |
| } |
| Value *Val0 = EmitScalarExpr(E->getArg(0)); |
| Value *Val1 = Builder.CreateIntCast(Val0, Int32Ty, false); |
| Value *Val2 = EmitScalarExpr(E->getArg(1)); |
| Value *Val3 = EmitScalarExpr(E->getArg(2)); |
| Value *Val4 = Builder.CreateIntCast(Val3, Int32Ty, false); |
| Value *Val5 = Builder.CreateCall(CGM.getIntrinsic(Intrinsic::arm_mve_pred_i2v, {Param0}), {Val4}); |
| Value *Val6 = Builder.CreateCall(CGM.getIntrinsic(Param1, {Param2, Param0}), {Val1, Val2, Val5}); |
| return Builder.CreateIntCast(Val6, Param3, false); |
| } |
| case ARM::BI__builtin_arm_mve_vmaxvq_s16: |
| case ARM::BI__builtin_arm_mve_vmaxvq_s8: |
| case ARM::BI__builtin_arm_mve_vmaxvq_u16: |
| case ARM::BI__builtin_arm_mve_vmaxvq_u8: |
| case ARM::BI__builtin_arm_mve_vminvq_s16: |
| case ARM::BI__builtin_arm_mve_vminvq_s8: |
| case ARM::BI__builtin_arm_mve_vminvq_u16: |
| case ARM::BI__builtin_arm_mve_vminvq_u8: { |
| uint32_t Param0; |
| Intrinsic::ID Param1; |
| llvm::Type * Param2; |
| llvm::Type * Param3; |
| bool Param4; |
| switch (BuiltinID) { |
| case ARM::BI__builtin_arm_mve_vmaxvq_s16: |
| Param0 = 0; |
| Param1 = Intrinsic::arm_mve_maxv; |
| Param2 = llvm::FixedVectorType::get(Int16Ty, 8); |
| Param3 = Int16Ty; |
| Param4 = true; |
| break; |
| case ARM::BI__builtin_arm_mve_vmaxvq_s8: |
| Param0 = 0; |
| Param1 = Intrinsic::arm_mve_maxv; |
| Param2 = llvm::FixedVectorType::get(Int8Ty, 16); |
| Param3 = Int8Ty; |
| Param4 = true; |
| break; |
| case ARM::BI__builtin_arm_mve_vmaxvq_u16: |
| Param0 = 1; |
| Param1 = Intrinsic::arm_mve_maxv; |
| Param2 = llvm::FixedVectorType::get(Int16Ty, 8); |
| Param3 = Int16Ty; |
| Param4 = false; |
| break; |
| case ARM::BI__builtin_arm_mve_vmaxvq_u8: |
| Param0 = 1; |
| Param1 = Intrinsic::arm_mve_maxv; |
| Param2 = llvm::FixedVectorType::get(Int8Ty, 16); |
| Param3 = Int8Ty; |
| Param4 = false; |
| break; |
| case ARM::BI__builtin_arm_mve_vminvq_s16: |
| Param0 = 0; |
| Param1 = Intrinsic::arm_mve_minv; |
| Param2 = llvm::FixedVectorType::get(Int16Ty, 8); |
| Param3 = Int16Ty; |
| Param4 = true; |
| break; |
| case ARM::BI__builtin_arm_mve_vminvq_s8: |
| Param0 = 0; |
| Param1 = Intrinsic::arm_mve_minv; |
| Param2 = llvm::FixedVectorType::get(Int8Ty, 16); |
| Param3 = Int8Ty; |
| Param4 = true; |
| break; |
| case ARM::BI__builtin_arm_mve_vminvq_u16: |
| Param0 = 1; |
| Param1 = Intrinsic::arm_mve_minv; |
| Param2 = llvm::FixedVectorType::get(Int16Ty, 8); |
| Param3 = Int16Ty; |
| Param4 = false; |
| break; |
| case ARM::BI__builtin_arm_mve_vminvq_u8: |
| Param0 = 1; |
| Param1 = Intrinsic::arm_mve_minv; |
| Param2 = llvm::FixedVectorType::get(Int8Ty, 16); |
| Param3 = Int8Ty; |
| Param4 = false; |
| break; |
| } |
| Value *Val0 = EmitScalarExpr(E->getArg(0)); |
| Value *Val1 = Builder.CreateIntCast(Val0, Int32Ty, false); |
| Value *Val2 = EmitScalarExpr(E->getArg(1)); |
| Value *Val3 = llvm::ConstantInt::get(Int32Ty, Param0); |
| Value *Val4 = Builder.CreateCall(CGM.getIntrinsic(Param1, {Param2}), {Val1, Val2, Val3}); |
| return Builder.CreateIntCast(Val4, Param3, Param4); |
| } |
| case ARM::BI__builtin_arm_mve_vmaxvq_p_s16: |
| case ARM::BI__builtin_arm_mve_vmaxvq_p_s8: |
| case ARM::BI__builtin_arm_mve_vmaxvq_p_u16: |
| case ARM::BI__builtin_arm_mve_vmaxvq_p_u8: |
| case ARM::BI__builtin_arm_mve_vminvq_p_s16: |
| case ARM::BI__builtin_arm_mve_vminvq_p_s8: |
| case ARM::BI__builtin_arm_mve_vminvq_p_u16: |
| case ARM::BI__builtin_arm_mve_vminvq_p_u8: { |
| uint32_t Param0; |
| llvm::Type * Param1; |
| Intrinsic::ID Param2; |
| llvm::Type * Param3; |
| llvm::Type * Param4; |
| bool Param5; |
| switch (BuiltinID) { |
| case ARM::BI__builtin_arm_mve_vmaxvq_p_s16: |
| Param0 = 0; |
| Param1 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 8); |
| Param2 = Intrinsic::arm_mve_maxv_predicated; |
| Param3 = llvm::FixedVectorType::get(Int16Ty, 8); |
| Param4 = Int16Ty; |
| Param5 = true; |
| break; |
| case ARM::BI__builtin_arm_mve_vmaxvq_p_s8: |
| Param0 = 0; |
| Param1 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 16); |
| Param2 = Intrinsic::arm_mve_maxv_predicated; |
| Param3 = llvm::FixedVectorType::get(Int8Ty, 16); |
| Param4 = Int8Ty; |
| Param5 = true; |
| break; |
| case ARM::BI__builtin_arm_mve_vmaxvq_p_u16: |
| Param0 = 1; |
| Param1 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 8); |
| Param2 = Intrinsic::arm_mve_maxv_predicated; |
| Param3 = llvm::FixedVectorType::get(Int16Ty, 8); |
| Param4 = Int16Ty; |
| Param5 = false; |
| break; |
| case ARM::BI__builtin_arm_mve_vmaxvq_p_u8: |
| Param0 = 1; |
| Param1 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 16); |
| Param2 = Intrinsic::arm_mve_maxv_predicated; |
| Param3 = llvm::FixedVectorType::get(Int8Ty, 16); |
| Param4 = Int8Ty; |
| Param5 = false; |
| break; |
| case ARM::BI__builtin_arm_mve_vminvq_p_s16: |
| Param0 = 0; |
| Param1 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 8); |
| Param2 = Intrinsic::arm_mve_minv_predicated; |
| Param3 = llvm::FixedVectorType::get(Int16Ty, 8); |
| Param4 = Int16Ty; |
| Param5 = true; |
| break; |
| case ARM::BI__builtin_arm_mve_vminvq_p_s8: |
| Param0 = 0; |
| Param1 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 16); |
| Param2 = Intrinsic::arm_mve_minv_predicated; |
| Param3 = llvm::FixedVectorType::get(Int8Ty, 16); |
| Param4 = Int8Ty; |
| Param5 = true; |
| break; |
| case ARM::BI__builtin_arm_mve_vminvq_p_u16: |
| Param0 = 1; |
| Param1 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 8); |
| Param2 = Intrinsic::arm_mve_minv_predicated; |
| Param3 = llvm::FixedVectorType::get(Int16Ty, 8); |
| Param4 = Int16Ty; |
| Param5 = false; |
| break; |
| case ARM::BI__builtin_arm_mve_vminvq_p_u8: |
| Param0 = 1; |
| Param1 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 16); |
| Param2 = Intrinsic::arm_mve_minv_predicated; |
| Param3 = llvm::FixedVectorType::get(Int8Ty, 16); |
| Param4 = Int8Ty; |
| Param5 = false; |
| break; |
| } |
| Value *Val0 = EmitScalarExpr(E->getArg(0)); |
| Value *Val1 = Builder.CreateIntCast(Val0, Int32Ty, false); |
| Value *Val2 = EmitScalarExpr(E->getArg(1)); |
| Value *Val3 = llvm::ConstantInt::get(Int32Ty, Param0); |
| Value *Val4 = EmitScalarExpr(E->getArg(2)); |
| Value *Val5 = Builder.CreateIntCast(Val4, Int32Ty, false); |
| Value *Val6 = Builder.CreateCall(CGM.getIntrinsic(Intrinsic::arm_mve_pred_i2v, {Param1}), {Val5}); |
| Value *Val7 = Builder.CreateCall(CGM.getIntrinsic(Param2, {Param3, Param1}), {Val1, Val2, Val3, Val6}); |
| return Builder.CreateIntCast(Val7, Param4, Param5); |
| } |
| case ARM::BI__builtin_arm_mve_vadcq_s32: |
| case ARM::BI__builtin_arm_mve_vadcq_u32: |
| case ARM::BI__builtin_arm_mve_vsbcq_s32: |
| case ARM::BI__builtin_arm_mve_vsbcq_u32: { |
| Intrinsic::ID Param0; |
| switch (BuiltinID) { |
| case ARM::BI__builtin_arm_mve_vadcq_s32: |
| Param0 = Intrinsic::arm_mve_vadc; |
| break; |
| case ARM::BI__builtin_arm_mve_vadcq_u32: |
| Param0 = Intrinsic::arm_mve_vadc; |
| break; |
| case ARM::BI__builtin_arm_mve_vsbcq_s32: |
| Param0 = Intrinsic::arm_mve_vsbc; |
| break; |
| case ARM::BI__builtin_arm_mve_vsbcq_u32: |
| Param0 = Intrinsic::arm_mve_vsbc; |
| break; |
| } |
| Value *Val0 = EmitScalarExpr(E->getArg(0)); |
| Value *Val1 = EmitScalarExpr(E->getArg(1)); |
| Address Val2 = EmitPointerWithAlignment(E->getArg(2)); |
| Value *Val3 = Builder.CreateLoad(Val2); |
| Value *Val4 = llvm::ConstantInt::get(Int32Ty, 29); |
| Value *Val5 = Builder.CreateShl(Val3, Val4); |
| Value *Val6 = Builder.CreateCall(CGM.getIntrinsic(Param0, {llvm::FixedVectorType::get(Int32Ty, 4)}), {Val0, Val1, Val5}); |
| Value *Val7 = llvm::ConstantInt::get(Int32Ty, 1); |
| Value *Val8 = Builder.CreateExtractValue(Val6, static_cast<unsigned>(1)); |
| Value *Val9 = llvm::ConstantInt::get(Int32Ty, 29); |
| Value *Val10 = Builder.CreateLShr(Val8, Val9); |
| Value *Val11 = Builder.CreateAnd(Val7, Val10); |
| Builder.CreateStore(Val11, Val2); |
| return Builder.CreateExtractValue(Val6, static_cast<unsigned>(0)); |
| } |
| case ARM::BI__builtin_arm_mve_vcmpeqq_n_f16: |
| case ARM::BI__builtin_arm_mve_vcmpeqq_n_f32: { |
| llvm::Type * Param0; |
| switch (BuiltinID) { |
| case ARM::BI__builtin_arm_mve_vcmpeqq_n_f16: |
| Param0 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 8); |
| break; |
| case ARM::BI__builtin_arm_mve_vcmpeqq_n_f32: |
| Param0 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 4); |
| break; |
| } |
| Value *Val0 = EmitScalarExpr(E->getArg(0)); |
| Value *Val1 = EmitScalarExpr(E->getArg(1)); |
| Value *Val2 = ARMMVEVectorSplat(Builder, Val1); |
| Value *Val3 = Builder.CreateFCmpOEQ(Val0, Val2); |
| Value *Val4 = Builder.CreateCall(CGM.getIntrinsic(Intrinsic::arm_mve_pred_v2i, {Param0}), {Val3}); |
| return Builder.CreateIntCast(Val4, Int16Ty, false); |
| } |
| case ARM::BI__builtin_arm_mve_vcmpgeq_n_f16: |
| case ARM::BI__builtin_arm_mve_vcmpgeq_n_f32: { |
| llvm::Type * Param0; |
| switch (BuiltinID) { |
| case ARM::BI__builtin_arm_mve_vcmpgeq_n_f16: |
| Param0 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 8); |
| break; |
| case ARM::BI__builtin_arm_mve_vcmpgeq_n_f32: |
| Param0 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 4); |
| break; |
| } |
| Value *Val0 = EmitScalarExpr(E->getArg(0)); |
| Value *Val1 = EmitScalarExpr(E->getArg(1)); |
| Value *Val2 = ARMMVEVectorSplat(Builder, Val1); |
| Value *Val3 = Builder.CreateFCmpOGE(Val0, Val2); |
| Value *Val4 = Builder.CreateCall(CGM.getIntrinsic(Intrinsic::arm_mve_pred_v2i, {Param0}), {Val3}); |
| return Builder.CreateIntCast(Val4, Int16Ty, false); |
| } |
| case ARM::BI__builtin_arm_mve_vcmpgtq_n_f16: |
| case ARM::BI__builtin_arm_mve_vcmpgtq_n_f32: { |
| llvm::Type * Param0; |
| switch (BuiltinID) { |
| case ARM::BI__builtin_arm_mve_vcmpgtq_n_f16: |
| Param0 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 8); |
| break; |
| case ARM::BI__builtin_arm_mve_vcmpgtq_n_f32: |
| Param0 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 4); |
| break; |
| } |
| Value *Val0 = EmitScalarExpr(E->getArg(0)); |
| Value *Val1 = EmitScalarExpr(E->getArg(1)); |
| Value *Val2 = ARMMVEVectorSplat(Builder, Val1); |
| Value *Val3 = Builder.CreateFCmpOGT(Val0, Val2); |
| Value *Val4 = Builder.CreateCall(CGM.getIntrinsic(Intrinsic::arm_mve_pred_v2i, {Param0}), {Val3}); |
| return Builder.CreateIntCast(Val4, Int16Ty, false); |
| } |
| case ARM::BI__builtin_arm_mve_vcmpleq_n_f16: |
| case ARM::BI__builtin_arm_mve_vcmpleq_n_f32: { |
| llvm::Type * Param0; |
| switch (BuiltinID) { |
| case ARM::BI__builtin_arm_mve_vcmpleq_n_f16: |
| Param0 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 8); |
| break; |
| case ARM::BI__builtin_arm_mve_vcmpleq_n_f32: |
| Param0 = llvm::FixedVectorType::get(Builder.getInt1Ty(), 4); |
| break; |
| } |
| Value *Val0 = EmitScalarExpr(E->getArg(0)); |
| Value *Val1 = EmitScalarExpr(E->getArg(1)); |
| |