Matthias Gehre via llvm-dev
2019-Nov-11 22:45 UTC
[llvm-dev] Backend support for divisions > 128 bits
Hello, Thanks you very much for LLVM! I'm very much enjoying working with it. I'm currently experimenting with some frontend changes that eventually generate IR with arbitrary big integer types like define void @test(i129, i129, i129*) { %4 = sdiv i129 %0, %1 store i129 %4, i129* %2 ret void } (or any bigger type). Unfortunately, this leads to "LLVM ERROR: Unsupported library call operation!" from DAGTypeLegalizer::ExpandIntRes_SDIV on all targets I tried (especially x86_64). It seems that most of the other operations (e.g. mul, add, and, shift, bitreverse, ...) are supported on those big integers. What is the best way for me to make the divisions work? Is there existing work I can build upon? Thank you! Matthias -- <https://www.silexica.com/?utm_source=email&utm_medium=signature&utm_campaign=signaturelogo> Matthias Gehre C++ Senor Software Architect gehre at silexica.com P: +49 221 986 5619 0 Silexica GmbH | https://www.silexica.com <https://www.silexica.com/?utm_source=email&utm_medium=signature&utm_campaign=signaturelink> Lichtstr. 25 50825 Cologne Germany <https://www.twitter.com/silexica> <https://www.facebook.com/Silexica-785768688111895/> <https://www.linkedin.com/company-beta/5302419/> <https://www.youtube.com/channel/UCWpUjWucdzGviWAtQuUcehg> <https://info.silexica.com/xdf19/meeting> | Request a live demonstration of our product here <https://www.silexica.com/#request-demo-button> | Domicile and Court of Registry: Köln, Germany Commercial Register Number: HRB 89481 Managing Directors: Maximilian Odendahl, Johannes Emigholz -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20191111/15633f28/attachment.html>
Joerg Sonnenberger via llvm-dev
2019-Nov-11 23:03 UTC
[llvm-dev] Backend support for divisions > 128 bits
On Mon, Nov 11, 2019 at 11:45:12PM +0100, Matthias Gehre via llvm-dev wrote:> Hello, > > Thanks you very much for LLVM! I'm very much enjoying working with it. > > I'm currently experimenting with some frontend changes that eventually > generate IR with arbitrary big integer types like > > define void @test(i129, i129, i129*) { > %4 = sdiv i129 %0, %1 > store i129 %4, i129* %2 > ret void > } > > (or any bigger type). Unfortunately, this leads to "LLVM ERROR: Unsupported > library call operation!" from DAGTypeLegalizer::ExpandIntRes_SDIV on all > targets I tried (especially x86_64). It seems that most of the other > operations (e.g. mul, add, and, shift, bitreverse, ...) are supported on > those big integers.Most of the other operations are trivial to synthesize in a somewhat reasonable way. Division is not. That's why there is no generic expansion. Joerg