Fix a bug in fast-math fadd/fsub simplification.
authorShuxin Yang <shuxin.llvm@gmail.com>
Mon, 25 Mar 2013 20:43:41 +0000 (20:43 +0000)
committerShuxin Yang <shuxin.llvm@gmail.com>
Mon, 25 Mar 2013 20:43:41 +0000 (20:43 +0000)
commitc76067b7746f15879232c2aa27cf5c1ca35b3449
tree0584c05a82b5b4166a7c7ea1ad92d1b6a2760fe2
parentdceaf4ac8dcb2167b57853d354760fe9a8cb8273
Fix a bug in fast-math fadd/fsub simplification.

The problem is that the code mistakenly took for granted that following constructor
is able to create an APFloat from a *SIGNED* integer:

  APFloat::APFloat(const fltSemantics &ourSemantics, integerPart value)

rdar://13486998

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177906 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/InstCombine/InstCombineAddSub.cpp
test/Transforms/InstCombine/fast-math.ll