[PATCH] D85593: [InstCombine] ~(~X + Y) -> X - Y
Dávid Bolvanský via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Aug 9 06:16:18 PDT 2020
xbolva00 added inline comments.
================
Comment at: llvm/test/Transforms/InstCombine/not-add.ll:94
+; CHECK-NEXT: [[A:%.*]] = add i8 [[NOTX]], [[Y:%.*]]
+; CHECK-NEXT: call void @use(i8 [[A]])
+; CHECK-NEXT: [[NOTA:%.*]] = xor i8 [[A]], -1
----------------
spatel wrote:
> xbolva00 wrote:
> > @lebedev.ri
> >
> > not seems better than sub x, y so oneuse check is ok (?)
> It's true that in some cases (for example, expensive FP ops), we have leaned toward a more restrictive one-use check.
>
> In this case, however, I do not think that the relative analysis improvement of an xor vs. sub should limit the transform.
>
> Reducing the number of operand uses and dependency chain could allow follow-on improvements.
Ok, thanks. Will drop it.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D85593/new/
https://reviews.llvm.org/D85593
More information about the llvm-commits
mailing list