llvm/llvm/test/CodeGen/AArch64/GlobalISel/lower-neon-vector-fcmp.mir

# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
# RUN: llc -mtriple aarch64 -run-pass=aarch64-postlegalizer-lowering -mattr=+fullfp16 -verify-machineinstrs %s -o - | FileCheck %s
...
---
name:            oeq
alignment:       4
legalized:       true
body:             |
  bb.0:
    liveins: $q0, $q1
    ; CHECK-LABEL: name: oeq
    ; CHECK: liveins: $q0, $q1
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: %lhs:_(<2 x s64>) = COPY $q0
    ; CHECK-NEXT: %rhs:_(<2 x s64>) = COPY $q1
    ; CHECK-NEXT: [[FCMEQ:%[0-9]+]]:_(<2 x s64>) = G_FCMEQ %lhs, %rhs(<2 x s64>)
    ; CHECK-NEXT: $q0 = COPY [[FCMEQ]](<2 x s64>)
    ; CHECK-NEXT: RET_ReallyLR implicit $q0
    %lhs:_(<2 x s64>) = COPY $q0
    %rhs:_(<2 x s64>) = COPY $q1
    %fcmp:_(<2 x s64>) = G_FCMP floatpred(oeq), %lhs(<2 x s64>), %rhs
    $q0 = COPY %fcmp(<2 x s64>)
    RET_ReallyLR implicit $q0

...
---
name:            oeq_zero
alignment:       4
legalized:       true
body:             |
  bb.0:
    liveins: $q0, $q1

    ; Should be inverted. Needs two compares.

    ; CHECK-LABEL: name: oeq_zero
    ; CHECK: liveins: $q0, $q1
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: %lhs:_(<2 x s64>) = COPY $q0
    ; CHECK-NEXT: [[FCMEQZ:%[0-9]+]]:_(<2 x s64>) = G_FCMEQZ %lhs
    ; CHECK-NEXT: $q0 = COPY [[FCMEQZ]](<2 x s64>)
    ; CHECK-NEXT: RET_ReallyLR implicit $q0
    %lhs:_(<2 x s64>) = COPY $q0
    %zero:_(s64) = G_CONSTANT i64 0
    %zero_vec:_(<2 x s64>) = G_BUILD_VECTOR %zero, %zero
    %fcmp:_(<2 x s64>) = G_FCMP floatpred(oeq), %lhs(<2 x s64>), %zero_vec
    $q0 = COPY %fcmp(<2 x s64>)
    RET_ReallyLR implicit $q0


...
---
name:            ogt
alignment:       4
legalized:       true
body:             |
  bb.0:
    liveins: $q0, $q1
    ; CHECK-LABEL: name: ogt
    ; CHECK: liveins: $q0, $q1
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: %lhs:_(<2 x s64>) = COPY $q0
    ; CHECK-NEXT: %rhs:_(<2 x s64>) = COPY $q1
    ; CHECK-NEXT: [[FCMGT:%[0-9]+]]:_(<2 x s64>) = G_FCMGT %lhs, %rhs(<2 x s64>)
    ; CHECK-NEXT: $q0 = COPY [[FCMGT]](<2 x s64>)
    ; CHECK-NEXT: RET_ReallyLR implicit $q0
    %lhs:_(<2 x s64>) = COPY $q0
    %rhs:_(<2 x s64>) = COPY $q1
    %fcmp:_(<2 x s64>) = G_FCMP floatpred(ogt), %lhs(<2 x s64>), %rhs
    $q0 = COPY %fcmp(<2 x s64>)
    RET_ReallyLR implicit $q0

...
---
name:            ogt_zero
alignment:       4
legalized:       true
body:             |
  bb.0:
    liveins: $q0, $q1
    ; CHECK-LABEL: name: ogt_zero
    ; CHECK: liveins: $q0, $q1
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: %lhs:_(<2 x s64>) = COPY $q0
    ; CHECK-NEXT: [[FCMGTZ:%[0-9]+]]:_(<2 x s64>) = G_FCMGTZ %lhs
    ; CHECK-NEXT: $q0 = COPY [[FCMGTZ]](<2 x s64>)
    ; CHECK-NEXT: RET_ReallyLR implicit $q0
    %lhs:_(<2 x s64>) = COPY $q0
    %zero:_(s64) = G_CONSTANT i64 0
    %zero_vec:_(<2 x s64>) = G_BUILD_VECTOR %zero, %zero
    %fcmp:_(<2 x s64>) = G_FCMP floatpred(ogt), %lhs(<2 x s64>), %zero_vec
    $q0 = COPY %fcmp(<2 x s64>)
    RET_ReallyLR implicit $q0

