On SPARC, S/UMULO operation on 64-bit integers works by extending the value to 128-bit, then doing a multiplication and checking the upper half of the result.
This makes UMULO works correctly by putting a zero in the upper half rather than doing a sign extension.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Also fix the other testcases affected by this change, since they happen to contain the wrong behavior too.
Please upload the diff with full context, check out the contribution guide for more info.
The fix LGTM, there's only a minor nit wrt the test placement.
llvm/test/CodeGen/SPARC/mulo-64-lowering.ll | ||
---|---|---|
1 ↗ | (On Diff #383503) | Generate this file using update_llc_test_checks.py, that way it's much easier to update it if needed. Minor nit to keep the test suite tidy, the unsigned case is already handled in umulo-128-legalisation-lowering.ll, perhaps copy-paste that and call it smulo-128-legalisation-lowering.ll. |
LGTM. I can land this for you if you have no commit access, just give me the name/email you want to be credited as.
I have no commit access so please commit it for me. My email is koachan@protonmail.com.
Thanks a lot for the help.