This is an archive of the discontinued LLVM Phabricator instance.

[VPlan] Add VPWidenIntOrFpInductionRecipe::isCanonical, use it.
ClosedPublic

Authored by fhahn on Jan 18 2022, 2:41 AM.

Details

Summary

This patch adds VPWidenIntOrFpInductionRecipe::isCanonical to check if
an induction recipe is canonical. The code is also updated to use it
instead of isCanonicalID.

Diff Detail

Event Timeline

fhahn created this revision.Jan 18 2022, 2:41 AM
fhahn requested review of this revision.Jan 18 2022, 2:41 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 18 2022, 2:41 AM
Herald added a subscriber: vkmr. · View Herald Transcript
Ayal accepted this revision.Jan 18 2022, 8:29 AM

This looks fine, thanks, should be (NFC)?

This revision is now accepted and ready to land.Jan 18 2022, 8:29 AM
This revision was landed with ongoing or failed builds.Jan 21 2022, 1:35 AM
This revision was automatically updated to reflect the committed changes.

If LLVM_ENABLE_ASSERTIONS=OFF then isCanonical is not defined.

See line 1077 of llvm/lib/Transforms/Vectorize/VPlan.cpp:

#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)

Edit: (Thanks Florian for fixing already!)

fhahn added a comment.Jan 21 2022, 2:42 AM

If LLVM_ENABLE_ASSERTIONS=OFF then isCanonical is not defined.

See line 1077 of llvm/lib/Transforms/Vectorize/VPlan.cpp:

#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)

Edit: (Thanks Florian for fixing already!)

Yep thanks for the heads up, should already be fixed by 55689904d2e5