1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-26 12:43:36 +01:00
llvm-mirror/test/CodeGen/ARM/nnan-fsub.ll
Michael Berg e6a923ea4b Move three folds for FADD, FSUB and FMUL in the DAG combiner away from Unsafe to more aligned checks that reflect context
Summary: Unsafe does not map well alone for each of these three cases as it is missing NoNan context when accessed directly with clang.  I have migrated the fold guards to reflect the expectations of handing nan and zero contexts directly (NoNan, NSZ) and some tests with it.  Unsafe does include NSZ, however there is already precedent for using the target option directly to reflect that context. 

Reviewers: spatel, wristow, hfinkel, craig.topper, arsenm

Reviewed By: arsenm

Subscribers: michele.scandale, wdng, javed.absar

Differential Revision: https://reviews.llvm.org/D64450

llvm-svn: 365679
2019-07-10 18:23:26 +00:00

19 lines
389 B
LLVM

; RUN: llc -mcpu=cortex-a9 < %s | FileCheck -check-prefix=SAFE %s
; RUN: llc -mcpu=cortex-a9 --enable-no-nans-fp-math < %s | FileCheck -check-prefix=FAST %s
target triple = "armv7-apple-ios"
; SAFE: test
; FAST: test
define float @test(float %x, float %y) {
entry:
; SAFE: vmul.f32
; SAFE: vsub.f32
; FAST: mov r0, #0
%0 = fmul float %x, %y
%1 = fsub float %0, %0
ret float %1
}