[PATCH] D68651: [InstCombine] Signed saturation patterns
Dave Green via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 8 09:57:09 PDT 2019
dmgreen added a comment.
Hello.
Can you explain what you mean by "native format"? Do you mean without the extends/truncs, as a different way of specifying them? (I think the problem at least from C is dealing with overflowing arithmetic being undefined. If you extend at least one bit then the arithmetic can't overflow, so you can do the min/max like it's done here).
I don't think there is anywhere in instcombine that currently forms a sadd_sat or ssub_sat (as opposed to uadd_sat or usub_sat), unless it's from an existing sadd_sat. We do form uadd_sat as in rL357012 <https://reviews.llvm.org/rL357012> and usub_sat from selects.
I really just need some way to generate sadd_sats for vectorisation. If there's a better way than this, I'm all ears :)
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D68651/new/
https://reviews.llvm.org/D68651
More information about the llvm-commits
mailing list