Esempio n. 1
0
// Branch if any lane of V0 is non-zero; 128 bit => max
unsigned anyNonZero128(uint16x8_t a) {
// CHECK: anyNonZero128:
// CHECK: umaxv.16b b[[REGNO1:[0-9]+]], v0
// CHECK-NEXT: fmov w[[REGNO2:[0-9]+]], s[[REGNO1]]
// CHECK-NEXT: cbz w[[REGNO2]], [[LABEL:[.A-Z_0-9]+]]
// CHECK: [[LABEL]]:
// CHECK-NEXT: movz w0, #0
  if (vmaxvq_u8(a))
    return bar();
  return 0;
}
Esempio n. 2
0
// Branch if all lanes of V0 are zero; 128 bit => !max
unsigned allZero128(uint16x8_t a) {
// CHECK: allZero128:
// CHECK: umaxv.16b b[[REGNO1:[0-9]+]], v0
// CHECK-NEXT: fmov w[[REGNO2:[0-9]+]], s[[REGNO1]]
// CHECK-NEXT: cbz w[[REGNO2]], [[LABEL:[.A-Z_0-9]+]]
// CHECK: [[LABEL]]:
// CHECK-NEXT: b {{_bar|bar}}
  if (!vmaxvq_u8(a))
    return bar();
  return 0;
}
Esempio n. 3
0
// CHECK-LABEL: define i8 @test_vmaxvq_u8(<16 x i8> %a) #0 {
// CHECK:   [[VMAXV_I:%.*]] = call i32 @llvm.aarch64.neon.umaxv.i32.v16i8(<16 x i8> %a) #2
// CHECK:   [[TMP0:%.*]] = trunc i32 [[VMAXV_I]] to i8
// CHECK:   ret i8 [[TMP0]]
uint8_t test_vmaxvq_u8(uint8x16_t a) {
  return vmaxvq_u8(a);
}
Esempio n. 4
0
uint8_t test_vmaxvq_u8(uint8x16_t a) {
  // CHECK-LABEL: test_vmaxvq_u8
  return vmaxvq_u8(a);
  // CHECK: umaxv {{b[0-9]+}}, {{v[0-9]+}}.16b
}