This is an archive of the discontinued LLVM Phabricator instance.

PeepholeOptimizer: Handle undef operands correctly
ClosedPublic

Authored by MatzeB on Dec 1 2017, 5:52 PM.

Details

Summary

The PeepholeOptimizer doesn't correctly propagate undef and would fail for vregs without definition.

Found while manually crafting testcases, in practice this is probably rare as it would mean incomplete DCE.

This changes the code to simply bail out if undef operands are involved (which is simpler code than correctly propagating the undef flag).

Diff Detail

Repository
rL LLVM

Event Timeline

MatzeB created this revision.Dec 1 2017, 5:52 PM
qcolombet accepted this revision.Dec 4 2017, 10:21 AM
This revision is now accepted and ready to land.Dec 4 2017, 10:21 AM
This revision was automatically updated to reflect the committed changes.