This is an archive of the discontinued LLVM Phabricator instance.

[PowerPC] Fixed missing change flag of emitRLDICWhenLoweringJumpTables
ClosedPublic

Authored by lkail on Jun 25 2019, 7:02 PM.

Details

Summary

PPCMIPeephole::emitRLDICWhenLoweringJumpTables should return a bool value to indicate optimization is conducted or not.

Diff Detail

Repository
rL LLVM

Event Timeline

lkail created this revision.Jun 25 2019, 7:02 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 25 2019, 7:02 PM
steven.zhang added inline comments.Jun 25 2019, 7:21 PM
llvm/lib/Target/PowerPC/PPCMIPeephole.cpp
764 ↗(On Diff #206574)

It would be more safe to have it as "Simplified |= xxxx".

steven.zhang accepted this revision.Jun 25 2019, 10:08 PM

LGTM, with one minor comments. Maybe, you could commit a NFC patch to use "|=" instead of "=" to set the Simplified flag.

This revision is now accepted and ready to land.Jun 25 2019, 10:08 PM
This revision was automatically updated to reflect the committed changes.
lkail added a comment.EditedJun 26 2019, 12:48 AM

Thanks @steven.zhang, I think using = rather than |= in line 764 might cause error. I have fixed it in https://reviews.llvm.org/D63806. Other updates of Simplified are all Simplified = true, no need to replace = with |=.