OSDN Git Service

[x86] Fix EFLAGS copy lowering to correctly handle walking past uses in
authorChandler Carruth <chandlerc@gmail.com>
Thu, 12 Jul 2018 00:52:50 +0000 (00:52 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Thu, 12 Jul 2018 00:52:50 +0000 (00:52 +0000)
commit6c31f1e00d9d92d731fdebdb107fc2badb6d4585
tree426b8d73b46df574daae86e20240794ab2eb1aa2
parent18d8ba4a182d7285ef081e19a933f43557eb5e20
[x86] Fix EFLAGS copy lowering to correctly handle walking past uses in
multiple successors where some of the uses end up killing the EFLAGS
register.

There was a bug where rather than skipping to the next basic block
queued up with uses once we saw a kill, we stopped processing the blocks
entirely. =/

Test case produces completely nonsensical code w/o this tiny fix.

This was found testing Speculative Load Hardening and split out of that
work.

Differential Revision: https://reviews.llvm.org/D49211

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@336874 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86FlagsCopyLowering.cpp
test/CodeGen/X86/flags-copy-lowering.mir