...
---
name:            oge
alignment:       4
legalized:       true
body:             |
  bb.0:
    liveins: $q0, $q1
    ; CHECK-LABEL: name: oge
    ; CHECK: liveins: $q0, $q1
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: %lhs:_(<2 x s64>) = COPY $q0
    ; CHECK-NEXT: %rhs:_(<2 x s64>) = COPY $q1
    ; CHECK-NEXT: [[FCMGE:%[0-9]+]]:_(<2 x s64>) = G_FCMGE %lhs, %rhs(<2 x s64>)
    ; CHECK-NEXT: $q0 = COPY [[FCMGE]](<2 x s64>)
    ; CHECK-NEXT: RET_ReallyLR implicit $q0
    %lhs:_(<2 x s64>) = COPY $q0
    %rhs:_(<2 x s64>) = COPY $q1
    %fcmp:_(<2 x s64>) = G_FCMP floatpred(oge), %lhs(<2 x s64>), %rhs
    $q0 = COPY %fcmp(<2 x s64>)
    RET_ReallyLR implicit $q0

...
---
name:            oge_zero
alignment:       4
legalized:       true
body:             |
  bb.0:
    liveins: $q0, $q1

    ; Should be inverted. Needs two compares.

    ; CHECK-LABEL: name: oge_zero
    ; CHECK: liveins: $q0, $q1
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: %lhs:_(<2 x s64>) = COPY $q0
    ; CHECK-NEXT: [[FCMGEZ:%[0-9]+]]:_(<2 x s64>) = G_FCMGEZ %lhs
    ; CHECK-NEXT: $q0 = COPY [[FCMGEZ]](<2 x s64>)
    ; CHECK-NEXT: RET_ReallyLR implicit $q0
    %lhs:_(<2 x s64>) = COPY $q0
    %zero:_(s64) = G_CONSTANT i64 0
    %zero_vec:_(<2 x s64>) = G_BUILD_VECTOR %zero, %zero
    %fcmp:_(<2 x s64>) = G_FCMP floatpred(oge), %lhs(<2 x s64>), %zero_vec
    $q0 = COPY %fcmp(<2 x s64>)
    RET_ReallyLR implicit $q0


...
---
name:            olt
alignment:       4
legalized:       true
body:             |
  bb.0:
    liveins: $q0, $q1
    ; CHECK-LABEL: name: olt
    ; CHECK: liveins: $q0, $q1
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: %lhs:_(<2 x s64>) = COPY $q0
    ; CHECK-NEXT: %rhs:_(<2 x s64>) = COPY $q1
    ; CHECK-NEXT: [[FCMGT:%[0-9]+]]:_(<2 x s64>) = G_FCMGT %rhs, %lhs(<2 x s64>)
    ; CHECK-NEXT: $q0 = COPY [[FCMGT]](<2 x s64>)
    ; CHECK-NEXT: RET_ReallyLR implicit $q0
    %lhs:_(<2 x s64>) = COPY $q0
    %rhs:_(<2 x s64>) = COPY $q1
    %fcmp:_(<2 x s64>) = G_FCMP floatpred(olt), %lhs(<2 x s64>), %rhs
    $q0 = COPY %fcmp(<2 x s64>)
    RET_ReallyLR implicit $q0

...
---
name:            olt_zero
alignment:       4
legalized:       true
body:             |
  bb.0:
    liveins: $q0, $q1
    ; CHECK-LABEL: name: olt_zero
    ; CHECK: liveins: $q0, $q1
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: %lhs:_(<2 x s64>) = COPY $q0
    ; CHECK-NEXT: [[FCMLTZ:%[0-9]+]]:_(<2 x s64>) = G_FCMLTZ %lhs
    ; CHECK-NEXT: $q0 = COPY [[FCMLTZ]](<2 x s64>)
    ; CHECK-NEXT: RET_ReallyLR implicit $q0
    %lhs:_(<2 x s64>) = COPY $q0
    %zero:_(s64) = G_CONSTANT i64 0
    %zero_vec:_(<2 x s64>) = G_BUILD_VECTOR %zero, %zero
    %fcmp:_(<2 x s64>) = G_FCMP floatpred(olt), %lhs(<2 x s64>), %zero_vec
    $q0 = COPY %fcmp(<2 x s64>)
    RET_ReallyLR implicit $q0

