This is an archive of the discontinued LLVM Phabricator instance.

[PowerPC] Change liveness testing in VSX FMA mutation pass
ClosedPublic

Authored by wschmidt on Oct 17 2014, 1:02 PM.

Details

Reviewers
seurer
hfinkel
Summary

With VSX enabled, LLVM crashes when compiling test/CodeGen/PowerPC/fma.ll. I traced this to the liveness test that's removed in this patch. The interval test is designed to only work for virtual registers, but in this case the AddendSrcReg is physical. Since there is already a walk of the MIs between the AddendMI and the FMA, I added a check for def/kill of the AddendSrcReg in that loop and removed the extra liveness test.

There may well be a better way of doing this, so please redirect me if so...

Thanks,
Bill

Diff Detail

Event Timeline

wschmidt updated this revision to Diff 15095.Oct 17 2014, 1:02 PM
wschmidt retitled this revision from to [PowerPC] Change liveness testing in VSX FMA mutation pass.
wschmidt updated this object.
wschmidt edited the test plan for this revision. (Show Details)
wschmidt added reviewers: hfinkel, seurer.
wschmidt added subscribers: wschmidt, hfinkel, seurer, Unknown Object (MLST).
hfinkel accepted this revision.Oct 17 2014, 1:25 PM
hfinkel edited edge metadata.

LGTM.

lib/Target/PowerPC/PPCInstrInfo.cpp
1691

check for whether -> check whether

1724

Because I'm so trusting... please don't delete this; instead turn it into an assert that checks this condition (for virtual registers).

This revision is now accepted and ready to land.Oct 17 2014, 1:25 PM
wschmidt closed this revision.Oct 17 2014, 2:13 PM

Thanks for the quick review! I've implemented the requested changes and committed the patch as r220090.