llvm/llvm/test/CodeGen/X86/GlobalISel/legalize-fneg.mir

# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
# RUN: llc -O0 -run-pass=legalizer %s -o - | FileCheck %s

--- |
  target triple = "x86_64--"
  define void @test_fneg_f32() {
  entry:
    ret void
  }
  define void @test_fneg_f64() {
  entry:
    ret void
  }
...
---
name:            test_fneg_f32
registers:
  - { id: 0, class: _ }
  - { id: 1, class: _ }
body:             |
  bb.1:
    liveins:
    ; CHECK-LABEL: name: test_fneg_f32
    ; CHECK: [[DEF:%[0-9]+]]:_(s32) = IMPLICIT_DEF
    ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 -2147483648
    ; CHECK: [[XOR:%[0-9]+]]:_(s32) = G_XOR [[DEF]], [[C]]
    ; CHECK: $edi = COPY [[XOR]](s32)
    %0(s32) = IMPLICIT_DEF
    %1(s32) = G_FNEG %0
    $edi = COPY %1
...
---
name:            test_fneg_f64
registers:
  - { id: 0, class: _ }
  - { id: 1, class: _ }
body:             |
  bb.1:
    liveins:
    ; CHECK-LABEL: name: test_fneg_f64
    ; CHECK: [[DEF:%[0-9]+]]:_(s64) = G_IMPLICIT_DEF
    ; CHECK: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 -9223372036854775808
    ; CHECK: [[XOR:%[0-9]+]]:_(s64) = G_XOR [[DEF]], [[C]]
    ; CHECK: $rdi = COPY [[XOR]](s64)
    %0(s64) = G_IMPLICIT_DEF
    %1(s64) = G_FNEG %0
    $rdi = COPY %1
...