[PATCH] Add support for fast-math flags to the FCmp instruction.

Michael Ilseman milseman at apple.com
Fri May 15 09:46:42 PDT 2015


What are you hoping to accomplish with the information from the flags? When I looked into this way back when, it wasn’t quite compelling, but I’m sure I missed a lot of the cases you’re seeing.

> On May 15, 2015, at 6:58 AM, James Molloy <james.molloy at arm.com> wrote:
> 
> Hi hfinkel, majnemer, chandlerc,
> 
> 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.
> 
> REPOSITORY
>  rL LLVM
> 
> http://reviews.llvm.org/D9793
> 
> Files:
>  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
>  unittests/IR/IRBuilderTest.cpp
> 
> EMAIL PREFERENCES
>  http://reviews.llvm.org/settings/panel/emailpreferences/
> <D9793.25866.patch>_______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits





More information about the llvm-commits mailing list