aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/Support/ErrorTest.cpp
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2017-08-25 00:34:07 +0000
committerChandler Carruth <chandlerc@gmail.com>2017-08-25 00:34:07 +0000
commit8ac488b16185a70f1f2589a3d0447ddedb7f73e3 (patch)
tree303bd13cf721713abab0d966b76905c377decbc6 /llvm/unittests/Support/ErrorTest.cpp
parentea65b5aa498c42b7dc8bf44fa418ed9725871164 (diff)
downloadllvm-8ac488b16185a70f1f2589a3d0447ddedb7f73e3.zip
llvm-8ac488b16185a70f1f2589a3d0447ddedb7f73e3.tar.gz
llvm-8ac488b16185a70f1f2589a3d0447ddedb7f73e3.tar.bz2
[x86] Fix an amazing goof in the handling of sub, or, and xor lowering.
The comment for this code indicated that it should work similar to our handling of add lowering above: if we see uses of an instruction other than flag usage and store usage, it tries to avoid the specialized X86ISD::* nodes that are designed for flag+op modeling and emits an explicit test. Problem is, only the add case actually did this. In all the other cases, the logic was incomplete and inverted. Any time the value was used by a store, we bailed on the specialized X86ISD node. All of this appears to have been historical where we had different logic here. =/ Turns out, we have quite a few patterns designed around these nodes. We should actually form them. I fixed the code to match what we do for add, and it has quite a positive effect just within some of our test cases. The only thing close to a regression I see is using: notl %r testl %r, %r instead of: xorl -1, %r But we can add a pattern or something to fold that back out. The improvements seem more than worth this. I've also worked with Craig to update the comments to no longer be actively contradicted by the code. =[ Some of this still remains a mystery to both Craig and myself, but this seems like a large step in the direction of consistency and slightly more accurate comments. Many thanks to Craig for help figuring out this nasty stuff. Differential Revision: https://reviews.llvm.org/D37096 llvm-svn: 311737
Diffstat (limited to 'llvm/unittests/Support/ErrorTest.cpp')
0 files changed, 0 insertions, 0 deletions