Skip to content

[CIR][CIRGen][Builtin][Neon] Lower vmaxnmv_f32 #1544

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 1, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion clang/lib/CIR/CodeGen/CIRGenBuiltinAArch64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
17 changes: 11 additions & 6 deletions clang/test/CIR/CodeGen/AArch64/neon.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 x 2>) -> !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)
Expand Down
Loading