Ejemplo n.º 1
0
int
main (void)
{
  int32_t arg1;
  int32x2_t arg2;
  int32_t result;
  int32_t actual;
  int32_t expected;

  arg1 = 57336;
  arg2 = vcreate_s32 (0x55897fff7fff0000ULL);
  actual = vqdmulhs_lane_s32 (arg1, arg2, 0);
  expected = 57334;

  if (expected != actual)
    {
      fprintf (stderr, "Expected: %xd, got %xd\n", expected, actual);
      abort ();
    }

  return 0;
}
// CHECK-LABEL: test_vqdmulhs_lane_s32
int32_t test_vqdmulhs_lane_s32(int32_t a, int32x2_t b) {
  return vqdmulhs_lane_s32(a, b, 1);
// CHECK: sqdmulh {{s[0-9]+}}, {{s[0-9]+}}, {{v[0-9]+}}.s[1]
}
// CHECK-LABEL: define i32 @test_vqdmulhs_lane_s32(i32 %a, <2 x i32> %b) #0 {
// CHECK:   [[TMP0:%.*]] = bitcast <2 x i32> %b to <8 x i8>
// CHECK:   [[TMP1:%.*]] = bitcast <8 x i8> [[TMP0]] to <2 x i32>
// CHECK:   [[VGET_LANE:%.*]] = extractelement <2 x i32> [[TMP1]], i32 1
// CHECK:   [[VQDMULHS_S32_I:%.*]] = call i32 @llvm.aarch64.neon.sqdmulh.i32(i32 %a, i32 [[VGET_LANE]]) #2
// CHECK:   ret i32 [[VQDMULHS_S32_I]]
int32_t test_vqdmulhs_lane_s32(int32_t a, int32x2_t b) {
  return vqdmulhs_lane_s32(a, b, 1);
}
Ejemplo n.º 4
0
int32x1_t
test_vqdmulhs_lane_s32 (int32x1_t a, int32x4_t b)
{
  return vqdmulhs_lane_s32 (a, b, 3);
}