This is an archive of the discontinued LLVM Phabricator instance.

[SystemZ] Fix regression when handling conditional calls
ClosedPublic

Authored by • zhanjunl on Jul 6 2016, 10:20 AM.

Details

Summary

A regression showed up in node.js when handling conditional calls.
Fix the regression by recognizing external symbols as a possible operand type in CallJG.

Diff Detail

Repository
rL LLVM

Event Timeline

• zhanjunl retitled this revision from to [SystemZ] Fix regression when handling conditional calls.
• zhanjunl updated this object.
• zhanjunl added a reviewer: • koriakin.
• zhanjunl added a subscriber: llvm-commits.
• koriakin edited edge metadata.Jul 6 2016, 11:18 AM

Thanks for fixing this! Looks OK, but ISTM the whole thing could be avoided by just doing addOperand instead of the more specific variants?

lib/Target/SystemZ/SystemZInstrInfo.cpp
626 ↗(On Diff #62900)

nit: MachineInstrBuilder MIB(*MI.getParent()->getParent(), MI); would be shorter

631 ↗(On Diff #62900)

Shouldn't it be enough to just addOperand(FirstOp)?

• zhanjunl edited edge metadata.

Hmm, you're right, didn't notice there was an addOperand API for the builder. I've updated the diff to use addOperand instead of the specific variants.

• koriakin accepted this revision.Jul 6 2016, 12:32 PM
• koriakin edited edge metadata.

A testcase would be nice, otherwise LGTM.

This revision is now accepted and ready to land.Jul 6 2016, 12:32 PM
This revision was automatically updated to reflect the committed changes.