Ejemplo n.º 1
0
int
main (void)
{
  int64_t arg1;
  int32_t arg2;
  int32x4_t arg3;
  int64_t actual;
  int64_t expected;

  arg1 = 140733193453567LL;
  arg2 = 25544;
  arg3 = vcombine_s32 (vcreate_s32 (0x417b8000ffff8397LL),
                       vcreate_s32 (0x7fffffff58488000LL));


  actual = vqdmlsls_laneq_s32 (arg1, arg2, arg3, 3);
  expected = 31022548895631LL;

  if (expected != actual)
    abort ();

  return 0;
}
// CHECK-LABEL: define i64 @test_vqdmlsls_laneq_s32(i64 %a, i32 %b, <4 x i32> %c) #0 {
// CHECK:   [[TMP0:%.*]] = bitcast <4 x i32> %c to <16 x i8>
// CHECK:   [[TMP1:%.*]] = bitcast <16 x i8> [[TMP0]] to <4 x i32>
// CHECK:   [[LANE:%.*]] = extractelement <4 x i32> [[TMP1]], i32 3
// CHECK:   [[VQDMLXL:%.*]] = call i64 @llvm.aarch64.neon.sqdmulls.scalar(i32 %b, i32 [[LANE]])
// CHECK:   [[VQDMLXL1:%.*]] = call i64 @llvm.aarch64.neon.sqsub.i64(i64 %a, i64 [[VQDMLXL]])
// CHECK:   ret i64 [[VQDMLXL1]]
int64_t test_vqdmlsls_laneq_s32(int64_t a, int32_t b, int32x4_t c) {
  return vqdmlsls_laneq_s32(a, b, c, 3);
}
// CHECK-LABEL: test_vqdmlsls_laneq_s32
int64_t test_vqdmlsls_laneq_s32(int64_t a, int32_t b, int32x4_t c) {
  return vqdmlsls_laneq_s32(a, b, c, 3);
// CHECK: sqdmlsl {{d[0-9]+}}, {{s[0-9]+}}, {{v[0-9]+}}.s[3]
}