Skip to content
  1. Jan 19, 2010
  2. Jan 18, 2010
  3. Jan 17, 2010
  4. Jan 15, 2010
  5. Jan 14, 2010
    • Bill Wendling's avatar
      When the visitSub method was split into visitSub and visitFSub, this xform was · ad7a5b07
      Bill Wendling authored
      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.
      
      llvm-svn: 93369
      ad7a5b07
  6. Jan 12, 2010
  7. Jan 11, 2010
  8. Jan 10, 2010
  9. Jan 09, 2010
  10. Jan 08, 2010
Loading