...
---
name:            ole
alignment:       4
legalized:       true
body:             |
  bb.0:
    liveins: $q0, $q1
    ; CHECK-LABEL: name: ole
    ; CHECK: liveins: $q0, $q1
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: %lhs:_(<2 x s64>) = COPY $q0
    ; CHECK-NEXT: %rhs:_(<2 x s64>) = COPY $q1
    ; CHECK-NEXT: [[FCMGE:%[0-9]+]]:_(<2 x s64>) = G_FCMGE %rhs, %lhs(<2 x s64>)
    ; CHECK-NEXT: $q0 = COPY [[FCMGE]](<2 x s64>)
    ; CHECK-NEXT: RET_ReallyLR implicit $q0
    %lhs:_(<2 x s64>) = COPY $q0
    %rhs:_(<2 x s64>) = COPY $q1
    %fcmp:_(<2 x s64>) = G_FCMP floatpred(ole), %lhs(<2 x s64>), %rhs
    $q0 = COPY %fcmp(<2 x s64>)
    RET_ReallyLR implicit $q0

...
---
name:            ole_zero
alignment:       4
legalized:       true
body:             |
  bb.0:
    liveins: $q0, $q1
    ; CHECK-LABEL: name: ole_zero
    ; CHECK: liveins: $q0, $q1
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: %lhs:_(<2 x s64>) = COPY $q0
    ; CHECK-NEXT: [[FCMLEZ:%[0-9]+]]:_(<2 x s64>) = G_FCMLEZ %lhs
    ; CHECK-NEXT: $q0 = COPY [[FCMLEZ]](<2 x s64>)
    ; CHECK-NEXT: RET_ReallyLR implicit $q0
    %lhs:_(<2 x s64>) = COPY $q0
    %zero:_(s64) = G_CONSTANT i64 0
    %zero_vec:_(<2 x s64>) = G_BUILD_VECTOR %zero, %zero
    %fcmp:_(<2 x s64>) = G_FCMP floatpred(ole), %lhs(<2 x s64>), %zero_vec
    $q0 = COPY %fcmp(<2 x s64>)
    RET_ReallyLR implicit $q0

...
---
name:            one
alignment:       4
legalized:       true
body:             |
  bb.0:
    liveins: $q0, $q1

    ; Two compares.

    ; CHECK-LABEL: name: one
    ; CHECK: liveins: $q0, $q1
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: %lhs:_(<2 x s64>) = COPY $q0
    ; CHECK-NEXT: %rhs:_(<2 x s64>) = COPY $q1
    ; CHECK-NEXT: [[FCMGT:%[0-9]+]]:_(<2 x s64>) = G_FCMGT %lhs, %rhs(<2 x s64>)
    ; CHECK-NEXT: [[FCMGT1:%[0-9]+]]:_(<2 x s64>) = G_FCMGT %rhs, %lhs(<2 x s64>)
    ; CHECK-NEXT: [[OR:%[0-9]+]]:_(<2 x s64>) = G_OR [[FCMGT1]], [[FCMGT]]
    ; CHECK-NEXT: $q0 = COPY [[OR]](<2 x s64>)
    ; CHECK-NEXT: RET_ReallyLR implicit $q0
    %lhs:_(<2 x s64>) = COPY $q0
    %rhs:_(<2 x s64>) = COPY $q1
    %fcmp:_(<2 x s64>) = G_FCMP floatpred(one), %lhs(<2 x s64>), %rhs
    $q0 = COPY %fcmp(<2 x s64>)
    RET_ReallyLR implicit $q0

...
---
name:            one_zero
alignment:       4
legalized:       true
body:             |
  bb.0:
    liveins: $q0, $q1

    ; Two compares.

    ; CHECK-LABEL: name: one_zero
    ; CHECK: liveins: $q0, $q1
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: %lhs:_(<2 x s64>) = COPY $q0
    ; CHECK-NEXT: [[FCMGTZ:%[0-9]+]]:_(<2 x s64>) = G_FCMGTZ %lhs
    ; CHECK-NEXT: [[FCMLTZ:%[0-9]+]]:_(<2 x s64>) = G_FCMLTZ %lhs
    ; CHECK-NEXT: [[OR:%[0-9]+]]:_(<2 x s64>) = G_OR [[FCMLTZ]], [[FCMGTZ]]
    ; CHECK-NEXT: $q0 = COPY [[OR]](<2 x s64>)
    ; CHECK-NEXT: RET_ReallyLR implicit $q0
    %lhs:_(<2 x s64>) = COPY $q0
    %zero:_(s64) = G_CONSTANT i64 0
    %zero_vec:_(<2 x s64>) = G_BUILD_VECTOR %zero, %zero
    %fcmp:_(<2 x s64>) = G_FCMP floatpred(one), %lhs(<2 x s64>), %zero_vec
    $q0 = COPY %fcmp(<2 x s64>)
    RET_ReallyLR implicit $q0

