Ejemplo n.º 1
0
static void
bmi_test()
{
  unsigned i;
  long long src = 0xfacec0ffeefacec0;
  long long res, res_ref;

  for (i=0; i<5; ++i) {
    src = i + src << i;

    res_ref = calc_blsr_u64 (src, src);
    res = __blsr_u64 (src);

    if (res != res_ref)
      abort();
  }
}
Ejemplo n.º 2
0
unsigned long long test__blsr_u64(unsigned long long __X) {
  // CHECK-LABEL: test__blsr_u64
  // CHECK: sub i64 %{{.*}}, 1
  // CHECK: and i64 %{{.*}}, %{{.*}}
  return __blsr_u64(__X);
}
Ejemplo n.º 3
0
unsigned long long test__blsr_u64(unsigned long long __X) {
  // CHECK: [[DEST:%.*]] = add i64 [[SRC:%.*]], -1
  // CHECK-NEXT: %{{.*}} = and i64 [[DEST]], [[SRC]]
  return __blsr_u64(__X);
}