1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-25 05:52:53 +02:00
llvm-mirror/lib
Sanjay Patel ac82517d0a revert r243687: enable fast-math-flag propagation to DAG nodes
We can't propagate FMF partially without breaking DAG-level CSE. We either need to
relax CSE to account for mismatched FMF as a temporary work-around or fully propagate
FMF throughout the DAG.

Surprisingly, there are no existing regression tests for this, but here's an example:

  define float @fmf(float %a, float %b) {
    %mul1 = fmul fast float %a, %b
    %nega = fsub fast float 0.0, %a
    %mul2 = fmul fast float %nega, %b
    %abx2 = fsub fast float %mul1, %mul2
    ret float %abx2
  }


$ llc -o - badflags.ll -march=x86-64 -mattr=fma -enable-unsafe-fp-math -enable-fmf-dag=0
...
    vmulss    %xmm1, %xmm0, %xmm0
    vaddss    %xmm0, %xmm0, %xmm0
    retq

$ llc -o - badflags.ll -march=x86-64 -mattr=fma -enable-unsafe-fp-math -enable-fmf-dag=1
...
    vmulss    %xmm1, %xmm0, %xmm2
    vfmadd213ss    %xmm2, %xmm1, %xmm0  <--- failed to recognize that (a * b) was already calculated
    retq

llvm-svn: 244053
2015-08-05 15:12:03 +00:00
..
Analysis [AA] Use CallSite cast idiom. No functionality change. 2015-08-05 14:16:44 +00:00
AsmParser Fix with a bit more care. (but only a bit) 2015-08-03 20:55:00 +00:00
Bitcode DI: Disallow uniquable DICompileUnits 2015-08-03 17:26:41 +00:00
CodeGen revert r243687: enable fast-math-flag propagation to DAG nodes 2015-08-05 15:12:03 +00:00
DebugInfo [dwarfdump] Ignore scattered relocations for mach-o. 2015-07-31 20:22:50 +00:00
ExecutionEngine Rename all references to old mailing lists to new lists.llvm.org address. 2015-08-05 03:51:17 +00:00
Fuzzer [libFuzzer] more refactoring of the Mutator and adding tests to it 2015-08-01 02:23:06 +00:00
IR [IR] Simplify code with ArrayRef::copy. No functionality change. 2015-08-05 14:16:28 +00:00
IRReader
LibDriver
LineEditor
Linker Linker: Move distinct MDNodes instead of cloning 2015-08-03 17:09:38 +00:00
LTO Remove access to the DataLayout in the TargetMachine 2015-07-24 16:04:22 +00:00
MC Use range-based for loops. NFC 2015-08-02 22:34:02 +00:00
Object Use early return NFC. 2015-08-03 00:10:33 +00:00
Option Add an ArgList::AddAllArgs that accepts a vector of OptSpecifier. 2015-07-29 17:34:41 +00:00
Passes
ProfileData
Support [YAMLTraits] Use StringRef::copy. No functionality change. 2015-08-05 14:16:38 +00:00
TableGen TableGen: Support folding casts from bits to int 2015-07-31 01:12:06 +00:00
Target Make this less error prone by using a #define. NFC. 2015-08-05 14:48:44 +00:00
Transforms Fixed line endings. 2015-08-05 08:18:00 +00:00
CMakeLists.txt
LLVMBuild.txt
Makefile