...
---
name:            uno
alignment:       4
legalized:       true
body:             |
  bb.0:
    liveins: $q0, $q1

    ; Should be inverted. Needs two compares.

    ; CHECK-LABEL: name: uno
    ; CHECK: liveins: $q0, $q1
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: %lhs:_(<2 x s64>) = COPY $q0
    ; CHECK-NEXT: %rhs:_(<2 x s64>) = COPY $q1
    ; CHECK-NEXT: [[FCMGE:%[0-9]+]]:_(<2 x s64>) = G_FCMGE %lhs, %rhs(<2 x s64>)
    ; CHECK-NEXT: [[FCMGT:%[0-9]+]]:_(<2 x s64>) = G_FCMGT %rhs, %lhs(<2 x s64>)
    ; CHECK-NEXT: [[OR:%[0-9]+]]:_(<2 x s64>) = G_OR [[FCMGT]], [[FCMGE]]
    ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 -1
    ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<2 x s64>) = G_BUILD_VECTOR [[C]](s64), [[C]](s64)
    ; CHECK-NEXT: [[XOR:%[0-9]+]]:_(<2 x s64>) = G_XOR [[OR]], [[BUILD_VECTOR]]
    ; CHECK-NEXT: $q0 = COPY [[XOR]](<2 x s64>)
    ; CHECK-NEXT: RET_ReallyLR implicit $q0
    %lhs:_(<2 x s64>) = COPY $q0
    %rhs:_(<2 x s64>) = COPY $q1
    %fcmp:_(<2 x s64>) = G_FCMP floatpred(uno), %lhs(<2 x s64>), %rhs
    $q0 = COPY %fcmp(<2 x s64>)
    RET_ReallyLR implicit $q0

...
---
name:            uno_zero
alignment:       4
legalized:       true
body:             |
  bb.0:
    liveins: $q0, $q1


    ; CHECK-LABEL: name: uno_zero
    ; CHECK: liveins: $q0, $q1
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: %lhs:_(<2 x s64>) = COPY $q0
    ; CHECK-NEXT: [[FCMEQ:%[0-9]+]]:_(<2 x s64>) = G_FCMEQ %lhs, %lhs(<2 x s64>)
    ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 -1
    ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<2 x s64>) = G_BUILD_VECTOR [[C]](s64), [[C]](s64)
    ; CHECK-NEXT: [[XOR:%[0-9]+]]:_(<2 x s64>) = G_XOR [[FCMEQ]], [[BUILD_VECTOR]]
    ; CHECK-NEXT: $q0 = COPY [[XOR]](<2 x s64>)
    ; CHECK-NEXT: RET_ReallyLR implicit $q0
    %lhs:_(<2 x s64>) = COPY $q0
    %zero:_(s64) = G_CONSTANT i64 0
    %zero_vec:_(<2 x s64>) = G_BUILD_VECTOR %zero, %zero
    %fcmp:_(<2 x s64>) = G_FCMP floatpred(uno), %lhs(<2 x s64>), %zero_vec
    $q0 = COPY %fcmp(<2 x s64>)
    RET_ReallyLR implicit $q0

...
---
name:            ord
alignment:       4
legalized:       true
body:             |
  bb.0:
    liveins: $q0, $q1

    ; Needs two compares. No invert.

    ; CHECK-LABEL: name: ord
    ; CHECK: liveins: $q0, $q1
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: %lhs:_(<2 x s64>) = COPY $q0
    ; CHECK-NEXT: %rhs:_(<2 x s64>) = COPY $q1
    ; CHECK-NEXT: [[FCMGE:%[0-9]+]]:_(<2 x s64>) = G_FCMGE %lhs, %rhs(<2 x s64>)
    ; CHECK-NEXT: [[FCMGT:%[0-9]+]]:_(<2 x s64>) = G_FCMGT %rhs, %lhs(<2 x s64>)
    ; CHECK-NEXT: [[OR:%[0-9]+]]:_(<2 x s64>) = G_OR [[FCMGT]], [[FCMGE]]
    ; CHECK-NEXT: $q0 = COPY [[OR]](<2 x s64>)
    ; CHECK-NEXT: RET_ReallyLR implicit $q0
    %lhs:_(<2 x s64>) = COPY $q0
    %rhs:_(<2 x s64>) = COPY $q1
    %fcmp:_(<2 x s64>) = G_FCMP floatpred(ord), %lhs(<2 x s64>), %rhs
    $q0 = COPY %fcmp(<2 x s64>)
    RET_ReallyLR implicit $q0

