This is an archive of the discontinued LLVM Phabricator instance.

[RegisterScavenger] Fix handling of predicated instructions
ClosedPublic

Authored by tobiasvk on Apr 15 2015, 1:01 PM.

Details

Summary

The RegisterScavenger explicitly ignores <kill> flags on operands of
predicated instructions and therefore assumes that such registers remain
live. When it then scavenges such a register, it inserts a spill of this
(killed) register. This is invalid code and gets flagged up by the
verifier.

Nowadays kill flags are set correctly on predicated instructions. This
patch makes the Scavenger respect them.

The bug has so far only been triggered by an internal pass, so I don't
have a test case unfortunately.

Fixes PR23119.

Diff Detail

Repository
rL LLVM

Event Timeline

tobiasvk_caf retitled this revision from to [RegisterScavenger] Fix handling of predicated instructions.
tobiasvk_caf updated this object.
tobiasvk_caf edited the test plan for this revision. (Show Details)
tobiasvk_caf set the repository for this revision to rL LLVM.
tobiasvk_caf added a subscriber: Unknown Object (MLST).
tobiasvk commandeered this revision.Jun 9 2015, 3:04 PM
tobiasvk added a reviewer: tobiasvk_caf.
tobiasvk updated this revision to Diff 27406.Jun 9 2015, 3:05 PM
tobiasvk updated this object.

Rebased

This revision was automatically updated to reflect the committed changes.