https://github.com/andykaylor created https://github.com/llvm/llvm-project/pull/213800
This change replaces some locations where the Neon builtin handling was calling LLVM intrinsics directly for FMA and sqrt operations rather than using the CIR operations. Using the CIR operations will be necessary to get the best constrained FP handling. This will still require setting the fenv attribute on these operations when needed. This change is just the first of a few preliminary changes needed to get us in a good state to add the constrained FP handling. Assisted-by: Cursor / Grok 4.5 >From d5689b83575b3e45d2d6f95142e28e3e4167869f Mon Sep 17 00:00:00 2001 From: Andy Kaylor <[email protected]> Date: Mon, 3 Aug 2026 16:42:47 -0700 Subject: [PATCH] [CIR][AArch64] Use CIR's fma and sqrt for Neon builtins This change replaces some locations where the Neon builtin handling was calling LLVM intrinsics directly for FMA and sqrt operations rather than using the CIR operations. Using the CIR operations will be necessary to get the best constrained FP handling. This will still require setting the fenv attribute on these operations when needed. This change is just the first of a few preliminary changes needed to get us in a good state to add the constrained FP handling. Assisted-by: Cursor / Grok 4.5 --- .../lib/CIR/CodeGen/CIRGenBuiltinAArch64.cpp | 72 +++++++++---------- clang/test/CodeGen/AArch64/neon/fullfp16.c | 6 +- .../AArch64/neon/fused-multiple-fullfp16.c | 28 ++++---- .../CodeGen/AArch64/neon/fused-multiply.c | 72 +++++++++---------- clang/test/CodeGen/AArch64/neon/intrinsics.c | 8 +-- 5 files changed, 93 insertions(+), 93 deletions(-) diff --git a/clang/lib/CIR/CodeGen/CIRGenBuiltinAArch64.cpp b/clang/lib/CIR/CodeGen/CIRGenBuiltinAArch64.cpp index dbc42404e11a4..df5f42e595556 100644 --- a/clang/lib/CIR/CodeGen/CIRGenBuiltinAArch64.cpp +++ b/clang/lib/CIR/CodeGen/CIRGenBuiltinAArch64.cpp @@ -84,17 +84,6 @@ findARMVectorIntrinsicInMap(ArrayRef<IntrinsicInfo> intrinsicMap, //===----------------------------------------------------------------------===// // Generic helpers //===----------------------------------------------------------------------===// -// Emit an intrinsic where all operands are of the same type as the result. -// Depending on mode, this may be a constrained floating-point intrinsic. -static mlir::Value -emitCallMaybeConstrainedBuiltin(CIRGenBuilderTy &builder, mlir::Location loc, - StringRef intrName, mlir::Type retTy, - llvm::SmallVector<mlir::Value> &ops) { - assert(!cir::MissingFeatures::emitConstrainedFPCall()); - - return builder.emitIntrinsicCallOp(loc, intrName, retTy, ops); -} - static llvm::StringRef getLLVMIntrNameNoPrefix(llvm::Intrinsic::ID intrID) { llvm::StringRef llvmIntrName = llvm::Intrinsic::getBaseName(intrID); assert(llvmIntrName.starts_with("llvm.") && "Not an LLVM intrinsic!"); @@ -980,14 +969,14 @@ static mlir::Value emitCommonNeonBuiltinExpr( case NEON::BI__builtin_neon_vfma_v: case NEON::BI__builtin_neon_vfmaq_v: { // NEON intrinsic: vfma(q)(accumulator, multiplicand1, multiplicand2) - // LLVM intrinsic: fma(multiplicand1, multiplicand2, accumulator) - // Reorder arguments to match LLVM fma signature. + // CIR fma: fma(multiplicand1, multiplicand2, accumulator) + // Reorder arguments to match fma signature. mlir::Value op0 = cgf.getBuilder().createBitcast(ops[0], ty); mlir::Value op1 = cgf.getBuilder().createBitcast(ops[1], ty); mlir::Value op2 = cgf.getBuilder().createBitcast(ops[2], ty); llvm::SmallVector<mlir::Value> fmaOps = {op1, op2, op0}; - return emitCallMaybeConstrainedBuiltin(cgf.getBuilder(), loc, "fma", ty, - fmaOps); + return emitNeonCallToOp<cir::FMAOp>(cgf.cgm, cgf.getBuilder(), {ty, ty, ty}, + fmaOps, std::nullopt, ty, loc); } case NEON::BI__builtin_neon_vld1_v: case NEON::BI__builtin_neon_vld1q_v: @@ -2706,18 +2695,21 @@ CIRGenFunction::emitAArch64BuiltinExpr(unsigned builtinID, const CallExpr *expr, return builder.createFMul(loc, ops[0], ops[1]); case NEON::BI__builtin_neon_vdivh_f16: return builder.createFDiv(loc, ops[0], ops[1]); - case NEON::BI__builtin_neon_vfmah_f16: - // NEON intrinsic puts accumulator first, unlike the LLVM fma. + case NEON::BI__builtin_neon_vfmah_f16: { + // NEON intrinsic puts accumulator first, unlike fma. std::rotate(ops.begin(), ops.begin() + 1, ops.end()); - return emitCallMaybeConstrainedBuiltin(builder, loc, "fma", - convertType(expr->getType()), ops); - break; - case NEON::BI__builtin_neon_vfmsh_f16: - // NEON intrinsic puts accumulator first, unlike the LLVM fma. + mlir::Type ty = convertType(expr->getType()); + return emitNeonCallToOp<cir::FMAOp>(cgm, builder, {ty, ty, ty}, ops, + std::nullopt, ty, loc); + } + case NEON::BI__builtin_neon_vfmsh_f16: { + // NEON intrinsic puts accumulator first, unlike fma. std::rotate(ops.begin(), ops.begin() + 1, ops.end()); ops[0] = builder.createFNeg(loc, ops[0]); - return emitCallMaybeConstrainedBuiltin(builder, loc, "fma", - convertType(expr->getType()), ops); + mlir::Type ty = convertType(expr->getType()); + return emitNeonCallToOp<cir::FMAOp>(cgm, builder, {ty, ty, ty}, ops, + std::nullopt, ty, loc); + } case NEON::BI__builtin_neon_vaddd_s64: case NEON::BI__builtin_neon_vaddd_u64: return builder.createAdd(loc, ops[0], ops[1]); @@ -2906,7 +2898,8 @@ CIRGenFunction::emitAArch64BuiltinExpr(unsigned builtinID, const CallExpr *expr, laneSource = emitNeonSplat(builder, loc, laneSource, ops[3], ty.getSize()); llvm::SmallVector<mlir::Value> fmaOps = {multiplicand, laneSource, addend}; - return emitCallMaybeConstrainedBuiltin(builder, loc, "fma", ty, fmaOps); + return emitNeonCallToOp<cir::FMAOp>(cgm, builder, {ty, ty, ty}, fmaOps, + std::nullopt, ty, loc); } case NEON::BI__builtin_neon_vfma_laneq_v: { // v1f64 fma should be mapped to Neon scalar f64 fma. @@ -2924,8 +2917,9 @@ CIRGenFunction::emitAArch64BuiltinExpr(unsigned builtinID, const CallExpr *expr, llvm::SmallVector<mlir::Value> fmaOps = {multiplicand, laneSource, addend}; return builder.createBitcast( - emitCallMaybeConstrainedBuiltin(builder, loc, "fma", cgm.doubleTy, - fmaOps), + emitNeonCallToOp<cir::FMAOp>( + cgm, builder, {cgm.doubleTy, cgm.doubleTy, cgm.doubleTy}, fmaOps, + std::nullopt, cgm.doubleTy, loc), ty); } @@ -2939,7 +2933,8 @@ CIRGenFunction::emitAArch64BuiltinExpr(unsigned builtinID, const CallExpr *expr, laneSource = emitNeonSplat(builder, loc, laneSource, ops[3], ty.getSize()); llvm::SmallVector<mlir::Value> fmaOps = {laneSource, multiplicand, addend}; - return emitCallMaybeConstrainedBuiltin(builder, loc, "fma", ty, fmaOps); + return emitNeonCallToOp<cir::FMAOp>(cgm, builder, {ty, ty, ty}, fmaOps, + std::nullopt, ty, loc); } case NEON::BI__builtin_neon_vfmaq_laneq_v: { mlir::Value addend = builder.createBitcast(ops[0], ty); @@ -2948,7 +2943,8 @@ CIRGenFunction::emitAArch64BuiltinExpr(unsigned builtinID, const CallExpr *expr, laneSource = emitNeonSplat(builder, loc, laneSource, ops[3], ty.getSize()); llvm::SmallVector<mlir::Value> fmaOps = {laneSource, multiplicand, addend}; - return emitCallMaybeConstrainedBuiltin(builder, loc, "fma", ty, fmaOps); + return emitNeonCallToOp<cir::FMAOp>(cgm, builder, {ty, ty, ty}, fmaOps, + std::nullopt, ty, loc); } case NEON::BI__builtin_neon_vfmah_lane_f16: case NEON::BI__builtin_neon_vfmas_lane_f32: @@ -2959,8 +2955,9 @@ CIRGenFunction::emitAArch64BuiltinExpr(unsigned builtinID, const CallExpr *expr, loc, ops[2], static_cast<uint64_t>(getIntValueFromConstOp(ops[3]))); llvm::SmallVector<mlir::Value> fmaOps = {ops[1], laneSource, ops[0]}; - return emitCallMaybeConstrainedBuiltin( - builder, loc, "fma", convertType(expr->getType()), fmaOps); + mlir::Type ty = convertType(expr->getType()); + return emitNeonCallToOp<cir::FMAOp>(cgm, builder, {ty, ty, ty}, fmaOps, + std::nullopt, ty, loc); } case NEON::BI__builtin_neon_vfmad_lane_f64: case NEON::BI__builtin_neon_vfmad_laneq_f64: { @@ -2970,8 +2967,9 @@ CIRGenFunction::emitAArch64BuiltinExpr(unsigned builtinID, const CallExpr *expr, loc, ops[2], static_cast<uint64_t>(getIntValueFromConstOp(ops[3]))); llvm::SmallVector<mlir::Value> fmaOps = {ops[1], laneSource, ops[0]}; - return emitCallMaybeConstrainedBuiltin(builder, loc, "fma", cgm.doubleTy, - fmaOps); + return emitNeonCallToOp<cir::FMAOp>( + cgm, builder, {cgm.doubleTy, cgm.doubleTy, cgm.doubleTy}, fmaOps, + std::nullopt, cgm.doubleTy, loc); } case NEON::BI__builtin_neon_vmull_v: { intrName = usgn ? "aarch64.neon.umull" : "aarch64.neon.smull"; @@ -3229,13 +3227,15 @@ CIRGenFunction::emitAArch64BuiltinExpr(unsigned builtinID, const CallExpr *expr, intrName = "aarch64.neon.fminnmp"; return emitNeonCall(cgm, builder, {ty, ty}, ops, intrName, ty, loc); case NEON::BI__builtin_neon_vsqrth_f16: { - auto halfTy = builder.getFp16Ty(); - return emitCallMaybeConstrainedBuiltin(builder, loc, "sqrt", {halfTy}, ops); + mlir::Type halfTy = builder.getFp16Ty(); + return emitNeonCallToOp<cir::SqrtOp>(cgm, builder, {halfTy}, ops, + std::nullopt, halfTy, loc); } case NEON::BI__builtin_neon_vsqrt_v: case NEON::BI__builtin_neon_vsqrtq_v: assert(!cir::MissingFeatures::emitConstrainedFPCall()); - return emitNeonCall(cgm, builder, {ty}, ops, "sqrt", ty, loc); + return emitNeonCallToOp<cir::SqrtOp>(cgm, builder, {ty}, ops, std::nullopt, + ty, loc); case NEON::BI__builtin_neon_vrbit_v: case NEON::BI__builtin_neon_vrbitq_v: case NEON::BI__builtin_neon_vmaxv_f16: diff --git a/clang/test/CodeGen/AArch64/neon/fullfp16.c b/clang/test/CodeGen/AArch64/neon/fullfp16.c index 5c229ff8a1736..c17518eb813de 100644 --- a/clang/test/CodeGen/AArch64/neon/fullfp16.c +++ b/clang/test/CodeGen/AArch64/neon/fullfp16.c @@ -311,7 +311,7 @@ float16_t test_vrndxh_f16(float16_t a) { //===------------------------------------------------------===// // ALL-LABEL: test_vsqrth_f16 float16_t test_vsqrth_f16(float16_t a) { -// CIR: cir.call_llvm_intrinsic "sqrt" +// CIR: cir.sqrt // LLVM-SAME: half{{.*}} [[A:%.*]]) // LLVM: [[SQR:%.*]] = call half @llvm.sqrt.f16(half [[A]]) @@ -337,7 +337,7 @@ float16_t test_vnegh_f16(float16_t a) { //===------------------------------------------------------===// // ALL-LABEL: test_vfmah_f16 float16_t test_vfmah_f16(float16_t a, float16_t b, float16_t c) { -// CIR: cir.call_llvm_intrinsic "fma" {{.*}} : (!cir.f16, !cir.f16, !cir.f16) -> !cir.f16 +// CIR: cir.fma {{.*}} : !cir.f16 // LLVM-SAME: half{{.*}} [[A:%.*]], half{{.*}} [[B:%.*]], half{{.*}} [[C:%.*]]) // LLVM: [[FMA:%.*]] = call half @llvm.fma.f16(half [[B]], half [[C]], half [[A]]) @@ -348,7 +348,7 @@ float16_t test_vfmah_f16(float16_t a, float16_t b, float16_t c) { // ALL-LABEL: test_vfmsh_f16 float16_t test_vfmsh_f16(float16_t a, float16_t b, float16_t c) { // CIR: [[SUB:%.*]] = cir.fneg %{{.*}} : !cir.f16 -// CIR: cir.call_llvm_intrinsic "fma" [[SUB]], {{.*}} : (!cir.f16, !cir.f16, !cir.f16) -> !cir.f16 +// CIR: cir.fma [[SUB]], {{.*}} : !cir.f16 // LLVM-SAME: half{{.*}} [[A:%.*]], half{{.*}} [[B:%.*]], half{{.*}} [[C:%.*]]) // LLVM: [[SUB:%.*]] = fneg half [[B]] diff --git a/clang/test/CodeGen/AArch64/neon/fused-multiple-fullfp16.c b/clang/test/CodeGen/AArch64/neon/fused-multiple-fullfp16.c index e83f528586d3b..7231a1108a94f 100644 --- a/clang/test/CodeGen/AArch64/neon/fused-multiple-fullfp16.c +++ b/clang/test/CodeGen/AArch64/neon/fused-multiple-fullfp16.c @@ -31,7 +31,7 @@ // LLVM-LABEL: @test_vfma_f16( // CIR-LABEL: @vfma_f16( float16x4_t test_vfma_f16(float16x4_t a, float16x4_t b, float16x4_t c) { -// CIR: cir.call_llvm_intrinsic "fma" %{{.*}}, %{{.*}}, %{{.*}} : (!cir.vector<4 x !cir.f16>, !cir.vector<4 x !cir.f16>, !cir.vector<4 x !cir.f16>) -> !cir.vector<4 x !cir.f16> +// CIR: cir.fma %{{.*}}, %{{.*}}, %{{.*}} : !cir.vector<4 x !cir.f16> // LLVM-SAME: <4 x half> {{.*}} [[A:%.*]], <4 x half> {{.*}} [[B:%.*]], <4 x half> {{.*}} [[C:%.*]]) {{.*}} { // LLVM: [[A_I:%.*]] = bitcast <4 x half> [[A]] to <4 x i16> @@ -51,7 +51,7 @@ float16x4_t test_vfma_f16(float16x4_t a, float16x4_t b, float16x4_t c) { // LLVM-LABEL: @test_vfmaq_f16( // CIR-LABEL: @vfmaq_f16( float16x8_t test_vfmaq_f16(float16x8_t a, float16x8_t b, float16x8_t c) { -// CIR: cir.call_llvm_intrinsic "fma" %{{.*}}, %{{.*}}, %{{.*}} : (!cir.vector<8 x !cir.f16>, !cir.vector<8 x !cir.f16>, !cir.vector<8 x !cir.f16>) -> !cir.vector<8 x !cir.f16> +// CIR: cir.fma %{{.*}}, %{{.*}}, %{{.*}} : !cir.vector<8 x !cir.f16> // LLVM-SAME: <8 x half> {{.*}} [[A:%.*]], <8 x half> {{.*}} [[B:%.*]], <8 x half> {{.*}} [[C:%.*]]) {{.*}} { // LLVM: [[A_I:%.*]] = bitcast <8 x half> [[A]] to <8 x i16> @@ -116,7 +116,7 @@ float16x8_t test_vfmsq_f16(float16x8_t a, float16x8_t b, float16x8_t c) { float16x4_t test_vfma_lane_f16(float16x4_t a, float16x4_t b, float16x4_t c) { // CIR: [[LANE:%.*]] = cir.vec.shuffle(%{{.*}}, %{{.*}} : !cir.vector<4 x !cir.f16>) [#cir.int<3> : !s32i, #cir.int<3> : !s32i, #cir.int<3> : !s32i, #cir.int<3> : !s32i] : !cir.vector<4 x !cir.f16> -// CIR: cir.call_llvm_intrinsic "fma" %{{.*}}, [[LANE]], %{{.*}} : (!cir.vector<4 x !cir.f16>, !cir.vector<4 x !cir.f16>, !cir.vector<4 x !cir.f16>) -> !cir.vector<4 x !cir.f16> +// CIR: cir.fma %{{.*}}, [[LANE]], %{{.*}} : !cir.vector<4 x !cir.f16> // LLVM-SAME: <4 x half> {{.*}} [[A:%.*]], <4 x half> {{.*}} [[B:%.*]], <4 x half> {{.*}} [[C:%.*]]) {{.*}} { // LLVM: [[A_I:%.*]] = bitcast <4 x half> [[A]] to <4 x i16> @@ -138,7 +138,7 @@ float16x4_t test_vfma_lane_f16(float16x4_t a, float16x4_t b, float16x8_t test_vfmaq_lane_f16(float16x8_t a, float16x8_t b, float16x4_t c) { // CIR: [[LANE:%.*]] = cir.vec.shuffle(%{{.*}}, %{{.*}} : !cir.vector<4 x !cir.f16>) [#cir.int<3> : !s32i, #cir.int<3> : !s32i, #cir.int<3> : !s32i, #cir.int<3> : !s32i, #cir.int<3> : !s32i, #cir.int<3> : !s32i, #cir.int<3> : !s32i, #cir.int<3> : !s32i] : !cir.vector<8 x !cir.f16> -// CIR: cir.call_llvm_intrinsic "fma" %{{.*}}, [[LANE]], %{{.*}} : (!cir.vector<8 x !cir.f16>, !cir.vector<8 x !cir.f16>, !cir.vector<8 x !cir.f16>) -> !cir.vector<8 x !cir.f16> +// CIR: cir.fma %{{.*}}, [[LANE]], %{{.*}} : !cir.vector<8 x !cir.f16> // LLVM-SAME: <8 x half> {{.*}} [[A:%.*]], <8 x half> {{.*}} [[B:%.*]], <4 x half> {{.*}} [[C:%.*]]) {{.*}} { // LLVM: [[A_I:%.*]] = bitcast <8 x half> [[A]] to <8 x i16> @@ -160,7 +160,7 @@ float16x8_t test_vfmaq_lane_f16(float16x8_t a, float16x8_t b, float16x4_t test_vfma_laneq_f16(float16x4_t a, float16x4_t b, float16x8_t c) { // CIR: [[LANE:%.*]] = cir.vec.shuffle(%{{.*}}, %{{.*}} : !cir.vector<8 x !cir.f16>) [#cir.int<7> : !s32i, #cir.int<7> : !s32i, #cir.int<7> : !s32i, #cir.int<7> : !s32i] : !cir.vector<4 x !cir.f16> -// CIR: cir.call_llvm_intrinsic "fma" [[LANE]], %{{.*}}, %{{.*}} : (!cir.vector<4 x !cir.f16>, !cir.vector<4 x !cir.f16>, !cir.vector<4 x !cir.f16>) -> !cir.vector<4 x !cir.f16> +// CIR: cir.fma [[LANE]], %{{.*}}, %{{.*}} : !cir.vector<4 x !cir.f16> // LLVM-SAME: <4 x half> {{.*}} [[A:%.*]], <4 x half> {{.*}} [[B:%.*]], <8 x half> {{.*}} [[C:%.*]]) {{.*}} { // LLVM: [[A_I:%.*]] = bitcast <4 x half> [[A]] to <4 x i16> @@ -182,7 +182,7 @@ float16x4_t test_vfma_laneq_f16(float16x4_t a, float16x4_t b, float16x8_t test_vfmaq_laneq_f16(float16x8_t a, float16x8_t b, float16x8_t c) { // CIR: [[LANE:%.*]] = cir.vec.shuffle(%{{.*}}, %{{.*}} : !cir.vector<8 x !cir.f16>) [#cir.int<7> : !s32i, #cir.int<7> : !s32i, #cir.int<7> : !s32i, #cir.int<7> : !s32i, #cir.int<7> : !s32i, #cir.int<7> : !s32i, #cir.int<7> : !s32i, #cir.int<7> : !s32i] : !cir.vector<8 x !cir.f16> -// CIR: cir.call_llvm_intrinsic "fma" [[LANE]], %{{.*}}, %{{.*}} : (!cir.vector<8 x !cir.f16>, !cir.vector<8 x !cir.f16>, !cir.vector<8 x !cir.f16>) -> !cir.vector<8 x !cir.f16> +// CIR: cir.fma [[LANE]], %{{.*}}, %{{.*}} : !cir.vector<8 x !cir.f16> // LLVM-SAME: <8 x half> {{.*}} [[A:%.*]], <8 x half> {{.*}} [[B:%.*]], <8 x half> {{.*}} [[C:%.*]]) {{.*}} { // LLVM: [[A_I:%.*]] = bitcast <8 x half> [[A]] to <8 x i16> @@ -245,7 +245,7 @@ float16x8_t test_vfmaq_n_f16(float16x8_t a, float16x8_t b, float16_t c) { // ALL-LABEL: @test_vfmah_lane_f16( float16_t test_vfmah_lane_f16(float16_t a, float16_t b, float16x4_t c) { // CIR: [[LANE:%.*]] = cir.vec.extract %{{.*}}[%{{.*}} : !u64i] : !cir.vector<4 x !cir.f16> -// CIR: cir.call_llvm_intrinsic "fma" %{{.*}}, [[LANE]], %{{.*}} : (!cir.f16, !cir.f16, !cir.f16) -> !cir.f16 +// CIR: cir.fma %{{.*}}, [[LANE]], %{{.*}} : !cir.f16 // LLVM-SAME: half {{.*}} [[A:%.*]], half {{.*}} [[B:%.*]], <4 x half> {{.*}} [[C:%.*]]) {{.*}} { // LLVM: [[LANE:%.*]] = extractelement <4 x half> [[C]], i{{32|64}} 3 @@ -257,7 +257,7 @@ float16_t test_vfmah_lane_f16(float16_t a, float16_t b, float16x4_t c) { // ALL-LABEL: @test_vfmah_laneq_f16( float16_t test_vfmah_laneq_f16(float16_t a, float16_t b, float16x8_t c) { // CIR: [[LANE:%.*]] = cir.vec.extract %{{.*}}[%{{.*}} : !u64i] : !cir.vector<8 x !cir.f16> -// CIR: cir.call_llvm_intrinsic "fma" %{{.*}}, [[LANE]], %{{.*}} : (!cir.f16, !cir.f16, !cir.f16) -> !cir.f16 +// CIR: cir.fma %{{.*}}, [[LANE]], %{{.*}} : !cir.f16 // LLVM-SAME: half {{.*}} [[A:%.*]], half {{.*}} [[B:%.*]], <8 x half> {{.*}} [[C:%.*]]) {{.*}} { // LLVM: [[LANE:%.*]] = extractelement <8 x half> [[C]], i{{32|64}} 7 @@ -275,7 +275,7 @@ float16x4_t test_vfms_lane_f16(float16x4_t a, float16x4_t b, // CIR: [[NEG_BYTES:%.*]] = cir.load align(8) [[NEG_PTR]] : !cir.ptr<!cir.vector<8 x !s8i>>, !cir.vector<8 x !s8i> // CIR: [[NEG_CAST:%.*]] = cir.cast bitcast [[NEG_BYTES]] : !cir.vector<8 x !s8i> -> !cir.vector<4 x !cir.f16> // CIR: [[LANE:%.*]] = cir.vec.shuffle(%{{.*}}, %{{.*}} : !cir.vector<4 x !cir.f16>) [#cir.int<3> : !s32i, #cir.int<3> : !s32i, #cir.int<3> : !s32i, #cir.int<3> : !s32i] : !cir.vector<4 x !cir.f16> -// CIR: cir.call_llvm_intrinsic "fma" [[NEG_CAST]], [[LANE]], %{{.*}} : (!cir.vector<4 x !cir.f16>, !cir.vector<4 x !cir.f16>, !cir.vector<4 x !cir.f16>) -> !cir.vector<4 x !cir.f16> +// CIR: cir.fma [[NEG_CAST]], [[LANE]], %{{.*}} : !cir.vector<4 x !cir.f16> // LLVM-SAME: <4 x half> {{.*}} [[A:%.*]], <4 x half> {{.*}} [[B:%.*]], <4 x half> {{.*}} [[C:%.*]]) {{.*}} { // LLVM: [[A_I:%.*]] = bitcast <4 x half> [[A]] to <4 x i16> @@ -303,7 +303,7 @@ float16x8_t test_vfmsq_lane_f16(float16x8_t a, float16x8_t b, // CIR: [[NEG_BYTES:%.*]] = cir.load align(16) [[NEG_PTR]] : !cir.ptr<!cir.vector<16 x !s8i>>, !cir.vector<16 x !s8i> // CIR: [[NEG_CAST:%.*]] = cir.cast bitcast [[NEG_BYTES]] : !cir.vector<16 x !s8i> -> !cir.vector<8 x !cir.f16> // CIR: [[LANE:%.*]] = cir.vec.shuffle(%{{.*}}, %{{.*}} : !cir.vector<4 x !cir.f16>) [#cir.int<3> : !s32i, #cir.int<3> : !s32i, #cir.int<3> : !s32i, #cir.int<3> : !s32i, #cir.int<3> : !s32i, #cir.int<3> : !s32i, #cir.int<3> : !s32i, #cir.int<3> : !s32i] : !cir.vector<8 x !cir.f16> -// CIR: cir.call_llvm_intrinsic "fma" [[NEG_CAST]], [[LANE]], %{{.*}} : (!cir.vector<8 x !cir.f16>, !cir.vector<8 x !cir.f16>, !cir.vector<8 x !cir.f16>) -> !cir.vector<8 x !cir.f16> +// CIR: cir.fma [[NEG_CAST]], [[LANE]], %{{.*}} : !cir.vector<8 x !cir.f16> // LLVM-SAME: <8 x half> {{.*}} [[A:%.*]], <8 x half> {{.*}} [[B:%.*]], <4 x half> {{.*}} [[C:%.*]]) {{.*}} { // LLVM: [[A_I:%.*]] = bitcast <8 x half> [[A]] to <8 x i16> @@ -331,7 +331,7 @@ float16x4_t test_vfms_laneq_f16(float16x4_t a, float16x4_t b, // CIR: [[NEG_BYTES:%.*]] = cir.load align(8) [[NEG_PTR]] : !cir.ptr<!cir.vector<8 x !s8i>>, !cir.vector<8 x !s8i> // CIR: [[NEG_CAST:%.*]] = cir.cast bitcast [[NEG_BYTES]] : !cir.vector<8 x !s8i> -> !cir.vector<4 x !cir.f16> // CIR: [[LANE:%.*]] = cir.vec.shuffle(%{{.*}}, %{{.*}} : !cir.vector<8 x !cir.f16>) [#cir.int<7> : !s32i, #cir.int<7> : !s32i, #cir.int<7> : !s32i, #cir.int<7> : !s32i] : !cir.vector<4 x !cir.f16> -// CIR: cir.call_llvm_intrinsic "fma" [[LANE]], [[NEG_CAST]], %{{.*}} : (!cir.vector<4 x !cir.f16>, !cir.vector<4 x !cir.f16>, !cir.vector<4 x !cir.f16>) -> !cir.vector<4 x !cir.f16> +// CIR: cir.fma [[LANE]], [[NEG_CAST]], %{{.*}} : !cir.vector<4 x !cir.f16> // LLVM-SAME: <4 x half> {{.*}} [[A:%.*]], <4 x half> {{.*}} [[B:%.*]], <8 x half> {{.*}} [[C:%.*]]) {{.*}} { // LLVM: [[A_I:%.*]] = bitcast <4 x half> [[A]] to <4 x i16> @@ -359,7 +359,7 @@ float16x8_t test_vfmsq_laneq_f16(float16x8_t a, float16x8_t b, // CIR: [[NEG_BYTES:%.*]] = cir.load align(16) [[NEG_PTR]] : !cir.ptr<!cir.vector<16 x !s8i>>, !cir.vector<16 x !s8i> // CIR: [[NEG_CAST:%.*]] = cir.cast bitcast [[NEG_BYTES]] : !cir.vector<16 x !s8i> -> !cir.vector<8 x !cir.f16> // CIR: [[LANE:%.*]] = cir.vec.shuffle(%{{.*}}, %{{.*}} : !cir.vector<8 x !cir.f16>) [#cir.int<7> : !s32i, #cir.int<7> : !s32i, #cir.int<7> : !s32i, #cir.int<7> : !s32i, #cir.int<7> : !s32i, #cir.int<7> : !s32i, #cir.int<7> : !s32i, #cir.int<7> : !s32i] : !cir.vector<8 x !cir.f16> -// CIR: cir.call_llvm_intrinsic "fma" [[LANE]], [[NEG_CAST]], %{{.*}} : (!cir.vector<8 x !cir.f16>, !cir.vector<8 x !cir.f16>, !cir.vector<8 x !cir.f16>) -> !cir.vector<8 x !cir.f16> +// CIR: cir.fma [[LANE]], [[NEG_CAST]], %{{.*}} : !cir.vector<8 x !cir.f16> // LLVM-SAME: <8 x half> {{.*}} [[A:%.*]], <8 x half> {{.*}} [[B:%.*]], <8 x half> {{.*}} [[C:%.*]]) {{.*}} { // LLVM: [[A_I:%.*]] = bitcast <8 x half> [[A]] to <8 x i16> @@ -432,7 +432,7 @@ float16_t test_vfmsh_lane_f16(float16_t a, float16_t b, float16x4_t c) { // CIR: cir.store align(2) [[NEG]], [[NEG_SLOT:%.*]] : !cir.f16, !cir.ptr<!cir.f16> // CIR: [[NEG_ARG:%.*]] = cir.load align(2) [[NEG_SLOT]] : !cir.ptr<!cir.f16>, !cir.f16 // CIR: [[LANE:%.*]] = cir.vec.extract %{{.*}}[%{{.*}} : !u64i] : !cir.vector<4 x !cir.f16> -// CIR: cir.call_llvm_intrinsic "fma" [[NEG_ARG]], [[LANE]], %{{.*}} : (!cir.f16, !cir.f16, !cir.f16) -> !cir.f16 +// CIR: cir.fma [[NEG_ARG]], [[LANE]], %{{.*}} : !cir.f16 // LLVM-SAME: half {{.*}} [[A:%.*]], half {{.*}} [[B:%.*]], <4 x half> {{.*}} [[C:%.*]]) {{.*}} { // LLVM: [[CONV:%.*]] = fpext half [[B]] to float @@ -452,7 +452,7 @@ float16_t test_vfmsh_laneq_f16(float16_t a, float16_t b, float16x8_t c) { // CIR: cir.store align(2) [[NEG]], [[NEG_SLOT:%.*]] : !cir.f16, !cir.ptr<!cir.f16> // CIR: [[NEG_ARG:%.*]] = cir.load align(2) [[NEG_SLOT]] : !cir.ptr<!cir.f16>, !cir.f16 // CIR: [[LANE:%.*]] = cir.vec.extract %{{.*}}[%{{.*}} : !u64i] : !cir.vector<8 x !cir.f16> -// CIR: cir.call_llvm_intrinsic "fma" [[NEG_ARG]], [[LANE]], %{{.*}} : (!cir.f16, !cir.f16, !cir.f16) -> !cir.f16 +// CIR: cir.fma [[NEG_ARG]], [[LANE]], %{{.*}} : !cir.f16 // LLVM-SAME: half {{.*}} [[A:%.*]], half {{.*}} [[B:%.*]], <8 x half> {{.*}} [[C:%.*]]) {{.*}} { // LLVM: [[CONV:%.*]] = fpext half [[B]] to float diff --git a/clang/test/CodeGen/AArch64/neon/fused-multiply.c b/clang/test/CodeGen/AArch64/neon/fused-multiply.c index 3c364eaad0be1..5d501d3f61734 100644 --- a/clang/test/CodeGen/AArch64/neon/fused-multiply.c +++ b/clang/test/CodeGen/AArch64/neon/fused-multiply.c @@ -32,7 +32,7 @@ // LLVM-LABEL: @test_vfma_f32( // CIR-LABEL: @vfma_f32( float32x2_t test_vfma_f32(float32x2_t a, float32x2_t b, float32x2_t c) { -// CIR: cir.call_llvm_intrinsic "fma" %{{.*}}, %{{.*}}, %{{.*}} : (!cir.vector<2 x !cir.float>, !cir.vector<2 x !cir.float>, !cir.vector<2 x !cir.float>) -> !cir.vector<2 x !cir.float> +// CIR: cir.fma %{{.*}}, %{{.*}}, %{{.*}} : !cir.vector<2 x !cir.float> // LLVM-SAME: <2 x float> {{.*}} [[A:%.*]], <2 x float> {{.*}} [[B:%.*]], <2 x float> {{.*}} [[C:%.*]]) {{.*}} { // LLVM: [[A_I:%.*]] = bitcast <2 x float> [[A]] to <2 x i32> @@ -52,7 +52,7 @@ float32x2_t test_vfma_f32(float32x2_t a, float32x2_t b, float32x2_t c) { // LLVM-LABEL: @test_vfma_f64( // CIR-LABEL: @vfma_f64( float64x1_t test_vfma_f64(float64x1_t a, float64x1_t b, float64x1_t c) { -// CIR: cir.call_llvm_intrinsic "fma" %{{.*}}, %{{.*}}, %{{.*}} : (!cir.vector<1 x !cir.double>, !cir.vector<1 x !cir.double>, !cir.vector<1 x !cir.double>) -> !cir.vector<1 x !cir.double> +// CIR: cir.fma %{{.*}}, %{{.*}}, %{{.*}} : !cir.vector<1 x !cir.double> // LLVM-SAME: <1 x double> {{.*}} [[A:%.*]], <1 x double> {{.*}} [[B:%.*]], <1 x double> {{.*}} [[C:%.*]]) {{.*}} { // LLVM: [[A_I:%.*]] = bitcast <1 x double> [[A]] to i64 @@ -75,7 +75,7 @@ float64x1_t test_vfma_f64(float64x1_t a, float64x1_t b, float64x1_t c) { // LLVM-LABEL: @test_vfmaq_f32( // CIR-LABEL: @vfmaq_f32( float32x4_t test_vfmaq_f32(float32x4_t a, float32x4_t b, float32x4_t c) { -// CIR: cir.call_llvm_intrinsic "fma" %{{.*}}, %{{.*}}, %{{.*}} : (!cir.vector<4 x !cir.float>, !cir.vector<4 x !cir.float>, !cir.vector<4 x !cir.float>) -> !cir.vector<4 x !cir.float> +// CIR: cir.fma %{{.*}}, %{{.*}}, %{{.*}} : !cir.vector<4 x !cir.float> // LLVM-SAME: <4 x float> {{.*}} [[A:%.*]], <4 x float> {{.*}} [[B:%.*]], <4 x float> {{.*}} [[C:%.*]]) {{.*}} { // LLVM: [[A_I:%.*]] = bitcast <4 x float> [[A]] to <4 x i32> @@ -95,7 +95,7 @@ float32x4_t test_vfmaq_f32(float32x4_t a, float32x4_t b, float32x4_t c) { // LLVM-LABEL: @test_vfmaq_f64( // CIR-LABEL: @vfmaq_f64( float64x2_t test_vfmaq_f64(float64x2_t a, float64x2_t b, float64x2_t c) { -// CIR: cir.call_llvm_intrinsic "fma" %{{.*}}, %{{.*}}, %{{.*}} : (!cir.vector<2 x !cir.double>, !cir.vector<2 x !cir.double>, !cir.vector<2 x !cir.double>) -> !cir.vector<2 x !cir.double> +// CIR: cir.fma %{{.*}}, %{{.*}}, %{{.*}} : !cir.vector<2 x !cir.double> // LLVM-SAME: <2 x double> {{.*}} [[A:%.*]], <2 x double> {{.*}} [[B:%.*]], <2 x double> {{.*}} [[C:%.*]]) {{.*}} { // LLVM: [[A_I:%.*]] = bitcast <2 x double> [[A]] to <2 x i64> @@ -115,7 +115,7 @@ float64x2_t test_vfmaq_f64(float64x2_t a, float64x2_t b, float64x2_t c) { // ALL-LABEL: @test_vfma_lane_f32( float32x2_t test_vfma_lane_f32(float32x2_t a, float32x2_t b, float32x2_t v) { // CIR: [[LANE:%.*]] = cir.vec.shuffle(%{{.*}}, %{{.*}} : !cir.vector<2 x !cir.float>) [#cir.int<1> : !s32i, #cir.int<1> : !s32i] : !cir.vector<2 x !cir.float> -// CIR: cir.call_llvm_intrinsic "fma" %{{.*}}, [[LANE]], %{{.*}} : (!cir.vector<2 x !cir.float>, !cir.vector<2 x !cir.float>, !cir.vector<2 x !cir.float>) -> !cir.vector<2 x !cir.float> +// CIR: cir.fma %{{.*}}, [[LANE]], %{{.*}} : !cir.vector<2 x !cir.float> // LLVM-SAME: <2 x float> {{.*}} [[A:%.*]], <2 x float> {{.*}} [[B:%.*]], <2 x float> {{.*}} [[V:%.*]]) {{.*}} { // LLVM: [[A_I:%.*]] = bitcast <2 x float> [[A]] to <2 x i32> @@ -136,7 +136,7 @@ float32x2_t test_vfma_lane_f32(float32x2_t a, float32x2_t b, float32x2_t v) { // ALL-LABEL: @test_vfma_lane_f64( float64x1_t test_vfma_lane_f64(float64x1_t a, float64x1_t b, float64x1_t v) { // CIR: [[LANE:%.*]] = cir.vec.shuffle(%{{.*}}, %{{.*}} : !cir.vector<1 x !cir.double>) [#cir.int<0> : !s32i] : !cir.vector<1 x !cir.double> -// CIR: cir.call_llvm_intrinsic "fma" %{{.*}}, [[LANE]], %{{.*}} : (!cir.vector<1 x !cir.double>, !cir.vector<1 x !cir.double>, !cir.vector<1 x !cir.double>) -> !cir.vector<1 x !cir.double> +// CIR: cir.fma %{{.*}}, [[LANE]], %{{.*}} : !cir.vector<1 x !cir.double> // LLVM-SAME: <1 x double> {{.*}} [[A:%.*]], <1 x double> {{.*}} [[B:%.*]], <1 x double> {{.*}} [[V:%.*]]) {{.*}} { // LLVM: [[A_I:%.*]] = bitcast <1 x double> [[A]] to i64 @@ -160,7 +160,7 @@ float64x1_t test_vfma_lane_f64(float64x1_t a, float64x1_t b, float64x1_t v) { // ALL-LABEL: @test_vfmaq_lane_f32( float32x4_t test_vfmaq_lane_f32(float32x4_t a, float32x4_t b, float32x2_t v) { // CIR: [[LANE:%.*]] = cir.vec.shuffle(%{{.*}}, %{{.*}} : !cir.vector<2 x !cir.float>) [#cir.int<1> : !s32i, #cir.int<1> : !s32i, #cir.int<1> : !s32i, #cir.int<1> : !s32i] : !cir.vector<4 x !cir.float> -// CIR: cir.call_llvm_intrinsic "fma" %{{.*}}, [[LANE]], %{{.*}} : (!cir.vector<4 x !cir.float>, !cir.vector<4 x !cir.float>, !cir.vector<4 x !cir.float>) -> !cir.vector<4 x !cir.float> +// CIR: cir.fma %{{.*}}, [[LANE]], %{{.*}} : !cir.vector<4 x !cir.float> // LLVM-SAME: <4 x float> {{.*}} [[A:%.*]], <4 x float> {{.*}} [[B:%.*]], <2 x float> {{.*}} [[V:%.*]]) {{.*}} { // LLVM: [[A_I:%.*]] = bitcast <4 x float> [[A]] to <4 x i32> @@ -181,7 +181,7 @@ float32x4_t test_vfmaq_lane_f32(float32x4_t a, float32x4_t b, float32x2_t v) { // ALL-LABEL: @test_vfmaq_lane_f64( float64x2_t test_vfmaq_lane_f64(float64x2_t a, float64x2_t b, float64x1_t v) { // CIR: [[LANE:%.*]] = cir.vec.shuffle(%{{.*}}, %{{.*}} : !cir.vector<1 x !cir.double>) [#cir.int<0> : !s32i, #cir.int<0> : !s32i] : !cir.vector<2 x !cir.double> -// CIR: cir.call_llvm_intrinsic "fma" %{{.*}}, [[LANE]], %{{.*}} : (!cir.vector<2 x !cir.double>, !cir.vector<2 x !cir.double>, !cir.vector<2 x !cir.double>) -> !cir.vector<2 x !cir.double> +// CIR: cir.fma %{{.*}}, [[LANE]], %{{.*}} : !cir.vector<2 x !cir.double> // LLVM-SAME: <2 x double> {{.*}} [[A:%.*]], <2 x double> {{.*}} [[B:%.*]], <1 x double> {{.*}} [[V:%.*]]) {{.*}} { // LLVM: [[A_I:%.*]] = bitcast <2 x double> [[A]] to <2 x i64> @@ -203,7 +203,7 @@ float64x2_t test_vfmaq_lane_f64(float64x2_t a, float64x2_t b, float64x1_t v) { // ALL-LABEL: @test_vfma_laneq_f32( float32x2_t test_vfma_laneq_f32(float32x2_t a, float32x2_t b, float32x4_t v) { // CIR: [[LANE:%.*]] = cir.vec.shuffle(%{{.*}}, %{{.*}} : !cir.vector<4 x !cir.float>) [#cir.int<3> : !s32i, #cir.int<3> : !s32i] : !cir.vector<2 x !cir.float> -// CIR: cir.call_llvm_intrinsic "fma" [[LANE]], %{{.*}}, %{{.*}} : (!cir.vector<2 x !cir.float>, !cir.vector<2 x !cir.float>, !cir.vector<2 x !cir.float>) -> !cir.vector<2 x !cir.float> +// CIR: cir.fma [[LANE]], %{{.*}}, %{{.*}} : !cir.vector<2 x !cir.float> // LLVM-SAME: <2 x float> {{.*}} [[A:%.*]], <2 x float> {{.*}} [[B:%.*]], <4 x float> {{.*}} [[V:%.*]]) {{.*}} { // LLVM: [[A_I:%.*]] = bitcast <2 x float> [[A]] to <2 x i32> @@ -225,7 +225,7 @@ float32x2_t test_vfma_laneq_f32(float32x2_t a, float32x2_t b, float32x4_t v) { float64x1_t test_vfma_laneq_f64(float64x1_t a, float64x1_t b, float64x2_t v) { // CIR: [[LANE:%.*]] = cir.vec.extract %{{.*}}[%{{.*}} : !u64i] : !cir.vector<2 x !cir.double> -// CIR: cir.call_llvm_intrinsic "fma" %{{.*}}, [[LANE]], %{{.*}} : (!cir.double, !cir.double, !cir.double) -> !cir.double +// CIR: cir.fma %{{.*}}, [[LANE]], %{{.*}} : !cir.double // LLVM-SAME: <1 x double> {{.*}} [[A:%.*]], <1 x double> {{.*}} [[B:%.*]], <2 x double> {{.*}} [[V:%.*]]) {{.*}} { // LLVM: [[A_I:%.*]] = bitcast <1 x double> [[A]] to i64 @@ -250,7 +250,7 @@ float64x1_t test_vfma_laneq_f64(float64x1_t a, float64x1_t b, float32x2_t test_vfma_laneq_f32_0(float32x2_t a, float32x2_t b, float32x4_t v) { // CIR: [[LANE:%.*]] = cir.vec.shuffle(%{{.*}}, %{{.*}} : !cir.vector<4 x !cir.float>) [#cir.int<0> : !s32i, #cir.int<0> : !s32i] : !cir.vector<2 x !cir.float> -// CIR: cir.call_llvm_intrinsic "fma" [[LANE]], %{{.*}}, %{{.*}} : (!cir.vector<2 x !cir.float>, !cir.vector<2 x !cir.float>, !cir.vector<2 x !cir.float>) -> !cir.vector<2 x !cir.float> +// CIR: cir.fma [[LANE]], %{{.*}}, %{{.*}} : !cir.vector<2 x !cir.float> // LLVM-SAME: <2 x float> {{.*}} [[A:%.*]], <2 x float> {{.*}} [[B:%.*]], <4 x float> {{.*}} [[V:%.*]]) {{.*}} { // LLVM: [[A_I:%.*]] = bitcast <2 x float> [[A]] to <2 x i32> @@ -272,7 +272,7 @@ float32x2_t test_vfma_laneq_f32_0(float32x2_t a, float32x2_t b, float32x4_t test_vfmaq_laneq_f32(float32x4_t a, float32x4_t b, float32x4_t v) { // CIR: [[LANE:%.*]] = cir.vec.shuffle(%{{.*}}, %{{.*}} : !cir.vector<4 x !cir.float>) [#cir.int<3> : !s32i, #cir.int<3> : !s32i, #cir.int<3> : !s32i, #cir.int<3> : !s32i] : !cir.vector<4 x !cir.float> -// CIR: cir.call_llvm_intrinsic "fma" [[LANE]], %{{.*}}, %{{.*}} : (!cir.vector<4 x !cir.float>, !cir.vector<4 x !cir.float>, !cir.vector<4 x !cir.float>) -> !cir.vector<4 x !cir.float> +// CIR: cir.fma [[LANE]], %{{.*}}, %{{.*}} : !cir.vector<4 x !cir.float> // LLVM-SAME: <4 x float> {{.*}} [[A:%.*]], <4 x float> {{.*}} [[B:%.*]], <4 x float> {{.*}} [[V:%.*]]) {{.*}} { // LLVM: [[A_I:%.*]] = bitcast <4 x float> [[A]] to <4 x i32> @@ -294,7 +294,7 @@ float32x4_t test_vfmaq_laneq_f32(float32x4_t a, float32x4_t b, float64x2_t test_vfmaq_laneq_f64(float64x2_t a, float64x2_t b, float64x2_t v) { // CIR: [[LANE:%.*]] = cir.vec.shuffle(%{{.*}}, %{{.*}} : !cir.vector<2 x !cir.double>) [#cir.int<1> : !s32i, #cir.int<1> : !s32i] : !cir.vector<2 x !cir.double> -// CIR: cir.call_llvm_intrinsic "fma" [[LANE]], %{{.*}}, %{{.*}} : (!cir.vector<2 x !cir.double>, !cir.vector<2 x !cir.double>, !cir.vector<2 x !cir.double>) -> !cir.vector<2 x !cir.double> +// CIR: cir.fma [[LANE]], %{{.*}}, %{{.*}} : !cir.vector<2 x !cir.double> // LLVM-SAME: <2 x double> {{.*}} [[A:%.*]], <2 x double> {{.*}} [[B:%.*]], <2 x double> {{.*}} [[V:%.*]]) {{.*}} { // LLVM: [[A_I:%.*]] = bitcast <2 x double> [[A]] to <2 x i64> @@ -316,7 +316,7 @@ float64x2_t test_vfmaq_laneq_f64(float64x2_t a, float64x2_t b, float32x4_t test_vfmaq_laneq_f32_0(float32x4_t a, float32x4_t b, float32x4_t v) { // CIR: [[LANE:%.*]] = cir.vec.shuffle(%{{.*}}, %{{.*}} : !cir.vector<4 x !cir.float>) [#cir.int<0> : !s32i, #cir.int<0> : !s32i, #cir.int<0> : !s32i, #cir.int<0> : !s32i] : !cir.vector<4 x !cir.float> -// CIR: cir.call_llvm_intrinsic "fma" [[LANE]], %{{.*}}, %{{.*}} : (!cir.vector<4 x !cir.float>, !cir.vector<4 x !cir.float>, !cir.vector<4 x !cir.float>) -> !cir.vector<4 x !cir.float> +// CIR: cir.fma [[LANE]], %{{.*}}, %{{.*}} : !cir.vector<4 x !cir.float> // LLVM-SAME: <4 x float> {{.*}} [[A:%.*]], <4 x float> {{.*}} [[B:%.*]], <4 x float> {{.*}} [[V:%.*]]) {{.*}} { // LLVM: [[A_I:%.*]] = bitcast <4 x float> [[A]] to <4 x i32> @@ -338,7 +338,7 @@ float32x4_t test_vfmaq_laneq_f32_0(float32x4_t a, float32x4_t b, float64x2_t test_vfmaq_laneq_f64_0(float64x2_t a, float64x2_t b, float64x2_t v) { // CIR: [[LANE:%.*]] = cir.vec.shuffle(%{{.*}}, %{{.*}} : !cir.vector<2 x !cir.double>) [#cir.int<0> : !s32i, #cir.int<0> : !s32i] : !cir.vector<2 x !cir.double> -// CIR: cir.call_llvm_intrinsic "fma" [[LANE]], %{{.*}}, %{{.*}} : (!cir.vector<2 x !cir.double>, !cir.vector<2 x !cir.double>, !cir.vector<2 x !cir.double>) -> !cir.vector<2 x !cir.double> +// CIR: cir.fma [[LANE]], %{{.*}}, %{{.*}} : !cir.vector<2 x !cir.double> // LLVM-SAME: <2 x double> {{.*}} [[A:%.*]], <2 x double> {{.*}} [[B:%.*]], <2 x double> {{.*}} [[V:%.*]]) {{.*}} { // LLVM: [[A_I:%.*]] = bitcast <2 x double> [[A]] to <2 x i64> @@ -359,7 +359,7 @@ float64x2_t test_vfmaq_laneq_f64_0(float64x2_t a, float64x2_t b, // ALL-LABEL: @test_vfmas_lane_f32( float32_t test_vfmas_lane_f32(float32_t a, float32_t b, float32x2_t c) { // CIR: [[LANE:%.*]] = cir.vec.extract %{{.*}}[%{{.*}} : !u64i] : !cir.vector<2 x !cir.float> -// CIR: cir.call_llvm_intrinsic "fma" %{{.*}}, [[LANE]], %{{.*}} : (!cir.float, !cir.float, !cir.float) -> !cir.float +// CIR: cir.fma %{{.*}}, [[LANE]], %{{.*}} : !cir.float // LLVM-SAME: float {{.*}} [[A:%.*]], float {{.*}} [[B:%.*]], <2 x float> {{.*}} [[C:%.*]]) {{.*}} { // LLVM: [[LANE:%.*]] = extractelement <2 x float> [[C]], i{{32|64}} 1 @@ -371,7 +371,7 @@ float32_t test_vfmas_lane_f32(float32_t a, float32_t b, float32x2_t c) { // ALL-LABEL: @test_vfmas_laneq_f32( float32_t test_vfmas_laneq_f32(float32_t a, float32_t b, float32x4_t c) { // CIR: [[LANE:%.*]] = cir.vec.extract %{{.*}}[%{{.*}} : !u64i] : !cir.vector<4 x !cir.float> -// CIR: cir.call_llvm_intrinsic "fma" %{{.*}}, [[LANE]], %{{.*}} : (!cir.float, !cir.float, !cir.float) -> !cir.float +// CIR: cir.fma %{{.*}}, [[LANE]], %{{.*}} : !cir.float // LLVM-SAME: float {{.*}} [[A:%.*]], float {{.*}} [[B:%.*]], <4 x float> {{.*}} [[C:%.*]]) {{.*}} { // LLVM: [[LANE:%.*]] = extractelement <4 x float> [[C]], i{{32|64}} 3 @@ -383,7 +383,7 @@ float32_t test_vfmas_laneq_f32(float32_t a, float32_t b, float32x4_t c) { // ALL-LABEL: @test_vfmad_lane_f64( float64_t test_vfmad_lane_f64(float64_t a, float64_t b, float64x1_t c) { // CIR: [[LANE:%.*]] = cir.vec.extract %{{.*}}[%{{.*}} : !u64i] : !cir.vector<1 x !cir.double> -// CIR: cir.call_llvm_intrinsic "fma" %{{.*}}, [[LANE]], %{{.*}} : (!cir.double, !cir.double, !cir.double) -> !cir.double +// CIR: cir.fma %{{.*}}, [[LANE]], %{{.*}} : !cir.double // LLVM-SAME: double {{.*}} [[A:%.*]], double {{.*}} [[B:%.*]], <1 x double> {{.*}} [[C:%.*]]) {{.*}} { // LLVM: [[LANE:%.*]] = extractelement <1 x double> [[C]], i{{32|64}} 0 @@ -395,7 +395,7 @@ float64_t test_vfmad_lane_f64(float64_t a, float64_t b, float64x1_t c) { // ALL-LABEL: @test_vfmad_laneq_f64( float64_t test_vfmad_laneq_f64(float64_t a, float64_t b, float64x2_t c) { // CIR: [[LANE:%.*]] = cir.vec.extract %{{.*}}[%{{.*}} : !u64i] : !cir.vector<2 x !cir.double> -// CIR: cir.call_llvm_intrinsic "fma" %{{.*}}, [[LANE]], %{{.*}} : (!cir.double, !cir.double, !cir.double) -> !cir.double +// CIR: cir.fma %{{.*}}, [[LANE]], %{{.*}} : !cir.double // LLVM-SAME: double {{.*}} [[A:%.*]], double {{.*}} [[B:%.*]], <2 x double> {{.*}} [[C:%.*]]) {{.*}} { // LLVM: [[LANE:%.*]] = extractelement <2 x double> [[C]], i{{32|64}} 1 @@ -503,7 +503,7 @@ float64x2_t test_vfmsq_f64(float64x2_t a, float64x2_t b, float64x2_t c) { float32x2_t test_vfms_lane_f32(float32x2_t a, float32x2_t b, float32x2_t v) { // CIR: [[NEG:%.*]] = cir.fneg %{{.*}} : !cir.vector<2 x !cir.float> // CIR: [[LANE:%.*]] = cir.vec.shuffle(%{{.*}}, %{{.*}} : !cir.vector<2 x !cir.float>) [#cir.int<1> : !s32i, #cir.int<1> : !s32i] : !cir.vector<2 x !cir.float> -// CIR: cir.call_llvm_intrinsic "fma" %{{.*}}, [[LANE]], %{{.*}} : (!cir.vector<2 x !cir.float>, !cir.vector<2 x !cir.float>, !cir.vector<2 x !cir.float>) -> !cir.vector<2 x !cir.float> +// CIR: cir.fma %{{.*}}, [[LANE]], %{{.*}} : !cir.vector<2 x !cir.float> // LLVM-SAME: <2 x float> {{.*}} [[A:%.*]], <2 x float> {{.*}} [[B:%.*]], <2 x float> {{.*}} [[V:%.*]]) {{.*}} { // LLVM: [[A_I:%.*]] = bitcast <2 x float> [[A]] to <2 x i32> @@ -526,7 +526,7 @@ float32x2_t test_vfms_lane_f32(float32x2_t a, float32x2_t b, float32x2_t v) { float64x1_t test_vfms_lane_f64(float64x1_t a, float64x1_t b, float64x1_t v) { // CIR: [[NEG:%.*]] = cir.fneg %{{.*}} : !cir.vector<1 x !cir.double> // CIR: [[LANE:%.*]] = cir.vec.shuffle(%{{.*}}, %{{.*}} : !cir.vector<1 x !cir.double>) [#cir.int<0> : !s32i] : !cir.vector<1 x !cir.double> -// CIR: cir.call_llvm_intrinsic "fma" %{{.*}}, [[LANE]], %{{.*}} : (!cir.vector<1 x !cir.double>, !cir.vector<1 x !cir.double>, !cir.vector<1 x !cir.double>) -> !cir.vector<1 x !cir.double> +// CIR: cir.fma %{{.*}}, [[LANE]], %{{.*}} : !cir.vector<1 x !cir.double> // LLVM-SAME: <1 x double> {{.*}} [[A:%.*]], <1 x double> {{.*}} [[B:%.*]], <1 x double> {{.*}} [[V:%.*]]) {{.*}} { // LLVM: [[A_I:%.*]] = bitcast <1 x double> [[A]] to i64 @@ -553,7 +553,7 @@ float32x2_t test_vfms_lane_f32_0(float32x2_t a, float32x2_t b, float32x2_t v) { // CIR: [[NEG:%.*]] = cir.fneg %{{.*}} : !cir.vector<2 x !cir.float> // CIR: [[LANE:%.*]] = cir.vec.shuffle(%{{.*}}, %{{.*}} : !cir.vector<2 x !cir.float>) [#cir.int<0> : !s32i, #cir.int<0> : !s32i] : !cir.vector<2 x !cir.float> -// CIR: cir.call_llvm_intrinsic "fma" %{{.*}}, [[LANE]], %{{.*}} : (!cir.vector<2 x !cir.float>, !cir.vector<2 x !cir.float>, !cir.vector<2 x !cir.float>) -> !cir.vector<2 x !cir.float> +// CIR: cir.fma %{{.*}}, [[LANE]], %{{.*}} : !cir.vector<2 x !cir.float> // LLVM-SAME: <2 x float> {{.*}} [[A:%.*]], <2 x float> {{.*}} [[B:%.*]], <2 x float> {{.*}} [[V:%.*]]) {{.*}} { // LLVM: [[A_I:%.*]] = bitcast <2 x float> [[A]] to <2 x i32> @@ -577,7 +577,7 @@ float32x4_t test_vfmsq_lane_f32(float32x4_t a, float32x4_t b, float32x2_t v) { // CIR: [[NEG:%.*]] = cir.fneg %{{.*}} : !cir.vector<4 x !cir.float> // CIR: [[LANE:%.*]] = cir.vec.shuffle(%{{.*}}, %{{.*}} : !cir.vector<2 x !cir.float>) [#cir.int<1> : !s32i, #cir.int<1> : !s32i, #cir.int<1> : !s32i, #cir.int<1> : !s32i] : !cir.vector<4 x !cir.float> -// CIR: cir.call_llvm_intrinsic "fma" %{{.*}}, [[LANE]], %{{.*}} : (!cir.vector<4 x !cir.float>, !cir.vector<4 x !cir.float>, !cir.vector<4 x !cir.float>) -> !cir.vector<4 x !cir.float> +// CIR: cir.fma %{{.*}}, [[LANE]], %{{.*}} : !cir.vector<4 x !cir.float> // LLVM-SAME: <4 x float> {{.*}} [[A:%.*]], <4 x float> {{.*}} [[B:%.*]], <2 x float> {{.*}} [[V:%.*]]) {{.*}} { // LLVM: [[A_I:%.*]] = bitcast <4 x float> [[A]] to <4 x i32> @@ -601,7 +601,7 @@ float64x2_t test_vfmsq_lane_f64(float64x2_t a, float64x2_t b, float64x1_t v) { // CIR: [[NEG:%.*]] = cir.fneg %{{.*}} : !cir.vector<2 x !cir.double> // CIR: [[LANE:%.*]] = cir.vec.shuffle(%{{.*}}, %{{.*}} : !cir.vector<1 x !cir.double>) [#cir.int<0> : !s32i, #cir.int<0> : !s32i] : !cir.vector<2 x !cir.double> -// CIR: cir.call_llvm_intrinsic "fma" %{{.*}}, [[LANE]], %{{.*}} : (!cir.vector<2 x !cir.double>, !cir.vector<2 x !cir.double>, !cir.vector<2 x !cir.double>) -> !cir.vector<2 x !cir.double> +// CIR: cir.fma %{{.*}}, [[LANE]], %{{.*}} : !cir.vector<2 x !cir.double> // LLVM-SAME: <2 x double> {{.*}} [[A:%.*]], <2 x double> {{.*}} [[B:%.*]], <1 x double> {{.*}} [[V:%.*]]) {{.*}} { // LLVM: [[A_I:%.*]] = bitcast <2 x double> [[A]] to <2 x i64> @@ -626,7 +626,7 @@ float32x4_t test_vfmsq_lane_f32_0(float32x4_t a, float32x4_t b, float32x2_t v) { // CIR: [[NEG:%.*]] = cir.fneg %{{.*}} : !cir.vector<4 x !cir.float> // CIR: [[LANE:%.*]] = cir.vec.shuffle(%{{.*}}, %{{.*}} : !cir.vector<2 x !cir.float>) [#cir.int<0> : !s32i, #cir.int<0> : !s32i, #cir.int<0> : !s32i, #cir.int<0> : !s32i] : !cir.vector<4 x !cir.float> -// CIR: cir.call_llvm_intrinsic "fma" %{{.*}}, [[LANE]], %{{.*}} : (!cir.vector<4 x !cir.float>, !cir.vector<4 x !cir.float>, !cir.vector<4 x !cir.float>) -> !cir.vector<4 x !cir.float> +// CIR: cir.fma %{{.*}}, [[LANE]], %{{.*}} : !cir.vector<4 x !cir.float> // LLVM-SAME: <4 x float> {{.*}} [[A:%.*]], <4 x float> {{.*}} [[B:%.*]], <2 x float> {{.*}} [[V:%.*]]) {{.*}} { // LLVM: [[A_I:%.*]] = bitcast <4 x float> [[A]] to <4 x i32> @@ -650,7 +650,7 @@ float32x2_t test_vfms_laneq_f32(float32x2_t a, float32x2_t b, float32x4_t v) { // CIR: [[NEG:%.*]] = cir.fneg %{{.*}} : !cir.vector<2 x !cir.float> // CIR: [[LANE:%.*]] = cir.vec.shuffle(%{{.*}}, %{{.*}} : !cir.vector<4 x !cir.float>) [#cir.int<3> : !s32i, #cir.int<3> : !s32i] : !cir.vector<2 x !cir.float> -// CIR: cir.call_llvm_intrinsic "fma" [[LANE]], %{{.*}}, %{{.*}} : (!cir.vector<2 x !cir.float>, !cir.vector<2 x !cir.float>, !cir.vector<2 x !cir.float>) -> !cir.vector<2 x !cir.float> +// CIR: cir.fma [[LANE]], %{{.*}}, %{{.*}} : !cir.vector<2 x !cir.float> // LLVM-SAME: <2 x float> {{.*}} [[A:%.*]], <2 x float> {{.*}} [[B:%.*]], <4 x float> {{.*}} [[V:%.*]]) {{.*}} { // LLVM: [[A_I:%.*]] = bitcast <2 x float> [[A]] to <2 x i32> @@ -674,7 +674,7 @@ float64x1_t test_vfms_laneq_f64(float64x1_t a, float64x1_t b, float64x2_t v) { // CIR: [[NEG:%.*]] = cir.fneg %{{.*}} : !cir.vector<1 x !cir.double> // CIR: [[LANE:%.*]] = cir.vec.extract %{{.*}}[%{{.*}} : !u64i] : !cir.vector<2 x !cir.double> -// CIR: cir.call_llvm_intrinsic "fma" %{{.*}}, [[LANE]], %{{.*}} : (!cir.double, !cir.double, !cir.double) -> !cir.double +// CIR: cir.fma %{{.*}}, [[LANE]], %{{.*}} : !cir.double // LLVM-SAME: <1 x double> {{.*}} [[A:%.*]], <1 x double> {{.*}} [[B:%.*]], <2 x double> {{.*}} [[V:%.*]]) {{.*}} { // LLVM: [[A_I:%.*]] = bitcast <1 x double> [[A]] to i64 @@ -701,7 +701,7 @@ float32x2_t test_vfms_laneq_f32_0(float32x2_t a, float32x2_t b, float32x4_t v) { // CIR: [[NEG:%.*]] = cir.fneg %{{.*}} : !cir.vector<2 x !cir.float> // CIR: [[LANE:%.*]] = cir.vec.shuffle(%{{.*}}, %{{.*}} : !cir.vector<4 x !cir.float>) [#cir.int<0> : !s32i, #cir.int<0> : !s32i] : !cir.vector<2 x !cir.float> -// CIR: cir.call_llvm_intrinsic "fma" [[LANE]], %{{.*}}, %{{.*}} : (!cir.vector<2 x !cir.float>, !cir.vector<2 x !cir.float>, !cir.vector<2 x !cir.float>) -> !cir.vector<2 x !cir.float> +// CIR: cir.fma [[LANE]], %{{.*}}, %{{.*}} : !cir.vector<2 x !cir.float> // LLVM-SAME: <2 x float> {{.*}} [[A:%.*]], <2 x float> {{.*}} [[B:%.*]], <4 x float> {{.*}} [[V:%.*]]) {{.*}} { // LLVM: [[A_I:%.*]] = bitcast <2 x float> [[A]] to <2 x i32> @@ -725,7 +725,7 @@ float32x4_t test_vfmsq_laneq_f32(float32x4_t a, float32x4_t b, float32x4_t v) { // CIR: [[NEG:%.*]] = cir.fneg %{{.*}} : !cir.vector<4 x !cir.float> // CIR: [[LANE:%.*]] = cir.vec.shuffle(%{{.*}}, %{{.*}} : !cir.vector<4 x !cir.float>) [#cir.int<3> : !s32i, #cir.int<3> : !s32i, #cir.int<3> : !s32i, #cir.int<3> : !s32i] : !cir.vector<4 x !cir.float> -// CIR: cir.call_llvm_intrinsic "fma" [[LANE]], %{{.*}}, %{{.*}} : (!cir.vector<4 x !cir.float>, !cir.vector<4 x !cir.float>, !cir.vector<4 x !cir.float>) -> !cir.vector<4 x !cir.float> +// CIR: cir.fma [[LANE]], %{{.*}}, %{{.*}} : !cir.vector<4 x !cir.float> // LLVM-SAME: <4 x float> {{.*}} [[A:%.*]], <4 x float> {{.*}} [[B:%.*]], <4 x float> {{.*}} [[V:%.*]]) {{.*}} { // LLVM: [[A_I:%.*]] = bitcast <4 x float> [[A]] to <4 x i32> @@ -749,7 +749,7 @@ float64x2_t test_vfmsq_laneq_f64(float64x2_t a, float64x2_t b, float64x2_t v) { // CIR: [[NEG:%.*]] = cir.fneg %{{.*}} : !cir.vector<2 x !cir.double> // CIR: [[LANE:%.*]] = cir.vec.shuffle(%{{.*}}, %{{.*}} : !cir.vector<2 x !cir.double>) [#cir.int<1> : !s32i, #cir.int<1> : !s32i] : !cir.vector<2 x !cir.double> -// CIR: cir.call_llvm_intrinsic "fma" [[LANE]], %{{.*}}, %{{.*}} : (!cir.vector<2 x !cir.double>, !cir.vector<2 x !cir.double>, !cir.vector<2 x !cir.double>) -> !cir.vector<2 x !cir.double> +// CIR: cir.fma [[LANE]], %{{.*}}, %{{.*}} : !cir.vector<2 x !cir.double> // LLVM-SAME: <2 x double> {{.*}} [[A:%.*]], <2 x double> {{.*}} [[B:%.*]], <2 x double> {{.*}} [[V:%.*]]) {{.*}} { // LLVM: [[A_I:%.*]] = bitcast <2 x double> [[A]] to <2 x i64> @@ -773,7 +773,7 @@ float32x4_t test_vfmsq_laneq_f32_0(float32x4_t a, float32x4_t b, float32x4_t v) { // CIR: [[NEG:%.*]] = cir.fneg %{{.*}} : !cir.vector<4 x !cir.float> // CIR: [[LANE:%.*]] = cir.vec.shuffle(%{{.*}}, %{{.*}} : !cir.vector<4 x !cir.float>) [#cir.int<0> : !s32i, #cir.int<0> : !s32i, #cir.int<0> : !s32i, #cir.int<0> : !s32i] : !cir.vector<4 x !cir.float> -// CIR: cir.call_llvm_intrinsic "fma" [[LANE]], %{{.*}}, %{{.*}} : (!cir.vector<4 x !cir.float>, !cir.vector<4 x !cir.float>, !cir.vector<4 x !cir.float>) -> !cir.vector<4 x !cir.float> +// CIR: cir.fma [[LANE]], %{{.*}}, %{{.*}} : !cir.vector<4 x !cir.float> // LLVM-SAME: <4 x float> {{.*}} [[A:%.*]], <4 x float> {{.*}} [[B:%.*]], <4 x float> {{.*}} [[V:%.*]]) {{.*}} { // LLVM: [[A_I:%.*]] = bitcast <4 x float> [[A]] to <4 x i32> @@ -797,7 +797,7 @@ float64x2_t test_vfmsq_laneq_f64_0(float64x2_t a, float64x2_t b, float64x2_t v) { // CIR: [[NEG:%.*]] = cir.fneg %{{.*}} : !cir.vector<2 x !cir.double> // CIR: [[LANE:%.*]] = cir.vec.shuffle(%{{.*}}, %{{.*}} : !cir.vector<2 x !cir.double>) [#cir.int<0> : !s32i, #cir.int<0> : !s32i] : !cir.vector<2 x !cir.double> -// CIR: cir.call_llvm_intrinsic "fma" [[LANE]], %{{.*}}, %{{.*}} : (!cir.vector<2 x !cir.double>, !cir.vector<2 x !cir.double>, !cir.vector<2 x !cir.double>) -> !cir.vector<2 x !cir.double> +// CIR: cir.fma [[LANE]], %{{.*}}, %{{.*}} : !cir.vector<2 x !cir.double> // LLVM-SAME: <2 x double> {{.*}} [[A:%.*]], <2 x double> {{.*}} [[B:%.*]], <2 x double> {{.*}} [[V:%.*]]) {{.*}} { // LLVM: [[A_I:%.*]] = bitcast <2 x double> [[A]] to <2 x i64> @@ -820,7 +820,7 @@ float64x2_t test_vfmsq_laneq_f64_0(float64x2_t a, float64x2_t b, float32_t test_vfmss_lane_f32(float32_t a, float32_t b, float32x2_t c) { // CIR: [[NEG:%.*]] = cir.fneg %{{.*}} : !cir.float // CIR: [[LANE:%.*]] = cir.vec.extract %{{.*}}[%{{.*}} : !u64i] : !cir.vector<2 x !cir.float> -// CIR: cir.call_llvm_intrinsic "fma" %{{.*}}, [[LANE]], %{{.*}} : (!cir.float, !cir.float, !cir.float) -> !cir.float +// CIR: cir.fma %{{.*}}, [[LANE]], %{{.*}} : !cir.float // LLVM-SAME: float {{.*}} [[A:%.*]], float {{.*}} [[B:%.*]], <2 x float> {{.*}} [[C:%.*]]) {{.*}} { // LLVM: [[NEG:%.*]] = fneg float [[B]] @@ -834,7 +834,7 @@ float32_t test_vfmss_lane_f32(float32_t a, float32_t b, float32x2_t c) { float32_t test_vfmss_laneq_f32(float32_t a, float32_t b, float32x4_t c) { // CIR: [[NEG:%.*]] = cir.fneg %{{.*}} : !cir.float // CIR: [[LANE:%.*]] = cir.vec.extract %{{.*}}[%{{.*}} : !u64i] : !cir.vector<4 x !cir.float> -// CIR: cir.call_llvm_intrinsic "fma" %{{.*}}, [[LANE]], %{{.*}} : (!cir.float, !cir.float, !cir.float) -> !cir.float +// CIR: cir.fma %{{.*}}, [[LANE]], %{{.*}} : !cir.float // LLVM-SAME: float {{.*}} [[A:%.*]], float {{.*}} [[B:%.*]], <4 x float> {{.*}} [[C:%.*]]) {{.*}} { // LLVM: [[NEG:%.*]] = fneg float [[B]] @@ -848,7 +848,7 @@ float32_t test_vfmss_laneq_f32(float32_t a, float32_t b, float32x4_t c) { float64_t test_vfmsd_lane_f64(float64_t a, float64_t b, float64x1_t c) { // CIR: [[NEG:%.*]] = cir.fneg %{{.*}} : !cir.double // CIR: [[LANE:%.*]] = cir.vec.extract %{{.*}}[%{{.*}} : !u64i] : !cir.vector<1 x !cir.double> -// CIR: cir.call_llvm_intrinsic "fma" %{{.*}}, [[LANE]], %{{.*}} : (!cir.double, !cir.double, !cir.double) -> !cir.double +// CIR: cir.fma %{{.*}}, [[LANE]], %{{.*}} : !cir.double // LLVM-SAME: double {{.*}} [[A:%.*]], double {{.*}} [[B:%.*]], <1 x double> {{.*}} [[C:%.*]]) {{.*}} { // LLVM: [[NEG:%.*]] = fneg double [[B]] @@ -862,7 +862,7 @@ float64_t test_vfmsd_lane_f64(float64_t a, float64_t b, float64x1_t c) { float64_t test_vfmsd_laneq_f64(float64_t a, float64_t b, float64x2_t c) { // CIR: [[NEG:%.*]] = cir.fneg %{{.*}} : !cir.double // CIR: [[LANE:%.*]] = cir.vec.extract %{{.*}}[%{{.*}} : !u64i] : !cir.vector<2 x !cir.double> -// CIR: cir.call_llvm_intrinsic "fma" %{{.*}}, [[LANE]], %{{.*}} : (!cir.double, !cir.double, !cir.double) -> !cir.double +// CIR: cir.fma %{{.*}}, [[LANE]], %{{.*}} : !cir.double // LLVM-SAME: double {{.*}} [[A:%.*]], double {{.*}} [[B:%.*]], <2 x double> {{.*}} [[C:%.*]]) {{.*}} { // LLVM: [[NEG:%.*]] = fneg double [[B]] diff --git a/clang/test/CodeGen/AArch64/neon/intrinsics.c b/clang/test/CodeGen/AArch64/neon/intrinsics.c index 0bef9c0e11cd9..d401a3223d926 100644 --- a/clang/test/CodeGen/AArch64/neon/intrinsics.c +++ b/clang/test/CodeGen/AArch64/neon/intrinsics.c @@ -1749,7 +1749,7 @@ float64x2_t test_vmaxnmq_f64(float64x2_t v1, float64x2_t v2) { // LLVM-LABEL: @test_vsqrt_f32( // CIR-LABEL: @vsqrt_f32( float32x2_t test_vsqrt_f32(float32x2_t a) { -// CIR: cir.call_llvm_intrinsic "sqrt" %{{.*}} : (!cir.vector<2 x !cir.float>) -> !cir.vector<2 x !cir.float> +// CIR: cir.sqrt %{{.*}} : !cir.vector<2 x !cir.float> // LLVM-SAME: <2 x float> {{.*}} [[A:%.*]]) {{.*}} { // LLVM: [[TMP0:%.*]] = bitcast <2 x float> [[A]] to <2 x i32> @@ -1763,7 +1763,7 @@ float32x2_t test_vsqrt_f32(float32x2_t a) { // LLVM-LABEL: @test_vsqrtq_f32( // CIR-LABEL: @vsqrtq_f32( float32x4_t test_vsqrtq_f32(float32x4_t a) { -// CIR: cir.call_llvm_intrinsic "sqrt" %{{.*}} : (!cir.vector<4 x !cir.float>) -> !cir.vector<4 x !cir.float> +// CIR: cir.sqrt %{{.*}} : !cir.vector<4 x !cir.float> // LLVM-SAME: <4 x float> {{.*}} [[A:%.*]]) {{.*}} { // LLVM: [[TMP0:%.*]] = bitcast <4 x float> [[A]] to <4 x i32> @@ -1777,7 +1777,7 @@ float32x4_t test_vsqrtq_f32(float32x4_t a) { // LLVM-LABEL: @test_vsqrt_f64( // CIR-LABEL: @vsqrt_f64( float64x1_t test_vsqrt_f64(float64x1_t a) { -// CIR: cir.call_llvm_intrinsic "sqrt" %{{.*}} : (!cir.vector<1 x !cir.double>) -> !cir.vector<1 x !cir.double> +// CIR: cir.sqrt %{{.*}} : !cir.vector<1 x !cir.double> // LLVM-SAME: <1 x double> {{.*}} [[A:%.*]]) {{.*}} { // LLVM: [[TMP0:%.*]] = bitcast <1 x double> [[A]] to i64 @@ -1792,7 +1792,7 @@ float64x1_t test_vsqrt_f64(float64x1_t a) { // LLVM-LABEL: @test_vsqrtq_f64( // CIR-LABEL: @vsqrtq_f64( float64x2_t test_vsqrtq_f64(float64x2_t a) { -// CIR: cir.call_llvm_intrinsic "sqrt" %{{.*}} : (!cir.vector<2 x !cir.double>) -> !cir.vector<2 x !cir.double> +// CIR: cir.sqrt %{{.*}} : !cir.vector<2 x !cir.double> // LLVM-SAME: <2 x double> {{.*}} [[A:%.*]]) {{.*}} { // LLVM: [[TMP0:%.*]] = bitcast <2 x double> [[A]] to <2 x i64> _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