...
---
name:            ord_zero
alignment:       4
legalized:       true
body:             |
  bb.0:
    liveins: $q0, $q1

    ; Needs two compares. No invert.

    ; CHECK-LABEL: name: ord_zero
    ; CHECK: liveins: $q0, $q1
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: %lhs:_(<2 x s64>) = COPY $q0
    ; CHECK-NEXT: [[FCMEQ:%[0-9]+]]:_(<2 x s64>) = G_FCMEQ %lhs, %lhs(<2 x s64>)
    ; CHECK-NEXT: $q0 = COPY [[FCMEQ]](<2 x s64>)
    ; CHECK-NEXT: RET_ReallyLR implicit $q0
    %lhs:_(<2 x s64>) = COPY $q0
    %zero:_(s64) = G_CONSTANT i64 0
    %zero_vec:_(<2 x s64>) = G_BUILD_VECTOR %zero, %zero
    %fcmp:_(<2 x s64>) = G_FCMP floatpred(ord), %lhs(<2 x s64>), %zero_vec
    $q0 = COPY %fcmp(<2 x s64>)
    RET_ReallyLR implicit $q0

...
---
name:            ult
alignment:       4
legalized:       true
body:             |
  bb.0:
    liveins: $q0, $q1

    ; Should be inverted. Needs two compares.

    ; CHECK-LABEL: name: ult
    ; CHECK: liveins: $q0, $q1
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: %lhs:_(<2 x s64>) = COPY $q0
    ; CHECK-NEXT: %rhs:_(<2 x s64>) = COPY $q1
    ; CHECK-NEXT: [[FCMGE:%[0-9]+]]:_(<2 x s64>) = G_FCMGE %lhs, %rhs(<2 x s64>)
    ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 -1
    ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<2 x s64>) = G_BUILD_VECTOR [[C]](s64), [[C]](s64)
    ; CHECK-NEXT: [[XOR:%[0-9]+]]:_(<2 x s64>) = G_XOR [[FCMGE]], [[BUILD_VECTOR]]
    ; CHECK-NEXT: $q0 = COPY [[XOR]](<2 x s64>)
    ; CHECK-NEXT: RET_ReallyLR implicit $q0
    %lhs:_(<2 x s64>) = COPY $q0
    %rhs:_(<2 x s64>) = COPY $q1
    %fcmp:_(<2 x s64>) = G_FCMP floatpred(ult), %lhs(<2 x s64>), %rhs
    $q0 = COPY %fcmp(<2 x s64>)
    RET_ReallyLR implicit $q0

...
---
name:            ueq_zero
alignment:       4
legalized:       true
body:             |
  bb.0:
    liveins: $q0, $q1

    ; Should be inverted. Needs two compares.

    ; CHECK-LABEL: name: ueq_zero
    ; CHECK: liveins: $q0, $q1
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: %lhs:_(<2 x s64>) = COPY $q0
    ; CHECK-NEXT: [[FCMGEZ:%[0-9]+]]:_(<2 x s64>) = G_FCMGEZ %lhs
    ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 -1
    ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<2 x s64>) = G_BUILD_VECTOR [[C]](s64), [[C]](s64)
    ; CHECK-NEXT: [[XOR:%[0-9]+]]:_(<2 x s64>) = G_XOR [[FCMGEZ]], [[BUILD_VECTOR]]
    ; CHECK-NEXT: $q0 = COPY [[XOR]](<2 x s64>)
    ; CHECK-NEXT: RET_ReallyLR implicit $q0
    %lhs:_(<2 x s64>) = COPY $q0
    %zero:_(s64) = G_CONSTANT i64 0
    %zero_vec:_(<2 x s64>) = G_BUILD_VECTOR %zero, %zero
    %fcmp:_(<2 x s64>) = G_FCMP floatpred(ult), %lhs(<2 x s64>), %zero_vec
    $q0 = COPY %fcmp(<2 x s64>)
    RET_ReallyLR implicit $q0

