; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py ; RUN: llc -mtriple=aarch64--linux-gnu -mattr=+sve < %s 2>%t | FileCheck %s ; RUN: FileCheck --check-prefix=WARN --allow-empty %s <%t ; If this check fails please read test/CodeGen/AArch64/README for instructions on how to resolve it. ; WARN-NOT: warning define @oeq( %x, %x2) { ; CHECK-LABEL: oeq: ; CHECK: // %bb.0: ; CHECK-NEXT: ptrue p0.s ; CHECK-NEXT: fcmeq p0.s, p0/z, z0.s, z1.s ; CHECK-NEXT: ret %y = fcmp oeq %x, %x2 ret %y } define @ogt( %x, %x2) { ; CHECK-LABEL: ogt: ; CHECK: // %bb.0: ; CHECK-NEXT: ptrue p0.s ; CHECK-NEXT: fcmgt p0.s, p0/z, z0.s, z1.s ; CHECK-NEXT: ret %y = fcmp ogt %x, %x2 ret %y } define @oge( %x, %x2) { ; CHECK-LABEL: oge: ; CHECK: // %bb.0: ; CHECK-NEXT: ptrue p0.s ; CHECK-NEXT: fcmge p0.s, p0/z, z0.s, z1.s ; CHECK-NEXT: ret %y = fcmp oge %x, %x2 ret %y } define @olt( %x, %x2) { ; CHECK-LABEL: olt: ; CHECK: // %bb.0: ; CHECK-NEXT: ptrue p0.s ; CHECK-NEXT: fcmgt p0.s, p0/z, z1.s, z0.s ; CHECK-NEXT: ret %y = fcmp olt %x, %x2 ret %y } define @ole( %x, %x2) { ; CHECK-LABEL: ole: ; CHECK: // %bb.0: ; CHECK-NEXT: ptrue p0.s ; CHECK-NEXT: fcmge p0.s, p0/z, z1.s, z0.s ; CHECK-NEXT: ret %y = fcmp ole %x, %x2 ret %y } define @one( %x, %x2) { ; CHECK-LABEL: one: ; CHECK: // %bb.0: ; CHECK-NEXT: ptrue p0.s ; CHECK-NEXT: fcmne p0.s, p0/z, z0.s, z1.s ; CHECK-NEXT: ret %y = fcmp one %x, %x2 ret %y } define @ord( %x, %x2) { ; CHECK-LABEL: ord: ; CHECK: // %bb.0: ; CHECK-NEXT: ptrue p0.s ; CHECK-NEXT: fcmuo p1.s, p0/z, z0.s, z1.s ; CHECK-NEXT: not p0.b, p0/z, p1.b ; CHECK-NEXT: ret %y = fcmp ord %x, %x2 ret %y } define @ueq( %x, %x2) { ; CHECK-LABEL: ueq: ; CHECK: // %bb.0: ; CHECK-NEXT: ptrue p0.s ; CHECK-NEXT: fcmne p1.s, p0/z, z0.s, z1.s ; CHECK-NEXT: not p0.b, p0/z, p1.b ; CHECK-NEXT: ret %y = fcmp ueq %x, %x2 ret %y } define @ugt( %x, %x2) { ; CHECK-LABEL: ugt: ; CHECK: // %bb.0: ; CHECK-NEXT: ptrue p0.s ; CHECK-NEXT: fcmge p1.s, p0/z, z1.s, z0.s ; CHECK-NEXT: not p0.b, p0/z, p1.b ; CHECK-NEXT: ret %y = fcmp ugt %x, %x2 ret %y } define @uge( %x, %x2) { ; CHECK-LABEL: uge: ; CHECK: // %bb.0: ; CHECK-NEXT: ptrue p0.s ; CHECK-NEXT: fcmgt p1.s, p0/z, z1.s, z0.s ; CHECK-NEXT: not p0.b, p0/z, p1.b ; CHECK-NEXT: ret %y = fcmp uge %x, %x2 ret %y } define @ult( %x, %x2) { ; CHECK-LABEL: ult: ; CHECK: // %bb.0: ; CHECK-NEXT: ptrue p0.s ; CHECK-NEXT: fcmge p1.s, p0/z, z0.s, z1.s ; CHECK-NEXT: not p0.b, p0/z, p1.b ; CHECK-NEXT: ret %y = fcmp ult %x, %x2 ret %y } define @ule( %x, %x2) { ; CHECK-LABEL: ule: ; CHECK: // %bb.0: ; CHECK-NEXT: ptrue p0.s ; CHECK-NEXT: fcmgt p1.s, p0/z, z0.s, z1.s ; CHECK-NEXT: not p0.b, p0/z, p1.b ; CHECK-NEXT: ret %y = fcmp ule %x, %x2 ret %y } define @une( %x, %x2) { ; CHECK-LABEL: une: ; CHECK: // %bb.0: ; CHECK-NEXT: ptrue p0.s ; CHECK-NEXT: fcmeq p1.s, p0/z, z0.s, z1.s ; CHECK-NEXT: not p0.b, p0/z, p1.b ; CHECK-NEXT: ret %y = fcmp une %x, %x2 ret %y } define @uno( %x, %x2) { ; CHECK-LABEL: uno: ; CHECK: // %bb.0: ; CHECK-NEXT: ptrue p0.s ; CHECK-NEXT: fcmuo p0.s, p0/z, z0.s, z1.s ; CHECK-NEXT: ret %y = fcmp uno %x, %x2 ret %y } define @oeq_2f32( %x, %x2) { ; CHECK-LABEL: oeq_2f32: ; CHECK: // %bb.0: ; CHECK-NEXT: ptrue p0.d ; CHECK-NEXT: fcmeq p0.s, p0/z, z0.s, z1.s ; CHECK-NEXT: ret %y = fcmp oeq %x, %x2 ret %y } define @ueq_2f32( %x, %x2) { ; CHECK-LABEL: ueq_2f32: ; CHECK: // %bb.0: ; CHECK-NEXT: ptrue p0.d ; CHECK-NEXT: fcmne p1.s, p0/z, z0.s, z1.s ; CHECK-NEXT: not p0.b, p0/z, p1.b ; CHECK-NEXT: ret %y = fcmp ueq %x, %x2 ret %y } define @oeq_2f64( %x, %x2) { ; CHECK-LABEL: oeq_2f64: ; CHECK: // %bb.0: ; CHECK-NEXT: ptrue p0.d ; CHECK-NEXT: fcmeq p0.d, p0/z, z0.d, z1.d ; CHECK-NEXT: ret %y = fcmp oeq %x, %x2 ret %y } define @ueq_2f64( %x, %x2) { ; CHECK-LABEL: ueq_2f64: ; CHECK: // %bb.0: ; CHECK-NEXT: ptrue p0.d ; CHECK-NEXT: fcmne p1.d, p0/z, z0.d, z1.d ; CHECK-NEXT: not p0.b, p0/z, p1.b ; CHECK-NEXT: ret %y = fcmp ueq %x, %x2 ret %y } define @oeq_2f16( %x, %x2) { ; CHECK-LABEL: oeq_2f16: ; CHECK: // %bb.0: ; CHECK-NEXT: ptrue p0.d ; CHECK-NEXT: fcmeq p0.h, p0/z, z0.h, z1.h ; CHECK-NEXT: ret %y = fcmp oeq %x, %x2 ret %y } define @ueq_2f16( %x, %x2) { ; CHECK-LABEL: ueq_2f16: ; CHECK: // %bb.0: ; CHECK-NEXT: ptrue p0.d ; CHECK-NEXT: fcmne p1.h, p0/z, z0.h, z1.h ; CHECK-NEXT: not p0.b, p0/z, p1.b ; CHECK-NEXT: ret %y = fcmp ueq %x, %x2 ret %y } define @oeq_4f16( %x, %x2) { ; CHECK-LABEL: oeq_4f16: ; CHECK: // %bb.0: ; CHECK-NEXT: ptrue p0.s ; CHECK-NEXT: fcmeq p0.h, p0/z, z0.h, z1.h ; CHECK-NEXT: ret %y = fcmp oeq %x, %x2 ret %y } define @ueq_4f16( %x, %x2) { ; CHECK-LABEL: ueq_4f16: ; CHECK: // %bb.0: ; CHECK-NEXT: ptrue p0.s ; CHECK-NEXT: fcmne p1.h, p0/z, z0.h, z1.h ; CHECK-NEXT: not p0.b, p0/z, p1.b ; CHECK-NEXT: ret %y = fcmp ueq %x, %x2 ret %y } define @oeq_8f16( %x, %x2) { ; CHECK-LABEL: oeq_8f16: ; CHECK: // %bb.0: ; CHECK-NEXT: ptrue p0.h ; CHECK-NEXT: fcmeq p0.h, p0/z, z0.h, z1.h ; CHECK-NEXT: ret %y = fcmp oeq %x, %x2 ret %y } define @ueq_8f16( %x, %x2) { ; CHECK-LABEL: ueq_8f16: ; CHECK: // %bb.0: ; CHECK-NEXT: ptrue p0.h ; CHECK-NEXT: fcmne p1.h, p0/z, z0.h, z1.h ; CHECK-NEXT: not p0.b, p0/z, p1.b ; CHECK-NEXT: ret %y = fcmp ueq %x, %x2 ret %y } define @oeq_4f32_sext( %x, %x2) { ; CHECK-LABEL: oeq_4f32_sext: ; CHECK: // %bb.0: ; CHECK-NEXT: ptrue p0.s ; CHECK-NEXT: fcmeq p0.s, p0/z, z0.s, z1.s ; CHECK-NEXT: mov z0.s, p0/z, #-1 // =0xffffffffffffffff ; CHECK-NEXT: ret %y = fcmp oeq %x, %x2 %r = sext %y to ret %r } define @oeq_4f32_zext( %x, %x2) { ; CHECK-LABEL: oeq_4f32_zext: ; CHECK: // %bb.0: ; CHECK-NEXT: ptrue p0.s ; CHECK-NEXT: fcmeq p0.s, p0/z, z0.s, z1.s ; CHECK-NEXT: mov z0.s, p0/z, #1 // =0x1 ; CHECK-NEXT: ret %y = fcmp oeq %x, %x2 %r = zext %y to ret %r } define @eq_fast( %x, %x2) { ; CHECK-LABEL: eq_fast: ; CHECK: // %bb.0: ; CHECK-NEXT: ptrue p0.s ; CHECK-NEXT: fcmeq p0.s, p0/z, z0.s, z1.s ; CHECK-NEXT: ret %y = fcmp fast oeq %x, %x2 ret %y } define @gt_fast( %x, %x2) { ; CHECK-LABEL: gt_fast: ; CHECK: // %bb.0: ; CHECK-NEXT: ptrue p0.s ; CHECK-NEXT: fcmgt p0.s, p0/z, z0.s, z1.s ; CHECK-NEXT: ret %y = fcmp fast ogt %x, %x2 ret %y } define @ge_fast( %x, %x2) { ; CHECK-LABEL: ge_fast: ; CHECK: // %bb.0: ; CHECK-NEXT: ptrue p0.s ; CHECK-NEXT: fcmge p0.s, p0/z, z0.s, z1.s ; CHECK-NEXT: ret %y = fcmp fast oge %x, %x2 ret %y } define @lt_fast( %x, %x2) { ; CHECK-LABEL: lt_fast: ; CHECK: // %bb.0: ; CHECK-NEXT: ptrue p0.s ; CHECK-NEXT: fcmgt p0.s, p0/z, z1.s, z0.s ; CHECK-NEXT: ret %y = fcmp fast olt %x, %x2 ret %y } define @le_fast( %x, %x2) { ; CHECK-LABEL: le_fast: ; CHECK: // %bb.0: ; CHECK-NEXT: ptrue p0.s ; CHECK-NEXT: fcmge p0.s, p0/z, z1.s, z0.s ; CHECK-NEXT: ret %y = fcmp fast ole %x, %x2 ret %y } define @ne_fast( %x, %x2) { ; CHECK-LABEL: ne_fast: ; CHECK: // %bb.0: ; CHECK-NEXT: ptrue p0.s ; CHECK-NEXT: fcmne p0.s, p0/z, z0.s, z1.s ; CHECK-NEXT: ret %y = fcmp fast one %x, %x2 ret %y }