llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT--> @llvm/pr-subscribers-clangir Author: Vicky Nguyen (iamvickynguyen) <details> <summary>Changes</summary> Related to https://github.com/llvm/llvm-project/issues/185382 CIR lowering for load intrinsics (`vld1_*`/`vld1q_*`) (https://arm-software.github.io/acle/neon_intrinsics/advsimd.html#stride) Port tests: - `clang/test/CodeGen/AArch64/neon-intrinsics.c` - `clang/test/CodeGen/AArch64/neon-ldst-one.c` - `clang/test/CodeGen/AArch64/poly64.c` - `clang/test/CodeGen/arm-neon-vld.c` to `clang/test/CodeGen/AArch64/neon/load.c` --- Patch is 270.50 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/218319.diff 6 Files Affected: - (modified) clang/lib/CIR/CodeGen/CIRGenBuiltinAArch64.cpp (+66-14) - (modified) clang/test/CodeGen/AArch64/neon-intrinsics.c (-698) - (modified) clang/test/CodeGen/AArch64/neon-ldst-one.c (+1-743) - (added) clang/test/CodeGen/AArch64/neon/load.c (+2240) - (modified) clang/test/CodeGen/AArch64/poly64.c (-20) - (modified) clang/test/CodeGen/arm-neon-vld.c (+365-576) ``````````diff diff --git a/clang/lib/CIR/CodeGen/CIRGenBuiltinAArch64.cpp b/clang/lib/CIR/CodeGen/CIRGenBuiltinAArch64.cpp index 7f504c3f717f2..d27b40cfe7241 100644 --- a/clang/lib/CIR/CodeGen/CIRGenBuiltinAArch64.cpp +++ b/clang/lib/CIR/CodeGen/CIRGenBuiltinAArch64.cpp @@ -769,6 +769,55 @@ static cir::VectorType getIntVecFromVecTy(CIRGenBuilderTy &builder, "Unsupported element type in getVecOfIntTypeWithSameEltWidth"); } +/// The vld1_xN builtins move their data through an aggregate of N vectors. +/// Return N, or 0 if `builtinID` is not one of them. +static unsigned getNeonMultiVecCount(unsigned builtinID) { + switch (builtinID) { + default: + return 0; + case NEON::BI__builtin_neon_vld1_x2_v: + case NEON::BI__builtin_neon_vld1q_x2_v: + return 2; + case NEON::BI__builtin_neon_vld1_x3_v: + case NEON::BI__builtin_neon_vld1q_x3_v: + return 3; + case NEON::BI__builtin_neon_vld1_x4_v: + case NEON::BI__builtin_neon_vld1q_x4_v: + return 4; + } +} + +/// Return the anonymous record type `{vecTy, ..., vecTy}` (`numVecs` members) +/// modelling the struct returned by LLVM's multi-vector NEON load intrinsics. +static cir::RecordType getNeonMultiVecTy(CIRGenBuilderTy &builder, + mlir::Type vecTy, unsigned numVecs) { + llvm::SmallVector<mlir::Type> members(numVecs, vecTy); + return builder.getAnonRecordTy(members, /*packed=*/false, + cir::RecordType::getAllDataKinds(members)); +} + +/// Emit a multi-vector NEON load: call `llvmIntrinsic` on the source pointer +/// `ops[1]` and store the resulting aggregate to the destination pointer +/// `ops[0]`. Mirrors the `CreateCall` + `CreateDefaultAlignedStore` pair in +/// `EmitCommonNeonBuiltinExpr` (ARM.cpp). +static mlir::Value emitNeonMultiVecLoad(CIRGenFunction &cgf, + llvm::ArrayRef<mlir::Value> ops, + unsigned llvmIntrinsic, mlir::Type ty, + unsigned numVecs, mlir::Location loc) { + CIRGenBuilderTy &builder = cgf.getBuilder(); + cir::RecordType recTy = getNeonMultiVecTy(builder, ty, numVecs); + llvm::SmallVector<mlir::Value> srcOp = {ops[1]}; + mlir::Value result = emitNeonCall( + cgf.getCIRGenModule(), builder, {builder.getVoidPtrTy()}, srcOp, + getLLVMIntrNameNoPrefix(static_cast<llvm::Intrinsic::ID>(llvmIntrinsic)), + recTy, loc); + Address dest(builder.createPtrBitcast(ops[0], recTy), recTy, + clang::CharUnits::fromQuantity( + cgf.cgm.getDataLayout().getABITypeAlign(recTy))); + builder.createStore(loc, result, dest); + return nullptr; +} + static mlir::Value emitCommonNeonBuiltinExpr( CIRGenFunction &cgf, unsigned builtinID, unsigned llvmIntrinsic, unsigned altLLVMIntrinsic, const char *nameHint, unsigned modifier, @@ -1049,14 +1098,16 @@ static mlir::Value emitCommonNeonBuiltinExpr( 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: case NEON::BI__builtin_neon_vld1_x2_v: case NEON::BI__builtin_neon_vld1q_x2_v: case NEON::BI__builtin_neon_vld1_x3_v: case NEON::BI__builtin_neon_vld1q_x3_v: case NEON::BI__builtin_neon_vld1_x4_v: case NEON::BI__builtin_neon_vld1q_x4_v: + return emitNeonMultiVecLoad(cgf, ops, llvmIntrinsic, ty, + getNeonMultiVecCount(builtinID), loc); + case NEON::BI__builtin_neon_vld1_v: + case NEON::BI__builtin_neon_vld1q_v: case NEON::BI__builtin_neon_vld2_v: case NEON::BI__builtin_neon_vld2q_v: case NEON::BI__builtin_neon_vld3_v: @@ -2522,11 +2573,6 @@ CIRGenFunction::emitAArch64BuiltinExpr(unsigned builtinID, const CallExpr *expr, case NEON::BI__builtin_neon_vld1q_dup_v: case NEON::BI__builtin_neon_vld1_lane_v: case NEON::BI__builtin_neon_vld1q_lane_v: - cgm.errorNYI( - expr->getSourceRange(), - std::string("unimplemented AArch64 builtin argument handling ") + - getContext().BuiltinInfo.getName(builtinID)); - break; case NEON::BI__builtin_neon_vst1_v: case NEON::BI__builtin_neon_vst1q_v: case NEON::BI__builtin_neon_vst1_lane_v: @@ -3472,10 +3518,7 @@ CIRGenFunction::emitAArch64BuiltinExpr(unsigned builtinID, const CallExpr *expr, } case NEON::BI__builtin_neon_vld1_v: case NEON::BI__builtin_neon_vld1q_v: - cgm.errorNYI(expr->getSourceRange(), - std::string("unimplemented AArch64 builtin call: ") + - getContext().BuiltinInfo.getName(builtinID)); - return mlir::Value{}; + return builder.createLoad(loc, ptrOp0.withElementType(builder, ty)); case NEON::BI__builtin_neon_vst1_v: case NEON::BI__builtin_neon_vst1q_v: { ops[1] = builder.createBitcast(ops[1], ty); @@ -3483,11 +3526,20 @@ CIRGenFunction::emitAArch64BuiltinExpr(unsigned builtinID, const CallExpr *expr, return nullptr; } case NEON::BI__builtin_neon_vld1_lane_v: - case NEON::BI__builtin_neon_vld1q_lane_v: + case NEON::BI__builtin_neon_vld1q_lane_v: { + ops[1] = builder.createBitcast(ops[1], ty); + mlir::Value scalar = builder.createLoad( + loc, ptrOp0.withElementType(builder, ty.getElementType())); + return cir::VecInsertOp::create(builder, loc, ops[1], scalar, ops[2]); + } + case NEON::BI__builtin_neon_vld1_dup_v: + case NEON::BI__builtin_neon_vld1q_dup_v: { + mlir::Value scalar = builder.createLoad( + loc, ptrOp0.withElementType(builder, ty.getElementType())); + return cir::VecSplatOp::create(builder, loc, ty, scalar); + } case NEON::BI__builtin_neon_vldap1_lane_s64: case NEON::BI__builtin_neon_vldap1q_lane_s64: - case NEON::BI__builtin_neon_vld1_dup_v: - case NEON::BI__builtin_neon_vld1q_dup_v: cgm.errorNYI(expr->getSourceRange(), std::string("unimplemented AArch64 builtin call: ") + getContext().BuiltinInfo.getName(builtinID)); diff --git a/clang/test/CodeGen/AArch64/neon-intrinsics.c b/clang/test/CodeGen/AArch64/neon-intrinsics.c index 79cb1c42cd5af..8dc0b8f9a2942 100644 --- a/clang/test/CodeGen/AArch64/neon-intrinsics.c +++ b/clang/test/CodeGen/AArch64/neon-intrinsics.c @@ -5388,416 +5388,6 @@ float64_t test_vrsqrted_f64(float64_t a) { return vrsqrted_f64(a); } -// CHECK-LABEL: define dso_local <16 x i8> @test_vld1q_u8( -// CHECK-SAME: ptr noundef [[A:%.*]]) #[[ATTR0]] { -// CHECK-NEXT: [[ENTRY:.*:]] -// CHECK-NEXT: [[TMP0:%.*]] = load <16 x i8>, ptr [[A]], align 1 -// CHECK-NEXT: ret <16 x i8> [[TMP0]] -// -uint8x16_t test_vld1q_u8(uint8_t const *a) { - return vld1q_u8(a); -} - -// CHECK-LABEL: define dso_local <8 x i16> @test_vld1q_u16( -// CHECK-SAME: ptr noundef [[A:%.*]]) #[[ATTR0]] { -// CHECK-NEXT: [[ENTRY:.*:]] -// CHECK-NEXT: [[TMP0:%.*]] = load <8 x i16>, ptr [[A]], align 2 -// CHECK-NEXT: ret <8 x i16> [[TMP0]] -// -uint16x8_t test_vld1q_u16(uint16_t const *a) { - return vld1q_u16(a); -} - -// CHECK-LABEL: define dso_local <4 x i32> @test_vld1q_u32( -// CHECK-SAME: ptr noundef [[A:%.*]]) #[[ATTR0]] { -// CHECK-NEXT: [[ENTRY:.*:]] -// CHECK-NEXT: [[TMP0:%.*]] = load <4 x i32>, ptr [[A]], align 4 -// CHECK-NEXT: ret <4 x i32> [[TMP0]] -// -uint32x4_t test_vld1q_u32(uint32_t const *a) { - return vld1q_u32(a); -} - -// CHECK-LABEL: define dso_local <2 x i64> @test_vld1q_u64( -// CHECK-SAME: ptr noundef [[A:%.*]]) #[[ATTR0]] { -// CHECK-NEXT: [[ENTRY:.*:]] -// CHECK-NEXT: [[TMP0:%.*]] = load <2 x i64>, ptr [[A]], align 8 -// CHECK-NEXT: ret <2 x i64> [[TMP0]] -// -uint64x2_t test_vld1q_u64(uint64_t const *a) { - return vld1q_u64(a); -} - -// CHECK-LABEL: define dso_local <16 x i8> @test_vld1q_s8( -// CHECK-SAME: ptr noundef [[A:%.*]]) #[[ATTR0]] { -// CHECK-NEXT: [[ENTRY:.*:]] -// CHECK-NEXT: [[TMP0:%.*]] = load <16 x i8>, ptr [[A]], align 1 -// CHECK-NEXT: ret <16 x i8> [[TMP0]] -// -int8x16_t test_vld1q_s8(int8_t const *a) { - return vld1q_s8(a); -} - -// CHECK-LABEL: define dso_local <8 x i16> @test_vld1q_s16( -// CHECK-SAME: ptr noundef [[A:%.*]]) #[[ATTR0]] { -// CHECK-NEXT: [[ENTRY:.*:]] -// CHECK-NEXT: [[TMP0:%.*]] = load <8 x i16>, ptr [[A]], align 2 -// CHECK-NEXT: ret <8 x i16> [[TMP0]] -// -int16x8_t test_vld1q_s16(int16_t const *a) { - return vld1q_s16(a); -} - -// CHECK-LABEL: define dso_local <4 x i32> @test_vld1q_s32( -// CHECK-SAME: ptr noundef [[A:%.*]]) #[[ATTR0]] { -// CHECK-NEXT: [[ENTRY:.*:]] -// CHECK-NEXT: [[TMP0:%.*]] = load <4 x i32>, ptr [[A]], align 4 -// CHECK-NEXT: ret <4 x i32> [[TMP0]] -// -int32x4_t test_vld1q_s32(int32_t const *a) { - return vld1q_s32(a); -} - -// CHECK-LABEL: define dso_local <2 x i64> @test_vld1q_s64( -// CHECK-SAME: ptr noundef [[A:%.*]]) #[[ATTR0]] { -// CHECK-NEXT: [[ENTRY:.*:]] -// CHECK-NEXT: [[TMP0:%.*]] = load <2 x i64>, ptr [[A]], align 8 -// CHECK-NEXT: ret <2 x i64> [[TMP0]] -// -int64x2_t test_vld1q_s64(int64_t const *a) { - return vld1q_s64(a); -} - -// CHECK-LABEL: define dso_local <8 x half> @test_vld1q_f16( -// CHECK-SAME: ptr noundef [[A:%.*]]) #[[ATTR0]] { -// CHECK-NEXT: [[ENTRY:.*:]] -// CHECK-NEXT: [[TMP0:%.*]] = load <8 x half>, ptr [[A]], align 2 -// CHECK-NEXT: ret <8 x half> [[TMP0]] -// -float16x8_t test_vld1q_f16(float16_t const *a) { - return vld1q_f16(a); -} - -// CHECK-LABEL: define dso_local <4 x float> @test_vld1q_f32( -// CHECK-SAME: ptr noundef [[A:%.*]]) #[[ATTR0]] { -// CHECK-NEXT: [[ENTRY:.*:]] -// CHECK-NEXT: [[TMP0:%.*]] = load <4 x float>, ptr [[A]], align 4 -// CHECK-NEXT: ret <4 x float> [[TMP0]] -// -float32x4_t test_vld1q_f32(float32_t const *a) { - return vld1q_f32(a); -} - -// CHECK-LABEL: define dso_local <2 x double> @test_vld1q_f64( -// CHECK-SAME: ptr noundef [[A:%.*]]) #[[ATTR0]] { -// CHECK-NEXT: [[ENTRY:.*:]] -// CHECK-NEXT: [[TMP0:%.*]] = load <2 x double>, ptr [[A]], align 8 -// CHECK-NEXT: ret <2 x double> [[TMP0]] -// -float64x2_t test_vld1q_f64(float64_t const *a) { - return vld1q_f64(a); -} - -// CHECK-LABEL: define dso_local <16 x i8> @test_vld1q_mf8( -// CHECK-SAME: ptr noundef [[A:%.*]]) #[[ATTR0]] { -// CHECK-NEXT: [[ENTRY:.*:]] -// CHECK-NEXT: [[TMP0:%.*]] = load <16 x i8>, ptr [[A]], align 1 -// CHECK-NEXT: ret <16 x i8> [[TMP0]] -// -mfloat8x16_t test_vld1q_mf8(mfloat8_t const *a) { - return vld1q_mf8(a); -} - -// CHECK-LABEL: define dso_local <16 x i8> @test_vld1q_p8( -// CHECK-SAME: ptr noundef [[A:%.*]]) #[[ATTR0]] { -// CHECK-NEXT: [[ENTRY:.*:]] -// CHECK-NEXT: [[TMP0:%.*]] = load <16 x i8>, ptr [[A]], align 1 -// CHECK-NEXT: ret <16 x i8> [[TMP0]] -// -poly8x16_t test_vld1q_p8(poly8_t const *a) { - return vld1q_p8(a); -} - -// CHECK-LABEL: define dso_local <8 x i16> @test_vld1q_p16( -// CHECK-SAME: ptr noundef [[A:%.*]]) #[[ATTR0]] { -// CHECK-NEXT: [[ENTRY:.*:]] -// CHECK-NEXT: [[TMP0:%.*]] = load <8 x i16>, ptr [[A]], align 2 -// CHECK-NEXT: ret <8 x i16> [[TMP0]] -// -poly16x8_t test_vld1q_p16(poly16_t const *a) { - return vld1q_p16(a); -} - -// CHECK-LABEL: define dso_local <8 x i8> @test_vld1_u8( -// CHECK-SAME: ptr noundef [[A:%.*]]) #[[ATTR0]] { -// CHECK-NEXT: [[ENTRY:.*:]] -// CHECK-NEXT: [[TMP0:%.*]] = load <8 x i8>, ptr [[A]], align 1 -// CHECK-NEXT: ret <8 x i8> [[TMP0]] -// -uint8x8_t test_vld1_u8(uint8_t const *a) { - return vld1_u8(a); -} - -// CHECK-LABEL: define dso_local <4 x i16> @test_vld1_u16( -// CHECK-SAME: ptr noundef [[A:%.*]]) #[[ATTR0]] { -// CHECK-NEXT: [[ENTRY:.*:]] -// CHECK-NEXT: [[TMP0:%.*]] = load <4 x i16>, ptr [[A]], align 2 -// CHECK-NEXT: ret <4 x i16> [[TMP0]] -// -uint16x4_t test_vld1_u16(uint16_t const *a) { - return vld1_u16(a); -} - -// CHECK-LABEL: define dso_local <2 x i32> @test_vld1_u32( -// CHECK-SAME: ptr noundef [[A:%.*]]) #[[ATTR0]] { -// CHECK-NEXT: [[ENTRY:.*:]] -// CHECK-NEXT: [[TMP0:%.*]] = load <2 x i32>, ptr [[A]], align 4 -// CHECK-NEXT: ret <2 x i32> [[TMP0]] -// -uint32x2_t test_vld1_u32(uint32_t const *a) { - return vld1_u32(a); -} - -// CHECK-LABEL: define dso_local <1 x i64> @test_vld1_u64( -// CHECK-SAME: ptr noundef [[A:%.*]]) #[[ATTR0]] { -// CHECK-NEXT: [[ENTRY:.*:]] -// CHECK-NEXT: [[TMP0:%.*]] = load <1 x i64>, ptr [[A]], align 8 -// CHECK-NEXT: ret <1 x i64> [[TMP0]] -// -uint64x1_t test_vld1_u64(uint64_t const *a) { - return vld1_u64(a); -} - -// CHECK-LABEL: define dso_local <8 x i8> @test_vld1_s8( -// CHECK-SAME: ptr noundef [[A:%.*]]) #[[ATTR0]] { -// CHECK-NEXT: [[ENTRY:.*:]] -// CHECK-NEXT: [[TMP0:%.*]] = load <8 x i8>, ptr [[A]], align 1 -// CHECK-NEXT: ret <8 x i8> [[TMP0]] -// -int8x8_t test_vld1_s8(int8_t const *a) { - return vld1_s8(a); -} - -// CHECK-LABEL: define dso_local <4 x i16> @test_vld1_s16( -// CHECK-SAME: ptr noundef [[A:%.*]]) #[[ATTR0]] { -// CHECK-NEXT: [[ENTRY:.*:]] -// CHECK-NEXT: [[TMP0:%.*]] = load <4 x i16>, ptr [[A]], align 2 -// CHECK-NEXT: ret <4 x i16> [[TMP0]] -// -int16x4_t test_vld1_s16(int16_t const *a) { - return vld1_s16(a); -} - -// CHECK-LABEL: define dso_local <2 x i32> @test_vld1_s32( -// CHECK-SAME: ptr noundef [[A:%.*]]) #[[ATTR0]] { -// CHECK-NEXT: [[ENTRY:.*:]] -// CHECK-NEXT: [[TMP0:%.*]] = load <2 x i32>, ptr [[A]], align 4 -// CHECK-NEXT: ret <2 x i32> [[TMP0]] -// -int32x2_t test_vld1_s32(int32_t const *a) { - return vld1_s32(a); -} - -// CHECK-LABEL: define dso_local <1 x i64> @test_vld1_s64( -// CHECK-SAME: ptr noundef [[A:%.*]]) #[[ATTR0]] { -// CHECK-NEXT: [[ENTRY:.*:]] -// CHECK-NEXT: [[TMP0:%.*]] = load <1 x i64>, ptr [[A]], align 8 -// CHECK-NEXT: ret <1 x i64> [[TMP0]] -// -int64x1_t test_vld1_s64(int64_t const *a) { - return vld1_s64(a); -} - -// CHECK-LABEL: define dso_local <4 x half> @test_vld1_f16( -// CHECK-SAME: ptr noundef [[A:%.*]]) #[[ATTR0]] { -// CHECK-NEXT: [[ENTRY:.*:]] -// CHECK-NEXT: [[TMP0:%.*]] = load <4 x half>, ptr [[A]], align 2 -// CHECK-NEXT: ret <4 x half> [[TMP0]] -// -float16x4_t test_vld1_f16(float16_t const *a) { - return vld1_f16(a); -} - -// CHECK-LABEL: define dso_local <2 x float> @test_vld1_f32( -// CHECK-SAME: ptr noundef [[A:%.*]]) #[[ATTR0]] { -// CHECK-NEXT: [[ENTRY:.*:]] -// CHECK-NEXT: [[TMP0:%.*]] = load <2 x float>, ptr [[A]], align 4 -// CHECK-NEXT: ret <2 x float> [[TMP0]] -// -float32x2_t test_vld1_f32(float32_t const *a) { - return vld1_f32(a); -} - -// CHECK-LABEL: define dso_local <1 x double> @test_vld1_f64( -// CHECK-SAME: ptr noundef [[A:%.*]]) #[[ATTR0]] { -// CHECK-NEXT: [[ENTRY:.*:]] -// CHECK-NEXT: [[TMP0:%.*]] = load <1 x double>, ptr [[A]], align 8 -// CHECK-NEXT: ret <1 x double> [[TMP0]] -// -float64x1_t test_vld1_f64(float64_t const *a) { - return vld1_f64(a); -} - -// CHECK-LABEL: define dso_local <8 x i8> @test_vld1_mf8( -// CHECK-SAME: ptr noundef [[A:%.*]]) #[[ATTR0]] { -// CHECK-NEXT: [[ENTRY:.*:]] -// CHECK-NEXT: [[TMP0:%.*]] = load <8 x i8>, ptr [[A]], align 1 -// CHECK-NEXT: ret <8 x i8> [[TMP0]] -// -mfloat8x8_t test_vld1_mf8(mfloat8_t const *a) { - return vld1_mf8(a); -} - -// CHECK-LABEL: define dso_local <8 x i8> @test_vld1_p8( -// CHECK-SAME: ptr noundef [[A:%.*]]) #[[ATTR0]] { -// CHECK-NEXT: [[ENTRY:.*:]] -// CHECK-NEXT: [[TMP0:%.*]] = load <8 x i8>, ptr [[A]], align 1 -// CHECK-NEXT: ret <8 x i8> [[TMP0]] -// -poly8x8_t test_vld1_p8(poly8_t const *a) { - return vld1_p8(a); -} - -// CHECK-LABEL: define dso_local <4 x i16> @test_vld1_p16( -// CHECK-SAME: ptr noundef [[A:%.*]]) #[[ATTR0]] { -// CHECK-NEXT: [[ENTRY:.*:]] -// CHECK-NEXT: [[TMP0:%.*]] = load <4 x i16>, ptr [[A]], align 2 -// CHECK-NEXT: ret <4 x i16> [[TMP0]] -// -poly16x4_t test_vld1_p16(poly16_t const *a) { - return vld1_p16(a); -} - -// CHECK-LABEL: define dso_local <8 x i8> @test_vld1_u8_void( -// CHECK-SAME: ptr noundef [[A:%.*]]) #[[ATTR0]] { -// CHECK-NEXT: [[ENTRY:.*:]] -// CHECK-NEXT: [[TMP0:%.*]] = load <8 x i8>, ptr [[A]], align 1 -// CHECK-NEXT: ret <8 x i8> [[TMP0]] -// -uint8x8_t test_vld1_u8_void(void *a) { - return vld1_u8(a); -} - -// CHECK-LABEL: define dso_local <4 x i16> @test_vld1_u16_void( -// CHECK-SAME: ptr noundef [[A:%.*]]) #[[ATTR0]] { -// CHECK-NEXT: [[ENTRY:.*:]] -// CHECK-NEXT: [[TMP0:%.*]] = load <4 x i16>, ptr [[A]], align 1 -// CHECK-NEXT: ret <4 x i16> [[TMP0]] -// -uint16x4_t test_vld1_u16_void(void *a) { - return vld1_u16(a); -} - -// CHECK-LABEL: define dso_local <2 x i32> @test_vld1_u32_void( -// CHECK-SAME: ptr noundef [[A:%.*]]) #[[ATTR0]] { -// CHECK-NEXT: [[ENTRY:.*:]] -// CHECK-NEXT: [[TMP0:%.*]] = load <2 x i32>, ptr [[A]], align 1 -// CHECK-NEXT: ret <2 x i32> [[TMP0]] -// -uint32x2_t test_vld1_u32_void(void *a) { - return vld1_u32(a); -} - -// CHECK-LABEL: define dso_local <1 x i64> @test_vld1_u64_void( -// CHECK-SAME: ptr noundef [[A:%.*]]) #[[ATTR0]] { -// CHECK-NEXT: [[ENTRY:.*:]] -// CHECK-NEXT: [[TMP0:%.*]] = load <1 x i64>, ptr [[A]], align 1 -// CHECK-NEXT: ret <1 x i64> [[TMP0]] -// -uint64x1_t test_vld1_u64_void(void *a) { - return vld1_u64(a); -} - -// CHECK-LABEL: define dso_local <8 x i8> @test_vld1_s8_void( -// CHECK-SAME: ptr noundef [[A:%.*]]) #[[ATTR0]] { -// CHECK-NEXT: [[ENTRY:.*:]] -// CHECK-NEXT: [[TMP0:%.*]] = load <8 x i8>, ptr [[A]], align 1 -// CHECK-NEXT: ret <8 x i8> [[TMP0]] -// -int8x8_t test_vld1_s8_void(void *a) { - return vld1_s8(a); -} - -// CHECK-LABEL: define dso_local <4 x i16> @test_vld1_s16_void( -// CHECK-SAME: ptr noundef [[A:%.*]]) #[[ATTR0]] { -// CHECK-NEXT: [[ENTRY:.*:]] -// CHECK-NEXT: [[TMP0:%.*]] = load <4 x i16>, ptr [[A]], align 1 -// CHECK-NEXT: ret <4 x i16> [[TMP0]] -// -int16x4_t test_vld1_s16_void(void *a) { - return vld1_s16(a); -} - -// CHECK-LABEL: define dso_local <2 x i32> @test_vld1_s32_void( -// CHECK-SAME: ptr noundef [[A:%.*]]) #[[ATTR0]] { -// CHECK-NEXT: [[ENTRY:.*:]] -// CHECK-NEXT: [[TMP0:%.*]] = load <2 x i32>, ptr [[A]], align 1 -// CHECK-NEXT: ret <2 x i32> [[TMP0]] -// -int32x2_t test_vld1_s32_void(void *a) { - return vld1_s32(a); -} - -// CHECK-LABEL: define dso_local <1 x i64> @test_vld1_s64_void( -// CHECK-SAME: ptr noundef [[A:%.*]]) #[[ATTR0]] { -// CHECK-NEXT: [[ENTRY:.*:]] -// CHECK-NEXT: [[TMP0:%.*]] = load <1 x i64>, ptr [[A]], align 1 -// CHECK-NEXT: ret <1 x i64> [[TMP0]] -// -int64x1_t test_vld1_s64_void(void *a) { - return vld1_s64(a); -} - -// CHECK-LABEL: define dso_local <4 x half> @test_vld1_f16_void( -// CHECK-SAME: ptr noundef [[A:%.*]]) #[[ATTR0]] { -// CHECK-NEXT: [[ENTRY:.*:]] -// CHECK-NEXT: [[TMP0:%.*]] = load <4 x half>, ptr [[A]], align 1 -// CHECK-NEXT: ret <4 x half> [[TMP0]] -// -float16x4_t test_vld1_f16_void(void *a) { - return vld1_f16(a); -} - -// CHECK-LABEL: define dso_local <2 x float> @test_vld1_f32_void( -// CHECK-SAME: ptr noundef [[A:%.*]]) #[[ATTR0]] { -// CHECK-NEXT: [[ENTRY:.*:]] -// CHECK-NEXT: [[TMP0:%.*]] = load <2 x float>, ptr [[A]], align 1 -// CHECK-NEXT: ret <2 x float> [[TMP0]] -// -float32x2_t test_vld1_f32_void(void *a) { - return vld1_f32(a); -} - -// CHECK-LABEL: define dso_local <1 x double> @test_vld1_f64_void( -// CHECK-SAME: ptr noundef [[A:%.*]]) #[[ATTR0]] { -// CHECK-NEXT: [[ENTRY:.*:]] -// CHECK-NEXT: [[TMP0:%.*]] = load <1 x double>, ptr [[A]], align 1 -// CHECK-NEXT: ret <1 x double> [[TMP0]] -// -float64x1_t test_vld1_f64_void(void *a) { - return vld1_f64(a); -} - -// CHECK-LABEL: define dso_local <8 x i8> @test_vld1_p8_void( -// CHECK-SAME: ptr noundef [[A:%.*]]) #[[ATTR0]] { -// CHECK-NEXT: [[ENTRY:.*:]] -// CHECK-NEXT: [[TMP0:%.*]] = load <8 x i8>, ptr [[A]], align 1 -// CHECK-NEXT: ret <8 x i8> [[TMP0]] -// -poly8x8_t test_vld1_p8_void(void *a) { - return vld1_p8(a); -} - -// CHECK-LABEL: define dso_local <4 x i16> @test_vld1_p16_void( -// CHECK-SAME: ptr noundef [[A:%.*]]) #[[ATTR0]] { -// CHECK-NEXT: [[ENTRY:.*:]] -// CHECK-NEXT: [[TMP0:%.*]] = load <4 x i16>, ptr [[A]], align 1 -// CHECK-NEXT: ret <4 x i16> [[TMP0]] -// -poly16x4_t test_vld1_p16_void(void *a) { - return vld1_p16(a); -} - // CHECK-LABEL: define dso_local %struct.uint8x16x2_t @test_vld2q_u8( // CHECK-SAME: ptr noundef [[A:%.*]]) #[[ATTR0]] { // CHECK-NEXT: [[ENTRY:.*:]] @@ -7142,294 +6732,6 @@ poly16x4x4_t test_vld4_p16(poly16_t const *a) { return vld4_p16(a); } -// CHECK-LABEL: define dso_local %struct.float64x2x2_t @test_vld... [truncated] `````````` </details> https://github.com/llvm/llvm-project/pull/218319 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