...
---
name:            ule
alignment:       4
legalized:       true
body:             |
  bb.0:
    liveins: $q0, $q1

    ; Should be inverted. Needs two compares.

    ; CHECK-LABEL: name: ule
    ; CHECK: liveins: $q0, $q1
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: %lhs:_(<2 x s64>) = COPY $q0
    ; CHECK-NEXT: %rhs:_(<2 x s64>) = COPY $q1
    ; CHECK-NEXT: [[FCMGT:%[0-9]+]]:_(<2 x s64>) = G_FCMGT %lhs, %rhs(<2 x s64>)
    ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 -1
    ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<2 x s64>) = G_BUILD_VECTOR [[C]](s64), [[C]](s64)
    ; CHECK-NEXT: [[XOR:%[0-9]+]]:_(<2 x s64>) = G_XOR [[FCMGT]], [[BUILD_VECTOR]]
    ; CHECK-NEXT: $q0 = COPY [[XOR]](<2 x s64>)
    ; CHECK-NEXT: RET_ReallyLR implicit $q0
    %lhs:_(<2 x s64>) = COPY $q0
    %rhs:_(<2 x s64>) = COPY $q1
    %fcmp:_(<2 x s64>) = G_FCMP floatpred(ule), %lhs(<2 x s64>), %rhs
    $q0 = COPY %fcmp(<2 x s64>)
    RET_ReallyLR implicit $q0

...
---
name:            ule_zero
alignment:       4
legalized:       true
body:             |
  bb.0:
    liveins: $q0, $q1

    ; Should be inverted. Needs two compares.

    ; CHECK-LABEL: name: ule_zero
    ; CHECK: liveins: $q0, $q1
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: %lhs:_(<2 x s64>) = COPY $q0
    ; CHECK-NEXT: [[FCMGTZ:%[0-9]+]]:_(<2 x s64>) = G_FCMGTZ %lhs
    ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 -1
    ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<2 x s64>) = G_BUILD_VECTOR [[C]](s64), [[C]](s64)
    ; CHECK-NEXT: [[XOR:%[0-9]+]]:_(<2 x s64>) = G_XOR [[FCMGTZ]], [[BUILD_VECTOR]]
    ; CHECK-NEXT: $q0 = COPY [[XOR]](<2 x s64>)
    ; CHECK-NEXT: RET_ReallyLR implicit $q0
    %lhs:_(<2 x s64>) = COPY $q0
    %zero:_(s64) = G_CONSTANT i64 0
    %zero_vec:_(<2 x s64>) = G_BUILD_VECTOR %zero, %zero
    %fcmp:_(<2 x s64>) = G_FCMP floatpred(ule), %lhs(<2 x s64>), %zero_vec
    $q0 = COPY %fcmp(<2 x s64>)
    RET_ReallyLR implicit $q0

...
---
name:            ugt
alignment:       4
legalized:       true
body:             |
  bb.0:
    liveins: $q0, $q1

    ; Should be inverted. Needs two compares.

    ; CHECK-LABEL: name: ugt
    ; CHECK: liveins: $q0, $q1
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: %lhs:_(<2 x s64>) = COPY $q0
    ; CHECK-NEXT: %rhs:_(<2 x s64>) = COPY $q1
    ; CHECK-NEXT: [[FCMGE:%[0-9]+]]:_(<2 x s64>) = G_FCMGE %rhs, %lhs(<2 x s64>)
    ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 -1
    ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<2 x s64>) = G_BUILD_VECTOR [[C]](s64), [[C]](s64)
    ; CHECK-NEXT: [[XOR:%[0-9]+]]:_(<2 x s64>) = G_XOR [[FCMGE]], [[BUILD_VECTOR]]
    ; CHECK-NEXT: $q0 = COPY [[XOR]](<2 x s64>)
    ; CHECK-NEXT: RET_ReallyLR implicit $q0
    %lhs:_(<2 x s64>) = COPY $q0
    %rhs:_(<2 x s64>) = COPY $q1
    %fcmp:_(<2 x s64>) = G_FCMP floatpred(ugt), %lhs(<2 x s64>), %rhs
    $q0 = COPY %fcmp(<2 x s64>)
    RET_ReallyLR implicit $q0

...
---
name:            ugt_zero
alignment:       4
legalized:       true
body:             |
  bb.0:
    liveins: $q0, $q1

    ; Should be inverted. Needs two compares.

    ; CHECK-LABEL: name: ugt_zero
    ; CHECK: liveins: $q0, $q1
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: %lhs:_(<2 x s64>) = COPY $q0
    ; CHECK-NEXT: [[FCMLEZ:%[0-9]+]]:_(<2 x s64>) = G_FCMLEZ %lhs
    ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 -1
    ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<2 x s64>) = G_BUILD_VECTOR [[C]](s64), [[C]](s64)
    ; CHECK-NEXT: [[XOR:%[0-9]+]]:_(<2 x s64>) = G_XOR [[FCMLEZ]], [[BUILD_VECTOR]]
    ; CHECK-NEXT: $q0 = COPY [[XOR]](<2 x s64>)
    ; CHECK-NEXT: RET_ReallyLR implicit $q0
    %lhs:_(<2 x s64>) = COPY $q0
    %zero:_(s64) = G_CONSTANT i64 0
    %zero_vec:_(<2 x s64>) = G_BUILD_VECTOR %zero, %zero
    %fcmp:_(<2 x s64>) = G_FCMP floatpred(ugt), %lhs(<2 x s64>), %zero_vec
    $q0 = COPY %fcmp(<2 x s64>)
    RET_ReallyLR implicit $q0

