mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-02 22:23:10 +00:00
DAGCombiner: Allow the DAGCombiner to combine multiple FDIVs with the same divisor info FMULs by the reciprocal.
E.g., ( a / D; b / D ) -> ( recip = 1.0 / D; a * recip; b * recip) A hook is added to allow the target to control whether it needs to do such combine. Reviewed in http://reviews.llvm.org/D6334 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222510 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -2652,6 +2652,12 @@ public:
|
||||
return SDValue();
|
||||
}
|
||||
|
||||
/// Indicate whether this target prefers to combine the given number of FDIVs
|
||||
/// with the same divisor.
|
||||
virtual bool combineRepeatedFPDivisors(unsigned NumUsers) const {
|
||||
return false;
|
||||
}
|
||||
|
||||
/// Hooks for building estimates in place of slower divisions and square
|
||||
/// roots.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user