Generate FMINNAN/FMINNUM/FMAXNAN/FMAXNUM from SDAGBuilder.
authorJames Molloy <james.molloy@arm.com>
Mon, 17 Aug 2015 07:13:10 +0000 (07:13 +0000)
committerJames Molloy <james.molloy@arm.com>
Mon, 17 Aug 2015 07:13:10 +0000 (07:13 +0000)
commit54a2f7b9c7d3284f7339c9d2ab0640f04949d401
treecd533e65ef1efbcb879733564eb88c4f45b6ec67
parent75f2d3768621e77427ff754a28d101fc6cecbf56
Generate FMINNAN/FMINNUM/FMAXNAN/FMAXNUM from SDAGBuilder.

These only get generated if the target supports them. If one of the variants is not legal and the other is, and it is safe to do so, the other variant will be emitted.

For example on AArch32 (V8), we have scalar fminnm but not fmin.

Fix up a couple of tests while we're here - one now produces better code, and the other was just plain wrong to start with.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245196 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
test/CodeGen/AArch64/arm64-fmax-safe.ll
test/CodeGen/ARM/vminmaxnm.ll