...
---
name:            uge
alignment:       4
legalized:       true
body:             |
  bb.0:
    liveins: $q0, $q1

    ; Should be inverted. Needs two compares.

    ; CHECK-LABEL: name: uge
    ; CHECK: liveins: $q0, $q1
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: %lhs:_(<2 x s64>) = COPY $q0
    ; CHECK-NEXT: %rhs:_(<2 x s64>) = COPY $q1
    ; CHECK-NEXT: [[FCMGT:%[0-9]+]]:_(<2 x s64>) = G_FCMGT %rhs, %lhs(<2 x s64>)
    ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 -1
    ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<2 x s64>) = G_BUILD_VECTOR [[C]](s64), [[C]](s64)
    ; CHECK-NEXT: [[XOR:%[0-9]+]]:_(<2 x s64>) = G_XOR [[FCMGT]], [[BUILD_VECTOR]]
    ; CHECK-NEXT: $q0 = COPY [[XOR]](<2 x s64>)
    ; CHECK-NEXT: RET_ReallyLR implicit $q0
    %lhs:_(<2 x s64>) = COPY $q0
    %rhs:_(<2 x s64>) = COPY $q1
    %fcmp:_(<2 x s64>) = G_FCMP floatpred(uge), %lhs(<2 x s64>), %rhs
    $q0 = COPY %fcmp(<2 x s64>)
    RET_ReallyLR implicit $q0

...
---
name:            uge_zero
alignment:       4
legalized:       true
body:             |
  bb.0:
    liveins: $q0, $q1

    ; Should be inverted. Needs two compares.

    ; CHECK-LABEL: name: uge_zero
    ; CHECK: liveins: $q0, $q1
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: %lhs:_(<2 x s64>) = COPY $q0
    ; CHECK-NEXT: [[FCMLTZ:%[0-9]+]]:_(<2 x s64>) = G_FCMLTZ %lhs
    ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 -1
    ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<2 x s64>) = G_BUILD_VECTOR [[C]](s64), [[C]](s64)
    ; CHECK-NEXT: [[XOR:%[0-9]+]]:_(<2 x s64>) = G_XOR [[FCMLTZ]], [[BUILD_VECTOR]]
    ; CHECK-NEXT: $q0 = COPY [[XOR]](<2 x s64>)
    ; CHECK-NEXT: RET_ReallyLR implicit $q0
    %lhs:_(<2 x s64>) = COPY $q0
    %zero:_(s64) = G_CONSTANT i64 0
    %zero_vec:_(<2 x s64>) = G_BUILD_VECTOR %zero, %zero
    %fcmp:_(<2 x s64>) = G_FCMP floatpred(uge), %lhs(<2 x s64>), %zero_vec
    $q0 = COPY %fcmp(<2 x s64>)
    RET_ReallyLR implicit $q0

...
---
name:            une
alignment:       4
legalized:       true
body:             |
  bb.0:
    liveins: $q0, $q1

    ; Negated EQ.

    ; CHECK-LABEL: name: une
    ; CHECK: liveins: $q0, $q1
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: %lhs:_(<2 x s64>) = COPY $q0
    ; CHECK-NEXT: %rhs:_(<2 x s64>) = COPY $q1
    ; CHECK-NEXT: [[FCMEQ:%[0-9]+]]:_(<2 x s64>) = G_FCMEQ %lhs, %rhs(<2 x s64>)
    ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 -1
    ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<2 x s64>) = G_BUILD_VECTOR [[C]](s64), [[C]](s64)
    ; CHECK-NEXT: [[XOR:%[0-9]+]]:_(<2 x s64>) = G_XOR [[FCMEQ]], [[BUILD_VECTOR]]
    ; CHECK-NEXT: $q0 = COPY [[XOR]](<2 x s64>)
    ; CHECK-NEXT: RET_ReallyLR implicit $q0
    %lhs:_(<2 x s64>) = COPY $q0
    %rhs:_(<2 x s64>) = COPY $q1
    %fcmp:_(<2 x s64>) = G_FCMP floatpred(une), %lhs(<2 x s64>), %rhs
    $q0 = COPY %fcmp(<2 x s64>)
    RET_ReallyLR implicit $q0

