hanchenye-llvm-project/llvm/test
Stanislav Mekhanoshin 9d7b1c9ddb [AMDGPU] Always use rcp + mul with fast math
Regardless of relaxation options such as -cl-fast-relaxed-math
we are producing rather long code for fdiv via amdgcn_fdiv_fast
intrinsic. This intrinsic is used to replace fdiv with 2.5ulp
metadata and does not handle denormals, thus believed to be fast.

An fdiv instruction can also have fast math flag either by itself
or together with fpmath metadata. Clang used with a relaxation flag
always produces both metadata and fast flag:

%div = fdiv fast float %v, %0, !fpmath !12
!12 = !{float 2.500000e+00}

Current implementation ignores fast flag and favors metadata. An
instruction with just fast flag would be lowered to a fastest rcp +
mul, but that never happen on practice because of described mutual
clang and BE behavior.

This change allows an "fdiv fast" to be always lowered as rcp + mul.

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

llvm-svn: 307308
2017-07-06 20:34:21 +00:00
..
Analysis Revert "Revert "Revert "[IndVars] Canonicalize comparisons between non-negative values and indvars""" 2017-07-06 10:47:13 +00:00
Assembler
Bindings
Bitcode Bitcode: Include any strings added to the string table in the module hash. 2017-07-06 17:56:01 +00:00
BugPoint
CodeGen [AMDGPU] Always use rcp + mul with fast math 2017-07-06 20:34:21 +00:00
DebugInfo [PDB] Add a test that verifies every known type record. 2017-07-05 18:43:25 +00:00
Examples
ExecutionEngine
Feature Remove the BBVectorize pass. 2017-06-30 07:09:08 +00:00
FileCheck
Instrumentation fix trivial typos, NFC 2017-07-01 07:12:15 +00:00
Integer
JitListener
LTO [LTO] Fix the interaction between linker redefined symbols and ThinLTO 2017-07-06 19:58:26 +00:00
LibDriver
Linker
MC Add @LINE to checks in a test. 2017-07-06 19:09:35 +00:00
Object [YAML] - Teach yaml2obj/obj2yaml to work with numeric relocation values. 2017-06-30 10:31:03 +00:00
ObjectYAML [WebAssembly] Add data size and alignement to linking section 2017-06-27 20:27:59 +00:00
Other Revert "[lit] Clean output directories before running tests." 2017-06-30 16:05:03 +00:00
SafepointIRVerifier [SafepointIRVerifier] Add verifier pass for finding GC relocation bugs 2017-07-05 01:16:29 +00:00
SymbolRewriter
TableGen [globalisel][tablegen] Import rules containing intrinsic_wo_chain. 2017-07-06 08:12:20 +00:00
ThinLTO/X86 Bitcode: Write the irsymtab to disk. 2017-06-27 23:50:11 +00:00
Transforms [ValueTracking] Support icmps fed by 'and' and 'or'. 2017-07-06 20:00:25 +00:00
Unit Revert "[lit] Clean output directories before running tests." 2017-06-30 16:05:03 +00:00
Verifier
YAMLParser
tools [PDB] Add a test that verifies every known type record. 2017-07-05 18:43:25 +00:00
.clang-format
CMakeLists.txt
TestRunner.sh
lit.cfg
lit.site.cfg.in