[PATCH] D70237: [X86] Add more addcarry tests
David Zarzycki via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 18 06:30:56 PST 2019
davezarzycki added a comment.
In D70237#1749841 <https://reviews.llvm.org/D70237#1749841>, @chfast wrote:
> > Thanks for the update. Where is the original source for sub_U256_without_i128_or_recursive? The IR is strange. It seems to use two different strategies for merging carry flags.
>
> I don't really have a standalone implementation for it at the moment. It is code for this procedure for uint256 type: https://github.com/chfast/intx/blob/master/include/intx/intx.hpp#L528-L532. It is the same as the one for add, just `+` replaced with `-` and `<` with `>` for checking the carry flag. But probably LLVM has disturbed it a bit because add is proffered over sub in some places.
Okay. I'm okay with these tests now. Please wait for somebody more experienced / authoritative too sign off though. Thanks!
Also, the tree-like recursion that generated sub_U256_without_i128_or_recursive will be extremely difficult to optimize. Please consider linear recursion instead.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D70237/new/
https://reviews.llvm.org/D70237
More information about the llvm-commits
mailing list