This is an archive of the discontinued LLVM Phabricator instance.

[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.
ClosedPublic

Authored by chandlerc on Jul 11 2018, 5:47 PM.

Details

Summary

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.

Diff Detail

Repository
rL LLVM

Event Timeline

chandlerc created this revision.Jul 11 2018, 5:47 PM
echristo accepted this revision.Jul 11 2018, 5:51 PM

The change looks obvious, I think the test is fine too, but MIR test cases aren't fun to read. :)

This revision is now accepted and ready to land.Jul 11 2018, 5:51 PM
This revision was automatically updated to reflect the committed changes.