[RFC] AEABI Divmod refactoring + 64-bit

Tim Northover t.p.northover at gmail.com
Tue Jul 30 03:18:37 PDT 2013


Hi Renato,

> One (ugly) alternative would be to lower that to a pair of 32-bit REM/DIV,
> which would be semantically wrong, but fixed later on by the custom
> lowering.

What about creating special ARMISD::SREM64 (etc) nodes to represent
the operation during ReplaceNodeResults? They could take 4 i32
operands as input and produce 2 i32s as output (All legit 32-bit
operations, guv, honest! Wouldn't touch any of that 64-bit filth!).
You could then feed the output of this node back to the type legalizer
however it expects it (a build_pair op?).

It looks like if nothing gets added to Results in ReplaceNodeResults
then LegalizeTypes will carry on as before. That's what we want for
non AEABI-runtime targets, and neatly allows mixed expand/custom
semantics.

Or did you try this and hit other problems I've not anticipated?

Tim.



More information about the llvm-commits mailing list