diff --git a/clang/lib/CIR/CodeGen/CIRGenBuiltinAArch64.cpp b/clang/lib/CIR/CodeGen/CIRGenBuiltinAArch64.cpp index 548c2195ad53..88bbd3ee9bfa 100644 --- a/clang/lib/CIR/CodeGen/CIRGenBuiltinAArch64.cpp +++ b/clang/lib/CIR/CodeGen/CIRGenBuiltinAArch64.cpp @@ -2777,7 +2777,6 @@ static mlir::Value emitCommonNeonSISDBuiltinExpr( case NEON::BI__builtin_neon_vcvtxd_f32_f64: llvm_unreachable(" neon_vcvtxd_f32_f64 NYI "); case NEON::BI__builtin_neon_vmaxnmv_f32: - llvm_unreachable(" neon_vmaxnmv_f32 NYI "); case NEON::BI__builtin_neon_vmaxnmvq_f32: case NEON::BI__builtin_neon_vmaxnmvq_f64: return emitNeonCall(builder, {argTy}, ops, "aarch64.neon.fmaxnmv", resultTy, diff --git a/clang/test/CIR/CodeGen/AArch64/neon.c b/clang/test/CIR/CodeGen/AArch64/neon.c index 0ec914d20997..5f9053002bd0 100644 --- a/clang/test/CIR/CodeGen/AArch64/neon.c +++ b/clang/test/CIR/CodeGen/AArch64/neon.c @@ -18820,12 +18820,17 @@ float64_t test_vmaxnmvq_f64(float64x2_t a) { // LLVM: ret double [[VMAXNMVQ_F64_I]] } -// NYI-LABEL: @test_vmaxnmv_f32( -// NYI: [[VMAXNMV_F32_I:%.*]] = call float @llvm.aarch64.neon.fmaxnmv.f32.v2f32(<2 x float> %a) -// NYI: ret float [[VMAXNMV_F32_I]] -// float32_t test_vmaxnmv_f32(float32x2_t a) { -// return vmaxnmv_f32(a); -// } +float32_t test_vmaxnmv_f32(float32x2_t a) { + return vmaxnmv_f32(a); + + // CIR-LABEL: vmaxnmv_f32 + // CIR: cir.llvm.intrinsic "aarch64.neon.fmaxnmv" {{%.*}} : (!cir.vector) -> !cir.float + + // LLVM-LABEL: @test_vmaxnmv_f32 + // LLVM-SAME: (<2 x float> [[a:%.*]]) + // LLVM: [[VMAXNMV_F32_I:%.*]] = call float @llvm.aarch64.neon.fmaxnmv.f32.v2f32(<2 x float> [[a]]) + // LLVM: ret float [[VMAXNMV_F32_I]] +} // NYI-LABEL: @test_vminnmvq_f64( // NYI: [[VMINNMVQ_F64_I:%.*]] = call double @llvm.aarch64.neon.fminnmv.f64.v2f64(<2 x double> %a)