blob: 59de652d7446f839397afe6d7e6ded859400921c [file] [log] [blame]
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
# RUN: llc -O0 -run-pass=legalizer %s -o - | FileCheck %s
--- |
target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128"
target triple = "aarch64--"
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: $s0
; CHECK-LABEL: name: test_fneg_f32
; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $s0
; CHECK: [[C:%[0-9]+]]:_(s32) = G_FCONSTANT float -0.000000e+00
; CHECK: [[FSUB:%[0-9]+]]:_(s32) = G_FSUB [[C]], [[COPY]]
; CHECK: $s0 = COPY [[FSUB]](s32)
%0(s32) = COPY $s0
%1(s32) = G_FNEG %0
$s0 = COPY %1(s32)
...
---
name: test_fneg_f64
registers:
- { id: 0, class: _ }
- { id: 1, class: _ }
body: |
bb.1:
liveins: $d0
; CHECK-LABEL: name: test_fneg_f64
; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $d0
; CHECK: [[C:%[0-9]+]]:_(s64) = G_FCONSTANT double -0.000000e+00
; CHECK: [[FSUB:%[0-9]+]]:_(s64) = G_FSUB [[C]], [[COPY]]
; CHECK: $d0 = COPY [[FSUB]](s64)
%0(s64) = COPY $d0
%1(s64) = G_FNEG %0
$d0 = COPY %1(s64)
...