This is an archive of the discontinued LLVM Phabricator instance.

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

Authored by mkazantsev on Mar 14 2023, 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.Mar 14 2023, 4:52 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 14 2023, 4:52 AM
mkazantsev requested review of this revision.Mar 14 2023, 4:52 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 14 2023, 4:52 AM
nikic accepted this revision.Mar 14 2023, 6:15 AM

LG

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

TCC_Free?

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

Yup, thanks.

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