aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Target/TargetMachine.cpp
diff options
context:
space:
mode:
authorSanjay Patel <spatel@rotateright.com>2021-10-21 09:06:37 -0400
committerSanjay Patel <spatel@rotateright.com>2021-10-21 09:47:19 -0400
commitd2198771e9ccbae27a487cdca67720eee71cea2a (patch)
treef1d2988b91086ba8cd411af43ac37992bdb7e1d6 /llvm/lib/Target/TargetMachine.cpp
parentfa111d30855ee4d74a4b87672ea50d03a74ad85f (diff)
downloadllvm-d2198771e9ccbae27a487cdca67720eee71cea2a.zip
llvm-d2198771e9ccbae27a487cdca67720eee71cea2a.tar.gz
llvm-d2198771e9ccbae27a487cdca67720eee71cea2a.tar.bz2
[DAGCombiner] fold bit-hack form of usubsat
(i8 X ^ 128) & (i8 X s>> 7) --> usubsat X, 128 I haven't found a generalization of this identity: https://alive2.llvm.org/ce/z/_sriEQ Note: I was actually looking at the first form of the pattern in that link, but that's part of a long chain of potential missed transforms in codegen and IR....that I hope ends here! The predicates for when this is profitable are a bit tricky. This version of the patch excludes multi-use but includes custom lowering (as opposed to legal only). On x86 for example, we have custom lowering for some vector types, and that uses umax and sub. So to enable that fold, we need add use checks to avoid regressions. Even with legal-only lowering, we could see code with extra reg move instructions for extra uses, so that constraint would have to be eased very carefully to avoid penalties. Differential Revision: https://reviews.llvm.org/D112085
Diffstat (limited to 'llvm/lib/Target/TargetMachine.cpp')
0 files changed, 0 insertions, 0 deletions