paperchalice 26ac669101
[LLVM] Remove "no-nans-fp-math" attribute support (#186285)
Now all `NoNaNsFPMath` uses have been removed, remove this attribute.
2026-03-13 09:29:28 +00:00

39 lines
1.0 KiB
LLVM

; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc < %s -mtriple=i686-unknown-unknown -mattr=-sse,-sse2,-sse3 | FileCheck %s --check-prefix=X87
; RUN: llc < %s -mtriple=x86_64-unknown-unknown | FileCheck %s --check-prefix=X64
declare float @llvm.fabs.f32(float)
declare x86_fp80 @llvm.fabs.f80(x86_fp80)
define float @test1(float %X) {
; X87-LABEL: test1:
; X87: # %bb.0:
; X87-NEXT: flds {{[0-9]+}}(%esp)
; X87-NEXT: fabs
; X87-NEXT: retl
;
; X64-LABEL: test1:
; X64: # %bb.0:
; X64-NEXT: andps {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0
; X64-NEXT: retq
%Y = call float @llvm.fabs.f32(float %X) readnone
ret float %Y
}
define x86_fp80 @test2(x86_fp80 %X) {
; X87-LABEL: test2:
; X87: # %bb.0:
; X87-NEXT: fldt {{[0-9]+}}(%esp)
; X87-NEXT: fabs
; X87-NEXT: retl
;
; X64-LABEL: test2:
; X64: # %bb.0:
; X64-NEXT: fldt {{[0-9]+}}(%rsp)
; X64-NEXT: fabs
; X64-NEXT: retq
%Y = call x86_fp80 @llvm.fabs.f80(x86_fp80 %X) readnone
ret x86_fp80 %Y
}