[PATCH] D54546: [ARM] Don't expand sdiv

Sjoerd Meijer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 14 15:30:23 PST 2018


SjoerdMeijer added a comment.

Thanks for commenting! 
Yes, this should save 2 bytes.
 I will check tomorrow:

- about the SDIV legality, and where exactly the SDIV is expanded when it is not supported in HW. I see that sdiv is expanded very early if it is not available, immediately after the initial SDAG, and this code in visitSDIVLike does not get triggered. But again, will double check where exactly the magic happens.  I've noticed that at least some tests are in place for other targets: the minsize check is no, the `!VT.isVector()` is required for some X86 and AArch64 tests, and without it the (knock on) effect is that the vector operations get scalarized and these tests fail, but I don't think this is related the legality of SDIV.
- I missed this: "On Thumbv8, if you're dividing by a power of two greater than 128, I think you save zero byte", so will address that.
- what exactly the benefit is on some other targets.


https://reviews.llvm.org/D54546





More information about the llvm-commits mailing list