diff options
author | Sanjay Patel <spatel@rotateright.com> | 2017-05-01 22:25:42 +0000 |
---|---|---|
committer | Sanjay Patel <spatel@rotateright.com> | 2017-05-01 22:25:42 +0000 |
commit | 59d0aeaafe275cc20fafca52b21c4610c681a156 (patch) | |
tree | fbad8569e2ea7b01c47f2b3ff8e70a52368d0c61 /llvm/lib/Transforms/Utils/SymbolRewriter.cpp | |
parent | 941a20511968ddd8ace9b4ad1296aa7e2c11c206 (diff) | |
download | bcm5719-llvm-59d0aeaafe275cc20fafca52b21c4610c681a156.tar.gz bcm5719-llvm-59d0aeaafe275cc20fafca52b21c4610c681a156.zip |
[InstCombine] check one-use before applying DeMorgan nor/nand folds
If we have ~(~X & Y), it only makes sense to transform it to (X | ~Y) when we do not need
the intermediate (~X & Y) value. In that case, we would need an extra instruction to
generate ~Y + 'or' (as shown in the test changes).
It's ok if we have multiple uses of ~X or Y, however. In those cases, we may not reduce the
instruction count or critical path, but we might improve throughput because we can generate
~X and ~Y in parallel. Whether that actually makes perf sense or not for a target is something
we can't answer in IR.
Differential Revision: https://reviews.llvm.org/D32703
llvm-svn: 301848
Diffstat (limited to 'llvm/lib/Transforms/Utils/SymbolRewriter.cpp')
0 files changed, 0 insertions, 0 deletions