...
---
name:            une_zero
alignment:       4
legalized:       true
body:             |
  bb.0:
    liveins: $q0, $q1

    ; Negated EQ.

    ; CHECK-LABEL: name: une_zero
    ; CHECK: liveins: $q0, $q1
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: %lhs:_(<2 x s64>) = COPY $q0
    ; CHECK-NEXT: [[FCMEQZ:%[0-9]+]]:_(<2 x s64>) = G_FCMEQZ %lhs
    ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 -1
    ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<2 x s64>) = G_BUILD_VECTOR [[C]](s64), [[C]](s64)
    ; CHECK-NEXT: [[XOR:%[0-9]+]]:_(<2 x s64>) = G_XOR [[FCMEQZ]], [[BUILD_VECTOR]]
    ; CHECK-NEXT: $q0 = COPY [[XOR]](<2 x s64>)
    ; CHECK-NEXT: RET_ReallyLR implicit $q0
    %lhs:_(<2 x s64>) = COPY $q0
    %zero:_(s64) = G_CONSTANT i64 0
    %zero_vec:_(<2 x s64>) = G_BUILD_VECTOR %zero, %zero
    %fcmp:_(<2 x s64>) = G_FCMP floatpred(une), %lhs(<2 x s64>), %zero_vec
    $q0 = COPY %fcmp(<2 x s64>)
    RET_ReallyLR implicit $q0

...
---
name:            lower_v8s16
alignment:       4
legalized:       true
body:             |
  bb.0:
    liveins: $q0, $q1

    ; CHECK-LABEL: name: lower_v8s16
    ; CHECK: liveins: $q0, $q1
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: %lhs:_(<8 x s16>) = COPY $q0
    ; CHECK-NEXT: %rhs:_(<8 x s16>) = COPY $q1
    ; CHECK-NEXT: [[FCMEQ:%[0-9]+]]:_(<8 x s16>) = G_FCMEQ %lhs, %rhs(<8 x s16>)
    ; CHECK-NEXT: $q0 = COPY [[FCMEQ]](<8 x s16>)
    ; CHECK-NEXT: RET_ReallyLR implicit $q0
    %lhs:_(<8 x s16>) = COPY $q0
    %rhs:_(<8 x s16>) = COPY $q1
    %fcmp:_(<8 x s16>) = G_FCMP floatpred(oeq), %lhs(<8 x s16>), %rhs
    $q0 = COPY %fcmp(<8 x s16>)
    RET_ReallyLR implicit $q0

...
---
name:            lower_v4s16
alignment:       4
legalized:       true
body:             |
  bb.0:
    liveins: $d0, $d1

    ; CHECK-LABEL: name: lower_v4s16
    ; CHECK: liveins: $d0, $d1
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: %lhs:_(<4 x s16>) = COPY $d0
    ; CHECK-NEXT: %rhs:_(<4 x s16>) = COPY $d1
    ; CHECK-NEXT: [[FCMEQ:%[0-9]+]]:_(<4 x s16>) = G_FCMEQ %lhs, %rhs(<4 x s16>)
    ; CHECK-NEXT: $d0 = COPY [[FCMEQ]](<4 x s16>)
    ; CHECK-NEXT: RET_ReallyLR implicit $d0
    %lhs:_(<4 x s16>) = COPY $d0
    %rhs:_(<4 x s16>) = COPY $d1
    %fcmp:_(<4 x s16>) = G_FCMP floatpred(oeq), %lhs(<4 x s16>), %rhs
    $d0 = COPY %fcmp(<4 x s16>)
    RET_ReallyLR implicit $d0

...
---
name:            is_not_nan
alignment:       4
legalized:       true
body:             |
  bb.0:
    liveins: $q0, $q1

    ; CHECK-LABEL: name: is_not_nan
    ; CHECK: liveins: $q0, $q1
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: %lhs:_(<4 x s32>) = COPY $q0
    ; CHECK-NEXT: [[FCMEQ:%[0-9]+]]:_(<4 x s32>) = G_FCMEQ %lhs, %lhs(<4 x s32>)
    ; CHECK-NEXT: $q0 = COPY [[FCMEQ]](<4 x s32>)
    ; CHECK-NEXT: RET_ReallyLR implicit $q0
    %lhs:_(<4 x s32>) = COPY $q0
    %zero:_(s32) = G_FCONSTANT float 0.000000e+00
    %veczero:_(<4 x s32>) = G_BUILD_VECTOR %zero, %zero, %zero, %zero
    %fcmp:_(<4 x s32>) = G_FCMP floatpred(ord), %lhs(<4 x s32>), %veczero
    $q0 = COPY %fcmp(<4 x s32>)
    RET_ReallyLR implicit $q0