Add support for fast-math flags to the FCmp instruction.
authorJames Molloy <james.molloy@arm.com>
Fri, 10 Jul 2015 12:52:00 +0000 (12:52 +0000)
committerJames Molloy <james.molloy@arm.com>
Fri, 10 Jul 2015 12:52:00 +0000 (12:52 +0000)
commitee0d992b07d282ca217ba158a1cb5671ccdc0ced
tree7e742ae9f097c24303f482fc3fad2dfc36110ca9
parente57b60a7f9693b4e6bd070bc122fa3c9f4161d87
Add support for fast-math flags to the FCmp instruction.

FCmp behaves a lot like a floating-point binary operator in many ways,
and can benefit from fast-math information. Flags such as nsz and nnan
can affect if this fcmp (in combination with a select) can be treated
as a fminnum/fmaxnum operation.

This adds backwards-compatible bitcode support, IR parsing and writing,
LangRef changes and IRBuilder changes. I'll need to audit InstSimplify
and InstCombine in a followup to find places where flags should be
copied.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241901 91177308-0d34-0410-b5e6-96231b3b80d8
docs/LangRef.rst
include/llvm/IR/IRBuilder.h
include/llvm/IR/Operator.h
lib/AsmParser/LLParser.cpp
lib/Bitcode/Reader/BitcodeReader.cpp
lib/Bitcode/Writer/BitcodeWriter.cpp
test/Bitcode/fcmp-fast.ll [new file with mode: 0644]
unittests/IR/IRBuilderTest.cpp