This is an archive of the discontinued LLVM Phabricator instance.

[SVE][CodeGen] Fix implicit TypeSize->uint64_t casts in TypePromotion
ClosedPublic

Authored by david-arm on Sep 30 2020, 7:50 AM.

Details

Summary

The TypePromotion pass only operates on scalar types so I've fixed up
all places where we were relying upon the implicit cast from
TypeSize->uint64_t.

Diff Detail

Event Timeline

david-arm created this revision.Sep 30 2020, 7:50 AM
david-arm requested review of this revision.Sep 30 2020, 7:50 AM
efriedma added inline comments.Sep 30 2020, 3:12 PM
llvm/lib/CodeGen/TypePromotion.cpp
985

Any reason to prefer getScalarSizeInBits() over PromotedVT.getSizeInBits().getFixedSize()? If it's just the number of characters, should we have a "getFixedSizeInBits()`?

efriedma accepted this revision.Oct 1 2020, 7:28 AM

LGTM

This revision is now accepted and ready to land.Oct 1 2020, 7:28 AM