[PATCH] D35375: [AArch64][Atomic] Canonicalize sub of immediate to add of -immediate.
Geoff Berry via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 13 15:39:40 PDT 2017
gberry added a comment.
In https://reviews.llvm.org/D35375#808771, @mcrosier wrote:
> In https://reviews.llvm.org/D35375#808725, @gberry wrote:
>
> > Perhaps this would be better done at the IR level, in InstCombine?
>
>
> Seems reasonable, but we'd have to know this is a good canonicalization for all targets, right?
It seems like it is to me. Worst case (e.g. the target supports 'add' but not 'sub'), the sub would ideally just be transformed back and a negate added during ISel legalization.
https://reviews.llvm.org/D35375
More information about the llvm-commits
mailing list