[PATCH] D25440: [Target] remove TargetRecip class; move reciprocal estimate isel functionality to TargetLowering

Eric Christopher via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 18 10:45:53 PDT 2016


echristo added a comment.

I had one inline bikeshed type of comment, but otherwise also LGTM. Thanks for doing this work!

-eric



================
Comment at: include/llvm/Target/TargetLowering.h:260-266
+  int getSqrtEnabled(EVT VT, MachineFunction &MF) const;
+
+  /// Return a ReciprocalEstimate enum value for a division of the given type
+  /// based on the function's attributes. If the operation is not overridden by
+  /// the function's attributes, "Unspecified" is returned and target defaults
+  /// are expected to be used for instruction selection.
+  int getDivEnabled(EVT VT, MachineFunction &MF) const;
----------------
Bit of a bikeshed but these two functions sound like they're seeing if sqrt and div are instructions in the hardware.


Repository:
  rL LLVM

https://reviews.llvm.org/D25440





More information about the llvm-commits mailing list