llvm-project/llvm
Sanjay Patel b6a79f9916 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
..
autoconf Temporarily revert r244012 while we see if it's really necessary. 2015-08-05 05:32:22 +00:00
bindings DI: Rewrite the DIBuilder local variable API 2015-07-31 17:55:53 +00:00
cmake Remove the configure and cmake checks for sys/wait.h 2015-08-04 06:29:58 +00:00
docs Rename all references to old mailing lists to new lists.llvm.org address. 2015-08-05 03:51:17 +00:00
examples DI: Rewrite the DIBuilder local variable API 2015-07-31 17:55:53 +00:00
include Drop unnecessary static_cast. 2015-08-05 11:53:59 +00:00
lib revert r243687: enable fast-math-flag propagation to DAG nodes 2015-08-05 15:12:03 +00:00
projects
resources In MSVC builds embed a VERSIONINFO resource in our exe and DLL files. 2015-06-12 15:58:29 +00:00
test ARMISelDAGToDAG.cpp had this self-contradictory code: 2015-08-05 11:02:14 +00:00
tools [llvm-objdump] Call exit(1) on error, i.e. fail early. 2015-08-05 07:18:31 +00:00
unittests [ArrayRefTest] Work around a GCC 4.8 internal compiler error. 2015-08-05 09:39:41 +00:00
utils Rename all references to old mailing lists to new lists.llvm.org address. 2015-08-05 03:51:17 +00:00
.arcconfig
.clang-format
.clang-tidy
.gitignore Minor updates to gitignore so that symlinks are ignored in the projects dir. 2015-07-07 20:24:58 +00:00
CMakeLists.txt Use a specified list of languages in cmake project() command. 2015-07-28 14:43:53 +00:00
CODE_OWNERS.TXT [WebAssembly] Initial WebAssembly backend 2015-06-29 23:51:55 +00:00
CREDITS.TXT [WebAssembly] Initial WebAssembly backend 2015-06-29 23:51:55 +00:00
LICENSE.TXT
LLVMBuild.txt
Makefile
Makefile.common
Makefile.config.in Rename all references to old mailing lists to new lists.llvm.org address. 2015-08-05 03:51:17 +00:00
Makefile.rules
README.txt
configure Temporarily revert r244012 while we see if it's really necessary. 2015-08-05 05:32:22 +00:00
llvm.spec.in

README.txt

Low Level Virtual Machine (LLVM)
================================

This directory and its subdirectories contain source code for LLVM,
a toolkit for the construction of highly optimized compilers,
optimizers, and runtime environments.

LLVM is open source software. You may freely distribute it under the terms of
the license agreement found in LICENSE.txt.

Please see the documentation provided in docs/ for further
assistance with LLVM, and in particular docs/GettingStarted.rst for getting
started with LLVM and docs/README.txt for an overview of LLVM's
documentation setup.

If you're writing a package for LLVM, see docs/Packaging.rst for our
suggestions.