aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
diff options
context:
space:
mode:
authorRoman Lebedev <lebedev.ri@gmail.com>2020-04-23 21:07:23 +0300
committerRoman Lebedev <lebedev.ri@gmail.com>2020-04-23 23:59:15 +0300
commit5a159ed2a8e5a9a6ced73f78e4c64b01d76d3493 (patch)
treeaaf7ff6db0487dc049469dd94c1e3fbdb4f82f34 /llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
parent7ca56c90bd6e31e6426427b44c251dd233cb8a68 (diff)
downloadllvm-5a159ed2a8e5a9a6ced73f78e4c64b01d76d3493.zip
llvm-5a159ed2a8e5a9a6ced73f78e4c64b01d76d3493.tar.gz
llvm-5a159ed2a8e5a9a6ced73f78e4c64b01d76d3493.tar.bz2
[InstCombine] Negator: don't negate multi-use `sub`
While we can do that, it doesn't increase instruction count, if the old `sub` sticks around then the transform is not only not a unlikely win, but a likely regression, since we likely now extended live range and use count of both of the `sub` operands, as opposed to just the result of `sub`. As Kostya Serebryany notes in post-commit review in https://reviews.llvm.org/D68408#1998112 this indeed can degrade final assembly, increase register pressure, and spilling. This isn't what we want here, so at least for now let's guard it with an use check.
Diffstat (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp')
0 files changed, 0 insertions, 0 deletions