llvm/lib/Transforms
Bill Wendling 22f3b9faac When the visitSub method was split into visitSub and visitFSub, this xform was
added to the FSub version. However, the original version of this xform guarded
against doing this for floating point (!Op0->getType()->isFPOrFPVector()).

This is causing LLVM to perform incorrect xforms for code like:

void func(double *rhi, double *rlo, double xh, double xl, double yh, double yl){
  double mh, ml;
  double c = 134217729.0;
  double up, u1, u2, vp, v1, v2;
        
  up = xh*c;
  u1 = (xh - up) + up;
  u2 = xh - u1;
        
  vp = yh*c;
  v1 = (yh - vp) + vp;
  v2 = yh - v1;
        
  mh = xh*yh;
  ml = (((u1*v1 - mh) + (u1*v2)) + (u2*v1)) + (u2*v2);
  ml += xh*yl + xl*yh;
        
  *rhi = mh + ml;
  *rlo = (mh - (*rhi)) + ml;
}

The last line was optimized away, but rl is intended to be the difference
between the infinitely precise result of mh + ml and after it has been rounded
to double precision.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93369 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-13 23:23:17 +00:00
..
Hello Fix a bunch of little errors that Clang complains about when its being pedantic 2009-12-19 07:05:23 +00:00
InstCombine When the visitSub method was split into visitSub and visitFSub, this xform was 2010-01-13 23:23:17 +00:00
Instrumentation Move remaining stuff to the isInteger predicate. 2010-01-05 21:05:54 +00:00
IPO Be less stingy as to how many selects and phi nodes we 2010-01-07 05:48:42 +00:00
Scalar 1) Use the new SimplifyInstructionsInBlock routine instead of the copy 2010-01-12 20:41:47 +00:00
Utils add a helper function. 2010-01-12 19:40:54 +00:00
Makefile move instcombine to its own library, it's past time. 2010-01-04 06:23:24 +00:00