mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-20 14:29:27 +00:00
R600/SI: Add a note about the order of the operands to div_scale
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@218534 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
508b8db287
commit
88416c337b
@ -825,6 +825,12 @@ SDValue AMDGPUTargetLowering::LowerINTRINSIC_WO_CHAIN(SDValue Op,
|
||||
// first parameter must be the same as the first instruction.
|
||||
SDValue Numerator = Op.getOperand(1);
|
||||
SDValue Denominator = Op.getOperand(2);
|
||||
|
||||
// Note this order is opposite of the machine instruction's operations,
|
||||
// which is s0.f = Quotient, s1.f = Denominator, s2.f = Numerator. The
|
||||
// intrinsic has the numerator as the first operand to match a normal
|
||||
// division operation.
|
||||
|
||||
SDValue Src0 = Param->isAllOnesValue() ? Numerator : Denominator;
|
||||
|
||||
return DAG.getNode(AMDGPUISD::DIV_SCALE, DL, Op->getVTList(), Src0,
|
||||
|
Loading…
x
Reference in New Issue
Block a user