[llvm] [SelectionDAG] Expand fixed point multiplication into libcall (PR #79352)
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 25 06:31:55 PST 2024
================
@@ -5287,6 +5287,23 @@ class TargetLowering : public TargetLoweringBase {
bool expandMULO(SDNode *Node, SDValue &Result, SDValue &Overflow,
SelectionDAG &DAG) const;
+ /// ForceExpandMUL - Unconditionally expand a MUL into either a libcall or
+ /// brute force involving many multiplications. The expansion works by
+ /// attempting to do a multiplication on a wider type twice the size of the
+ /// original operands. LL and LH represent the lower and upper halves of the
+ /// first operand. RL and RH represent the lower and upper halves of the
+ /// second operand. The upper and lower halves of the result are stored in Lo
+ /// and Hi.
+ void ForceExpandMUL(SelectionDAG &DAG, SDLoc dl, bool Signed, EVT WideVT,
+ const SDValue LL, const SDValue LH, const SDValue RL,
+ const SDValue RH, SDValue &Lo, SDValue &Hi) const;
+
+ /// Same as above, but creates the upper halves of each operand by
+ /// sign/zero-extending the operands.
+ void ForceExpandMUL(SelectionDAG &DAG, SDLoc dl, bool Signed,
----------------
RKSimon wrote:
Pass SDLoc by const ref: `const SDLoc &DL`
https://github.com/llvm/llvm-project/pull/79352
More information about the llvm-commits
mailing list