コード例 #1
0
ファイル: vqdmlslh_laneq_s16_1.c プロジェクト: AlexMioMio/gcc
int
main (void)
{
  int32_t arg1;
  int16_t arg2;
  int16x8_t arg3;
  int32_t actual;
  int32_t expected;

  arg1 = -2147450881;
  arg2 = 32767;
  arg3 = vcombine_s16 (vcreate_s16 (0x359d7fff00007fffULL),
                       vcreate_s16 (0xe678ffff00008000ULL));

  actual = vqdmlslh_laneq_s16 (arg1, arg2, arg3, 4);
  expected = -32769;

  if (expected != actual)
    abort ();

  return 0;
}
コード例 #2
0
// CHECK-LABEL: define i32 @test_vqdmlslh_laneq_s16(i32 %a, i16 %b, <8 x i16> %c) #0 {
// CHECK:   [[TMP0:%.*]] = bitcast <8 x i16> %c to <16 x i8>
// CHECK:   [[TMP1:%.*]] = bitcast <16 x i8> [[TMP0]] to <8 x i16>
// CHECK:   [[LANE:%.*]] = extractelement <8 x i16> [[TMP1]], i32 7
// CHECK:   [[TMP2:%.*]] = insertelement <4 x i16> undef, i16 %b, i64 0
// CHECK:   [[TMP3:%.*]] = insertelement <4 x i16> undef, i16 [[LANE]], i64 0
// CHECK:   [[VQDMLXL:%.*]] = call <4 x i32> @llvm.aarch64.neon.sqdmull.v4i32(<4 x i16> [[TMP2]], <4 x i16> [[TMP3]])
// CHECK:   [[LANE0:%.*]] = extractelement <4 x i32> [[VQDMLXL]], i64 0
// CHECK:   [[VQDMLXL1:%.*]] = call i32 @llvm.aarch64.neon.sqsub.i32(i32 %a, i32 [[LANE0]])
// CHECK:   ret i32 [[VQDMLXL1]]
int32_t test_vqdmlslh_laneq_s16(int32_t a, int16_t b, int16x8_t c) {
  return vqdmlslh_laneq_s16(a, b, c, 7);
}
コード例 #3
0
// CHECK-LABEL: test_vqdmlslh_laneq_s16
int32_t test_vqdmlslh_laneq_s16(int32_t a, int16_t b, int16x8_t c) {
  return vqdmlslh_laneq_s16(a, b, c, 7);
// CHECK: sqdmlsl {{s[0-9]+|v[0-9]+.4s}}, {{h[0-9]+|v[0-9]+.4h}}, {{v[0-9]+}}.h[7]
}