Changeset View
Changeset View
Standalone View
Standalone View
clang/test/CodeGen/aarch64-neon-dot-product.c
Context not available. | |||||
#include <arm_neon.h> | #include <arm_neon.h> | ||||
uint32x2_t test_vdot_u32(uint32x2_t a, uint8x8_t b, uint8x8_t c) { | uint32x2_t test_vdot_u32(uint32x2_t a, uint8x8_t b, uint8x8_t c) { | ||||
// CHECK-LABEL: define <2 x i32> @test_vdot_u32(<2 x i32> %a, <8 x i8> %b, <8 x i8> %c) | // CHECK-LABEL: define noundef <2 x i32> @test_vdot_u32(<2 x i32> noundef %a, <8 x i8> noundef %b, <8 x i8> noundef %c) | ||||
// CHECK: [[RESULT:%.*]] = call <2 x i32> @llvm.aarch64.neon.udot.v2i32.v8i8(<2 x i32> %a, <8 x i8> %b, <8 x i8> %c) | // CHECK: [[RESULT:%.*]] = call <2 x i32> @llvm.aarch64.neon.udot.v2i32.v8i8(<2 x i32> %a, <8 x i8> %b, <8 x i8> %c) | ||||
// CHECK: ret <2 x i32> [[RESULT]] | // CHECK: ret <2 x i32> [[RESULT]] | ||||
return vdot_u32(a, b, c); | return vdot_u32(a, b, c); | ||||
} | } | ||||
uint32x4_t test_vdotq_u32(uint32x4_t a, uint8x16_t b, uint8x16_t c) { | uint32x4_t test_vdotq_u32(uint32x4_t a, uint8x16_t b, uint8x16_t c) { | ||||
// CHECK-LABEL: define <4 x i32> @test_vdotq_u32(<4 x i32> %a, <16 x i8> %b, <16 x i8> %c) | // CHECK-LABEL: define noundef <4 x i32> @test_vdotq_u32(<4 x i32> noundef %a, <16 x i8> noundef %b, <16 x i8> noundef %c) | ||||
// CHECK: [[RESULT:%.*]] = call <4 x i32> @llvm.aarch64.neon.udot.v4i32.v16i8(<4 x i32> %a, <16 x i8> %b, <16 x i8> %c) | // CHECK: [[RESULT:%.*]] = call <4 x i32> @llvm.aarch64.neon.udot.v4i32.v16i8(<4 x i32> %a, <16 x i8> %b, <16 x i8> %c) | ||||
// CHECK: ret <4 x i32> [[RESULT]] | // CHECK: ret <4 x i32> [[RESULT]] | ||||
return vdotq_u32(a, b, c); | return vdotq_u32(a, b, c); | ||||
} | } | ||||
int32x2_t test_vdot_s32(int32x2_t a, int8x8_t b, int8x8_t c) { | int32x2_t test_vdot_s32(int32x2_t a, int8x8_t b, int8x8_t c) { | ||||
// CHECK-LABEL: define <2 x i32> @test_vdot_s32(<2 x i32> %a, <8 x i8> %b, <8 x i8> %c) | // CHECK-LABEL: define noundef <2 x i32> @test_vdot_s32(<2 x i32> noundef %a, <8 x i8> noundef %b, <8 x i8> noundef %c) | ||||
// CHECK: [[RESULT:%.*]] = call <2 x i32> @llvm.aarch64.neon.sdot.v2i32.v8i8(<2 x i32> %a, <8 x i8> %b, <8 x i8> %c) | // CHECK: [[RESULT:%.*]] = call <2 x i32> @llvm.aarch64.neon.sdot.v2i32.v8i8(<2 x i32> %a, <8 x i8> %b, <8 x i8> %c) | ||||
// CHECK: ret <2 x i32> [[RESULT]] | // CHECK: ret <2 x i32> [[RESULT]] | ||||
return vdot_s32(a, b, c); | return vdot_s32(a, b, c); | ||||
} | } | ||||
int32x4_t test_vdotq_s32(int32x4_t a, int8x16_t b, int8x16_t c) { | int32x4_t test_vdotq_s32(int32x4_t a, int8x16_t b, int8x16_t c) { | ||||
// CHECK-LABEL: define <4 x i32> @test_vdotq_s32(<4 x i32> %a, <16 x i8> %b, <16 x i8> %c) | // CHECK-LABEL: define noundef <4 x i32> @test_vdotq_s32(<4 x i32> noundef %a, <16 x i8> noundef %b, <16 x i8> noundef %c) | ||||
// CHECK: [[RESULT:%.*]] = call <4 x i32> @llvm.aarch64.neon.sdot.v4i32.v16i8(<4 x i32> %a, <16 x i8> %b, <16 x i8> %c) | // CHECK: [[RESULT:%.*]] = call <4 x i32> @llvm.aarch64.neon.sdot.v4i32.v16i8(<4 x i32> %a, <16 x i8> %b, <16 x i8> %c) | ||||
// CHECK: ret <4 x i32> [[RESULT]] | // CHECK: ret <4 x i32> [[RESULT]] | ||||
return vdotq_s32(a, b, c); | return vdotq_s32(a, b, c); | ||||
} | } | ||||
uint32x2_t test_vdot_lane_u32(uint32x2_t a, uint8x8_t b, uint8x8_t c) { | uint32x2_t test_vdot_lane_u32(uint32x2_t a, uint8x8_t b, uint8x8_t c) { | ||||
// CHECK-LABEL: define <2 x i32> @test_vdot_lane_u32(<2 x i32> %a, <8 x i8> %b, <8 x i8> %c) | // CHECK-LABEL: define noundef <2 x i32> @test_vdot_lane_u32(<2 x i32> noundef %a, <8 x i8> noundef %b, <8 x i8> noundef %c) | ||||
// CHECK: [[CAST1:%.*]] = bitcast <8 x i8> %c to <2 x i32> | // CHECK: [[CAST1:%.*]] = bitcast <8 x i8> %c to <2 x i32> | ||||
// CHECK: [[SHUFFLE:%.*]] = shufflevector <2 x i32> [[CAST1]], <2 x i32> undef, <2 x i32> <i32 1, i32 1> | // CHECK: [[SHUFFLE:%.*]] = shufflevector <2 x i32> [[CAST1]], <2 x i32> undef, <2 x i32> <i32 1, i32 1> | ||||
// CHECK: [[CAST2:%.*]] = bitcast <2 x i32> [[SHUFFLE]] to <8 x i8> | // CHECK: [[CAST2:%.*]] = bitcast <2 x i32> [[SHUFFLE]] to <8 x i8> | ||||
Context not available. | |||||
} | } | ||||
uint32x4_t test_vdotq_lane_u32(uint32x4_t a, uint8x16_t b, uint8x8_t c) { | uint32x4_t test_vdotq_lane_u32(uint32x4_t a, uint8x16_t b, uint8x8_t c) { | ||||
// CHECK-LABEL: define <4 x i32> @test_vdotq_lane_u32(<4 x i32> %a, <16 x i8> %b, <8 x i8> %c) | // CHECK-LABEL: define noundef <4 x i32> @test_vdotq_lane_u32(<4 x i32> noundef %a, <16 x i8> noundef %b, <8 x i8> noundef %c) | ||||
// CHECK: [[CAST1:%.*]] = bitcast <8 x i8> %c to <2 x i32> | // CHECK: [[CAST1:%.*]] = bitcast <8 x i8> %c to <2 x i32> | ||||
// CHECK: [[SHUFFLE:%.*]] = shufflevector <2 x i32> [[CAST1]], <2 x i32> undef, <4 x i32> <i32 1, i32 1, i32 1, i32 1> | // CHECK: [[SHUFFLE:%.*]] = shufflevector <2 x i32> [[CAST1]], <2 x i32> undef, <4 x i32> <i32 1, i32 1, i32 1, i32 1> | ||||
// CHECK: [[CAST2:%.*]] = bitcast <4 x i32> [[SHUFFLE]] to <16 x i8> | // CHECK: [[CAST2:%.*]] = bitcast <4 x i32> [[SHUFFLE]] to <16 x i8> | ||||
Context not available. | |||||
} | } | ||||
uint32x2_t test_vdot_laneq_u32(uint32x2_t a, uint8x8_t b, uint8x16_t c) { | uint32x2_t test_vdot_laneq_u32(uint32x2_t a, uint8x8_t b, uint8x16_t c) { | ||||
// CHECK-LABEL: define <2 x i32> @test_vdot_laneq_u32(<2 x i32> %a, <8 x i8> %b, <16 x i8> %c) | // CHECK-LABEL: define noundef <2 x i32> @test_vdot_laneq_u32(<2 x i32> noundef %a, <8 x i8> noundef %b, <16 x i8> noundef %c) | ||||
// CHECK: [[CAST1:%.*]] = bitcast <16 x i8> %c to <4 x i32> | // CHECK: [[CAST1:%.*]] = bitcast <16 x i8> %c to <4 x i32> | ||||
// CHECK: [[SHUFFLE:%.*]] = shufflevector <4 x i32> [[CAST1]], <4 x i32> undef, <2 x i32> <i32 1, i32 1> | // CHECK: [[SHUFFLE:%.*]] = shufflevector <4 x i32> [[CAST1]], <4 x i32> undef, <2 x i32> <i32 1, i32 1> | ||||
// CHECK: [[CAST2:%.*]] = bitcast <2 x i32> [[SHUFFLE]] to <8 x i8> | // CHECK: [[CAST2:%.*]] = bitcast <2 x i32> [[SHUFFLE]] to <8 x i8> | ||||
Context not available. | |||||
} | } | ||||
uint32x4_t test_vdotq_laneq_u32(uint32x4_t a, uint8x16_t b, uint8x16_t c) { | uint32x4_t test_vdotq_laneq_u32(uint32x4_t a, uint8x16_t b, uint8x16_t c) { | ||||
// CHECK-LABEL: define <4 x i32> @test_vdotq_laneq_u32(<4 x i32> %a, <16 x i8> %b, <16 x i8> %c) | // CHECK-LABEL: define noundef <4 x i32> @test_vdotq_laneq_u32(<4 x i32> noundef %a, <16 x i8> noundef %b, <16 x i8> noundef %c) | ||||
// CHECK: [[CAST1:%.*]] = bitcast <16 x i8> %c to <4 x i32> | // CHECK: [[CAST1:%.*]] = bitcast <16 x i8> %c to <4 x i32> | ||||
// CHECK: [[SHUFFLE:%.*]] = shufflevector <4 x i32> [[CAST1]], <4 x i32> undef, <4 x i32> <i32 1, i32 1, i32 1, i32 1> | // CHECK: [[SHUFFLE:%.*]] = shufflevector <4 x i32> [[CAST1]], <4 x i32> undef, <4 x i32> <i32 1, i32 1, i32 1, i32 1> | ||||
// CHECK: [[CAST2:%.*]] = bitcast <4 x i32> [[SHUFFLE]] to <16 x i8> | // CHECK: [[CAST2:%.*]] = bitcast <4 x i32> [[SHUFFLE]] to <16 x i8> | ||||
Context not available. | |||||
} | } | ||||
int32x2_t test_vdot_lane_s32(int32x2_t a, int8x8_t b, int8x8_t c) { | int32x2_t test_vdot_lane_s32(int32x2_t a, int8x8_t b, int8x8_t c) { | ||||
// CHECK-LABEL: define <2 x i32> @test_vdot_lane_s32(<2 x i32> %a, <8 x i8> %b, <8 x i8> %c) | // CHECK-LABEL: define noundef <2 x i32> @test_vdot_lane_s32(<2 x i32> noundef %a, <8 x i8> noundef %b, <8 x i8> noundef %c) | ||||
// CHECK: [[CAST1:%.*]] = bitcast <8 x i8> %c to <2 x i32> | // CHECK: [[CAST1:%.*]] = bitcast <8 x i8> %c to <2 x i32> | ||||
// CHECK: [[SHUFFLE:%.*]] = shufflevector <2 x i32> [[CAST1]], <2 x i32> undef, <2 x i32> <i32 1, i32 1> | // CHECK: [[SHUFFLE:%.*]] = shufflevector <2 x i32> [[CAST1]], <2 x i32> undef, <2 x i32> <i32 1, i32 1> | ||||
// CHECK: [[CAST2:%.*]] = bitcast <2 x i32> [[SHUFFLE]] to <8 x i8> | // CHECK: [[CAST2:%.*]] = bitcast <2 x i32> [[SHUFFLE]] to <8 x i8> | ||||
Context not available. | |||||
} | } | ||||
int32x4_t test_vdotq_lane_s32(int32x4_t a, int8x16_t b, int8x8_t c) { | int32x4_t test_vdotq_lane_s32(int32x4_t a, int8x16_t b, int8x8_t c) { | ||||
// CHECK-LABEL: define <4 x i32> @test_vdotq_lane_s32(<4 x i32> %a, <16 x i8> %b, <8 x i8> %c) | // CHECK-LABEL: define noundef <4 x i32> @test_vdotq_lane_s32(<4 x i32> noundef %a, <16 x i8> noundef %b, <8 x i8> noundef %c) | ||||
// CHECK: [[CAST1:%.*]] = bitcast <8 x i8> %c to <2 x i32> | // CHECK: [[CAST1:%.*]] = bitcast <8 x i8> %c to <2 x i32> | ||||
// CHECK: [[SHUFFLE:%.*]] = shufflevector <2 x i32> [[CAST1]], <2 x i32> undef, <4 x i32> <i32 1, i32 1, i32 1, i32 1> | // CHECK: [[SHUFFLE:%.*]] = shufflevector <2 x i32> [[CAST1]], <2 x i32> undef, <4 x i32> <i32 1, i32 1, i32 1, i32 1> | ||||
// CHECK: [[CAST2:%.*]] = bitcast <4 x i32> [[SHUFFLE]] to <16 x i8> | // CHECK: [[CAST2:%.*]] = bitcast <4 x i32> [[SHUFFLE]] to <16 x i8> | ||||
Context not available. | |||||
} | } | ||||
int32x2_t test_vdot_laneq_s32(int32x2_t a, int8x8_t b, int8x16_t c) { | int32x2_t test_vdot_laneq_s32(int32x2_t a, int8x8_t b, int8x16_t c) { | ||||
// CHECK-LABEL: define <2 x i32> @test_vdot_laneq_s32(<2 x i32> %a, <8 x i8> %b, <16 x i8> %c) | // CHECK-LABEL: define noundef <2 x i32> @test_vdot_laneq_s32(<2 x i32> noundef %a, <8 x i8> noundef %b, <16 x i8> noundef %c) | ||||
// CHECK: [[CAST1:%.*]] = bitcast <16 x i8> %c to <4 x i32> | // CHECK: [[CAST1:%.*]] = bitcast <16 x i8> %c to <4 x i32> | ||||
// CHECK: [[SHUFFLE:%.*]] = shufflevector <4 x i32> [[CAST1]], <4 x i32> undef, <2 x i32> <i32 1, i32 1> | // CHECK: [[SHUFFLE:%.*]] = shufflevector <4 x i32> [[CAST1]], <4 x i32> undef, <2 x i32> <i32 1, i32 1> | ||||
// CHECK: [[CAST2:%.*]] = bitcast <2 x i32> [[SHUFFLE]] to <8 x i8> | // CHECK: [[CAST2:%.*]] = bitcast <2 x i32> [[SHUFFLE]] to <8 x i8> | ||||
Context not available. | |||||
} | } | ||||
int32x4_t test_vdotq_laneq_s32(int32x4_t a, int8x16_t b, int8x16_t c) { | int32x4_t test_vdotq_laneq_s32(int32x4_t a, int8x16_t b, int8x16_t c) { | ||||
// CHECK-LABEL: define <4 x i32> @test_vdotq_laneq_s32(<4 x i32> %a, <16 x i8> %b, <16 x i8> %c) | // CHECK-LABEL: define noundef <4 x i32> @test_vdotq_laneq_s32(<4 x i32> noundef %a, <16 x i8> noundef %b, <16 x i8> noundef %c) | ||||
// CHECK: [[CAST1:%.*]] = bitcast <16 x i8> %c to <4 x i32> | // CHECK: [[CAST1:%.*]] = bitcast <16 x i8> %c to <4 x i32> | ||||
// CHECK: [[SHUFFLE:%.*]] = shufflevector <4 x i32> [[CAST1]], <4 x i32> undef, <4 x i32> <i32 1, i32 1, i32 1, i32 1> | // CHECK: [[SHUFFLE:%.*]] = shufflevector <4 x i32> [[CAST1]], <4 x i32> undef, <4 x i32> <i32 1, i32 1, i32 1, i32 1> | ||||
// CHECK: [[CAST2:%.*]] = bitcast <4 x i32> [[SHUFFLE]] to <16 x i8> | // CHECK: [[CAST2:%.*]] = bitcast <4 x i32> [[SHUFFLE]] to <16 x i8> | ||||
Context not available. |