Skip to content
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
4 changes: 2 additions & 2 deletions clang/lib/CIR/CodeGen/CIRGenBuiltinAArch64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2813,9 +2813,9 @@ static mlir::Value emitCommonNeonSISDBuiltinExpr(
return emitNeonCall(builder, {argTy}, ops, "aarch64.neon.uminv", resultTy,
loc);
case NEON::BI__builtin_neon_vminvq_f32:
llvm_unreachable(" neon_vminvq_f32 NYI ");
case NEON::BI__builtin_neon_vminvq_f64:
llvm_unreachable(" neon_vminvq_f64 NYI ");
return emitNeonCall(builder, {argTy}, ops, "aarch64.neon.fminv", resultTy,
loc);
case NEON::BI__builtin_neon_vminvq_s32:
llvm_unreachable(" neon_vminvq_s32 NYI ");
case NEON::BI__builtin_neon_vminvq_u32:
Expand Down
29 changes: 23 additions & 6 deletions clang/test/CIR/CodeGen/AArch64/neon.c
Original file line number Diff line number Diff line change
Expand Up @@ -18788,12 +18788,17 @@ float64_t test_vmaxvq_f64(float64x2_t a) {
// return vminv_f32(a);
// }

// NYI-LABEL: @test_vminvq_f64(
// NYI: [[VMINVQ_F64_I:%.*]] = call double @llvm.aarch64.neon.fminv.f64.v2f64(<2 x double> %a)
// NYI: ret double [[VMINVQ_F64_I]]
// float64_t test_vminvq_f64(float64x2_t a) {
// return vminvq_f64(a);
// }
float64_t test_vminvq_f64(float64x2_t a) {
return vminvq_f64(a);

// CIR-LABEL: vminvq_f64
// CIR: cir.llvm.intrinsic "aarch64.neon.fminv" {{%.*}} : (!cir.vector<!cir.double x 2>) -> !cir.double

// LLVM-LABEL: @test_vminvq_f64
// LLVM-SAME: (<2 x double> [[a:%.*]])
// LLVM: [[VMINVQ_F64_I:%.*]] = call double @llvm.aarch64.neon.fminv.f64.v2f64(<2 x double> [[a]])
// LLVM: ret double [[VMINVQ_F64_I]]
}


float32_t test_vmaxnmvq_f32(float32x4_t a) {
Expand Down Expand Up @@ -19281,6 +19286,18 @@ uint32_t test_vminv_u32(uint32x2_t a) {
// LLVM: ret i32 [[VMINV_U32_I]]
}

float32_t test_vminvq_f32(float32x4_t a) {
return vminvq_f32(a);

// CIR-LABEL: vminvq_f32
// CIR: cir.llvm.intrinsic "aarch64.neon.fminv" {{%.*}} : (!cir.vector<!cir.float x 4>) -> !cir.float

// LLVM-LABEL: @test_vminvq_f32
// LLVM-SAME: (<4 x float> [[a:%.*]])
// LLVM: [[VMINVQ_F32_I:%.*]] = call float @llvm.aarch64.neon.fminv.f32.v4f32(<4 x float> [[a]])
// LLVM: ret float [[VMINVQ_F32_I]]
}

int32_t test_vmaxv_s32(int32x2_t a) {
return vmaxv_s32(a);

Expand Down
Loading