diff options
author | Sanjay Patel <spatel@rotateright.com> | 2017-03-12 18:28:48 +0000 |
---|---|---|
committer | Sanjay Patel <spatel@rotateright.com> | 2017-03-12 18:28:48 +0000 |
commit | f06b963a2b4550128be28ca119c88486a6b3e478 (patch) | |
tree | 0e825356cca58c9758126a11d109e3a3ab9ff16a /llvm/lib/DebugInfo/CodeView/CodeViewError.cpp | |
parent | d5bd3a1e6abf1996dc883335a3957526d1186117 (diff) | |
download | llvm-f06b963a2b4550128be28ca119c88486a6b3e478.zip llvm-f06b963a2b4550128be28ca119c88486a6b3e478.tar.gz llvm-f06b963a2b4550128be28ca119c88486a6b3e478.tar.bz2 |
[x86] don't blindly transform SETB into SBB
I noticed unnecessary 'sbb' instructions in D30472 and while looking at 'ptest' codegen recently.
This happens because we were transforming any 'setb' - even when we only wanted a single-bit result.
This patch moves those transforms under visitAdd/visitSub, so we we're only creating sbb/adc when it
is a win. I don't know why we need a SETCC_CARRY node type, but I'm not proposing to change that
existing behavior in this patch.
Also, I'm skeptical that sbb/adc are a win for all micro-arches, so I added comments to the test files
where this transform still fires.
The test changes here are all cases where we no longer produce sbb/adc. Avoiding partial register
stalls (generating an xor to clear a register) is not handled in some cases, but that's a separate
issue.
Differential Revision: https://reviews.llvm.org/D30611
llvm-svn: 297586
Diffstat (limited to 'llvm/lib/DebugInfo/CodeView/CodeViewError.cpp')
0 files changed, 0 insertions, 0 deletions