Page MenuHomePhabricator

[PPC] Handling CallInst in PPCBoolRetToInt

Authored by Carrot on Jul 11 2016, 4:08 PM.



This patch fixes pr25548.

Current implementation of PPCBoolRetToInt doesn't handle CallInst correctly, so it failed to do the intended optimization when there is a CallInst with parameters. This patch fixed that.

Diff Detail

Event Timeline

Carrot updated this revision to Diff 63600.Jul 11 2016, 4:08 PM
Carrot retitled this revision from to [PPC] Handling CallInst in PPCBoolRetToInt.
Carrot updated this object.
Carrot added a reviewer: hfinkel.
Carrot added a subscriber: llvm-commits.
tjablin edited edge metadata.Aug 1 2016, 4:14 PM

I believe the code is correct, but I have a few quibbles.

  1. Could you add comments on lines 70 and 232 explaining why CallInsts are skipped?
  2. On line 226, "There were set" => "They were set" Sorry. This was originally my typo.
  3. I think most reviewers like full context for patches on phabricator. Please use one of the diff commands found here:


Carrot updated this revision to Diff 66580.Aug 2 2016, 4:00 PM
Carrot edited edge metadata.

Add comments for CallInst handling.

kbarton accepted this revision.Aug 8 2016, 11:36 AM
kbarton edited edge metadata.


This revision is now accepted and ready to land.Aug 8 2016, 11:36 AM

Did this ever land upstream? PR25548 is still open and I can't find a matching commit.

Eugene.Zelenko added a subscriber: Eugene.Zelenko.

Committed in r277655. Please specify Differential revision in commit message.