[PATCH] D63992: [InstCombine] Y - ~X --> X + Y + 1 fold (PR42457)
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 1 11:49:58 PDT 2019
efriedma added a comment.
Yes, we should probably teach DAGCombine to choose the right form for each target/type.
It seems reasonable to prefer `x+(y+1)` over `x-(-1-y)`, for reassociation etc. It's possible there could be some bad interaction at the interface between logical and arithmetic operations, which makes us miss some important optimization, but that doesn't seem likely to me.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D63992/new/
https://reviews.llvm.org/D63992
More information about the llvm-commits
mailing list