Page MenuHomePhabricator

[TTI] Treat AND/OR with widenable conditions as free of cost
ClosedPublic

Authored by mkazantsev on Tue, Mar 14, 4:52 AM.

Details

Summary

Because widenable conditions with eventually lower into a constant, such instructions
as and, or etc. will also be optimized away. Treat them as free.

This is an important thing to have if we want that guards represented as experimental.guard
calls and in their explicit form (branch by and with widenable condition) have the same cost
for unroller and other passes like this.

Diff Detail

Event Timeline

mkazantsev created this revision.Tue, Mar 14, 4:52 AM
Herald added a project: Restricted Project. · View Herald TranscriptTue, Mar 14, 4:52 AM
mkazantsev requested review of this revision.Tue, Mar 14, 4:52 AM
Herald added a project: Restricted Project. · View Herald TranscriptTue, Mar 14, 4:52 AM
nikic accepted this revision.Tue, Mar 14, 6:15 AM

LG

llvm/include/llvm/Analysis/TargetTransformInfoImpl.h
526

TCC_Free?

This revision is now accepted and ready to land.Tue, Mar 14, 6:15 AM
mkazantsev added inline comments.Tue, Mar 14, 6:23 AM
llvm/include/llvm/Analysis/TargetTransformInfoImpl.h
526

Yup, thanks.

This revision was landed with ongoing or failed builds.Tue, Mar 14, 6:55 AM
This revision was automatically updated to reflect the committed changes.