1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-26 06:22:56 +02:00
llvm-mirror/lib
Sanjay Patel 37e0cc52ee [x86] inline calls to fmaxf / llvm.maxnum.f32 using maxss (PR24475)
This patch improves on the suggested codegen from PR24475:
https://llvm.org/bugs/show_bug.cgi?id=24475

but only for the fmaxf() case to start, so we can sort out any bugs before
extending to fmin, f64, and vectors.

The fmax / maxnum definitions provide us flexibility for signed zeros, so the
only thing we have to worry about in this replacement sequence is NaN handling.

Note 1: It may be better to implement this as lowerFMAXNUM(), but that exposes
a problem: SelectionDAGBuilder::visitSelect() transforms compare/select
instructions into FMAXNUM nodes if we declare FMAXNUM legal or custom. Perhaps
that should be checking for NaN inputs or global unsafe-math before transforming?
As it stands, that bypasses a big set of optimizations that the x86 backend 
already has in PerformSELECTCombine().

Note 2: The v2f32 test reveals another bug; the vector is extended to v4f32, so
we have completely unnecessary operations happening on undef elements of the 
vector.

Differential Revision: http://reviews.llvm.org/D15294

llvm-svn: 255700
2015-12-15 23:11:43 +00:00
..
Analysis AMDGPU: mark ldexp LibCalls as unavailable 2015-12-15 17:24:15 +00:00
AsmParser add fast-math-flags to 'call' instructions (PR21290) 2015-12-14 21:59:03 +00:00
Bitcode Use diagnostic handler in the LLVMContext 2015-12-14 23:17:03 +00:00
CodeGen [WinEH] Use operand bundles to describe call sites 2015-12-15 21:27:27 +00:00
DebugInfo
ExecutionEngine
Fuzzer [LibFuzzer] Introducing FUZZER_FLAG_UNSIGNED and using it for seeding. 2015-12-10 20:41:53 +00:00
IR [WinEH] Use operand bundles to describe call sites 2015-12-15 21:27:27 +00:00
IRReader
LibDriver
LineEditor
Linker Use diagnostic handler in the LLVMContext 2015-12-14 23:17:03 +00:00
LTO Use diagnostic handler in the LLVMContext 2015-12-14 23:17:03 +00:00
MC [X86][inline asm] support even directive 2015-12-13 17:07:23 +00:00
Object Use diagnostic handler in the LLVMContext 2015-12-14 23:17:03 +00:00
Option
Passes
ProfileData Initialize all bytes in vp data (msan error) 2015-12-15 21:57:08 +00:00
Support [x86] adding PKU feature flag 2015-12-15 13:35:29 +00:00
TableGen
Target [x86] inline calls to fmaxf / llvm.maxnum.f32 using maxss (PR24475) 2015-12-15 23:11:43 +00:00
Transforms Cross-DSO control flow integrity (LLVM part). 2015-12-15 23:00:08 +00:00
CMakeLists.txt
LLVMBuild.txt
Makefile