diff options
author | Ahmed Bougacha <ahmed.bougacha@gmail.com> | 2016-04-05 20:02:57 +0000 |
---|---|---|
committer | Ahmed Bougacha <ahmed.bougacha@gmail.com> | 2016-04-05 20:02:57 +0000 |
commit | 50e6cd4a3adbccc4dfbc84a3d66340768f2c8e8f (patch) | |
tree | aafd6cb135418a9f77a42141356e96d92d2e5a7f /llvm/unittests/Support/TimerTest.cpp | |
parent | b235d32e7419cb8d5c95852fae58476fbf788873 (diff) | |
download | bcm5719-llvm-50e6cd4a3adbccc4dfbc84a3d66340768f2c8e8f.tar.gz bcm5719-llvm-50e6cd4a3adbccc4dfbc84a3d66340768f2c8e8f.zip |
[X86] Reuse EFLAGS and form LOCKed ops when only user is SETCC.
We only generate LOCKed versions of add/sub when the result is unused.
It often happens that the result is used, but only by a comparison. We
can optimize those out by reusing EFLAGS, which lets us use the proper
instructions, instead of having to fallback to LXADD.
Instead of doing this as an MI peephole (as we do for the other
non-LOCKed (really, non-MR) forms), do it in ISel. It becomes quite
tricky later.
This also makes it eventually possible to stop expanding and/or/xor
if the only user is an icmp (also see D18141).
This uses the LOCK ISD opcodes added by r262244.
Differential Revision: http://reviews.llvm.org/D17633
llvm-svn: 265450
Diffstat (limited to 'llvm/unittests/Support/TimerTest.cpp')
0 files changed, 0 insertions, 0 deletions