[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)
commit1c8234f639d8e9c5a80a154e395069c4d6c32704
tree818803b6b82bc47d9ee8de05c223d40ca493da8a
parentbf9abccacd2a37798b2058c9be0924efb75e248d
[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

llvm-svn: 336874
llvm/lib/Target/X86/X86FlagsCopyLowering.cpp
llvm/test/CodeGen/X86/flags-copy-lowering.mir