This is an archive of the discontinued LLVM Phabricator instance.

[CodeGenPrepare] Removed duplicated logic. SimplifyCFG now knows how to speculate calls to cttz/ctlz.
ClosedPublic

Authored by andreadb on Feb 13 2015, 3:42 AM.

Details

Summary

Since revisions 228829 (code review: D7554) and 228923 (code review: D7554), SimplifyCFG knows how to speculate calls to intrinsic cttz/ctlz that are 'cheap' for the target. The logic in CodeGenPrepare (originally added at revision 224899) is now redundant and can therefore be removed.

This patch removes the duplicated logic in CodeGenPrepare and converts all the existing target specific tests for cttz/ctlz into SimplifyCFG tests. Note that X86 tests were already added by revisions 228829 and 228923. No functional change intended.

Please let me know if ok to submit.

Thanks,
Andrea

Diff Detail

Repository
rL LLVM

Event Timeline

andreadb updated this revision to Diff 19878.Feb 13 2015, 3:42 AM
andreadb retitled this revision from to [CodeGenPrepare] Removed duplicated logic. SimplifyCFG now knows how to speculate calls to cttz/ctlz..
andreadb updated this object.
andreadb edited the test plan for this revision. (Show Details)
andreadb added reviewers: hfinkel, arsenm.
andreadb added a subscriber: Unknown Object (MLST).
hfinkel accepted this revision.Feb 13 2015, 5:08 AM
hfinkel edited edge metadata.

LGTM, thanks!

This revision is now accepted and ready to land.Feb 13 2015, 5:08 AM
This revision was automatically updated to reflect the committed changes.
llvm/trunk/test/CodeGen/PowerPC/cttz-ctlz-spec.ll