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
3 changes: 2 additions & 1 deletion clang/lib/CIR/CodeGen/CIRGenBuiltinAArch64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2786,7 +2786,8 @@ static mlir::Value emitCommonNeonSISDBuiltinExpr(
return emitNeonCall(builder, {argTy}, ops, "aarch64.neon.fmaxv", resultTy,
loc);
case NEON::BI__builtin_neon_vmaxv_s32:
llvm_unreachable(" neon_vmaxv_s32 NYI ");
return emitNeonCall(builder, {argTy}, ops, "aarch64.neon.smaxv", resultTy,
loc);
case NEON::BI__builtin_neon_vmaxv_u32:
llvm_unreachable(" neon_vmaxv_u32 NYI ");
case NEON::BI__builtin_neon_vmaxvq_f32:
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 @@ -19221,12 +19221,17 @@ float64x1_t test_vmax_f64(float64x1_t a, float64x1_t b) {
// return vminv_u32(a);
// }

// NYI-LABEL: @test_vmaxv_s32(
// NYI: [[VMAXV_S32_I:%.*]] = call i32 @llvm.aarch64.neon.smaxv.i32.v2i32(<2 x i32> %a)
// NYI: ret i32 [[VMAXV_S32_I]]
// int32_t test_vmaxv_s32(int32x2_t a) {
// return vmaxv_s32(a);
// }
int32_t test_vmaxv_s32(int32x2_t a) {
return vmaxv_s32(a);

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

// LLVM-LABEL: @test_vmaxv_s32
// LLVM-SAME: (<2 x i32> [[a:%.*]])
// LLVM: [[VMAXV_S32_I:%.*]] = call i32 @llvm.aarch64.neon.smaxv.i32.v2i32(<2 x i32> [[a]])
// LLVM: ret i32 [[VMAXV_S32_I]]
}

// NYI-LABEL: @test_vmaxv_u32(
// NYI: [[VMAXV_U32_I:%.*]] = call i32 @llvm.aarch64.neon.umaxv.i32.v2i32(<2 x i32> %a)
Expand Down
Loading