[PATCH] [AArch64] Combine multiple FDIVs with the same divisor

hfinkel at anl.gov hfinkel at anl.gov
Thu Nov 20 07:17:00 PST 2014


Can you please put this in DAGCombine, and let the target optionally enable it. The target can customize this:

    // Skip if there is less than three FDIVs.
    // FIXME: Different subtargets may behave differently. This can be
    // controlled depending on subtargets.
    if (Users.size() < 3)

I think that adding something like:

  virtual bool combineRepeatedFPDivisors(unsigned &MinUsers) {
    return false;
  }

added in TargetLowering.h right around the existing division functions would work well (I'm not attached to the name, feel free to propose some other name). I'd like to use this for PPC too.

http://reviews.llvm.org/D6334






More information about the llvm-commits mailing list