This removes the need for backends to set DIV/REM pairs to custom if they implement divrem
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
the following patch connects tests for r600 that exercise this codepath
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20150406/270202.html
lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp | ||
---|---|---|
2185 ↗ | (On Diff #20445) | TargetLoweringBase:: -> TargetLowering:: |
2186 ↗ | (On Diff #20445) | RES -> Res Also, what about 'SDNode *Res'? Doing an explicit SDValue(Res, 0/1) is clearer, I think. |
2187 ↗ | (On Diff #20445) | I see we have Ops[2] a few lines down, can you move that above and just pass it here? |
v2:
TargetLoweringBase:: -> TargetLowering::
Use Ops array
i considered using SDNode, but the line
SDNode *Res = DAG.getNode(..................).getNode();
looked a bit long/awkward.
I can add the change in v3 if you really prefer it that way.
I'm not a big fan, but I don't have a better alternative, so, LGTM, thanks!
Fair enough. How about using an explicit Res.getValue(0) for DIV instead?
lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp | ||
---|---|---|
2501 ↗ | (On Diff #26369) | Also, unnecessary newline. |