; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc %s -o - -verify-machineinstrs -fast-isel=true -mattr=-sse | FileCheck %s
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
define dso_local x86_fp80 @test_f80() {
; CHECK-LABEL: test_f80:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: fldz
; CHECK-NEXT: fchs
; CHECK-NEXT: retq
entry:
%fneg1 = fneg contract x86_fp80 undef
br label %exit
exit: ; preds = %entry
ret x86_fp80 %fneg1
}
define dso_local void @test_f32(ptr%p) {
; CHECK-LABEL: test_f32:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: fldz
; CHECK-NEXT: fchs
; CHECK-NEXT: fstps (%rdi)
; CHECK-NEXT: retq
entry:
%fneg1 = fneg contract float undef
br label %exit
exit: ; preds = %entry
store float %fneg1, ptr%p
ret void
}
define dso_local void @test_f64(ptr%p) {
; CHECK-LABEL: test_f64:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: fldz
; CHECK-NEXT: fchs
; CHECK-NEXT: fstpl (%rdi)
; CHECK-NEXT: retq
entry:
%fneg1 = fneg contract double undef
br label %exit
exit: ; preds = %entry
store double %fneg1, ptr%p
ret void
}