This is an archive of the discontinued LLVM Phabricator instance.

[CodeGen] Fix warnings in getVectorTypeBreakdown
ClosedPublic

Authored by david-arm on Jun 10 2020, 8:49 AM.

Details

Summary

Added NextPowerOf2() routine to TypeSize and rewritten the code
in getVectorTypeBreakdown to avoid warnings being generated.

Diff Detail

Event Timeline

david-arm created this revision.Jun 10 2020, 8:49 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 10 2020, 8:49 AM
sdesmalen added inline comments.Jun 10 2020, 8:58 AM
llvm/lib/CodeGen/TargetLoweringBase.cpp
1478–1482

Why did you reorder the conditions?

david-arm marked 2 inline comments as done.Jun 10 2020, 10:15 AM
david-arm added inline comments.
llvm/lib/CodeGen/TargetLoweringBase.cpp
1478–1482

Because NewVTSize isn't used at all unless the bitsLT condition is met so it seemed wasteful to calculate it always.

This revision is now accepted and ready to land.Jun 17 2020, 9:44 AM
This revision was automatically updated to reflect the committed changes.
david-arm marked an inline comment as done.