[PATCH] D88575: [SVE][CodeGen] Fix implicit TypeSize->uint64_t casts in TypePromotion

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 30 15:12:55 PDT 2020


efriedma added inline comments.


================
Comment at: llvm/lib/CodeGen/TypePromotion.cpp:985
           EVT PromotedVT = TLI->getTypeToTransformTo(ICmp->getContext(), SrcVT);
-          if (RegisterBitWidth < PromotedVT.getSizeInBits()) {
+          if (RegisterBitWidth < PromotedVT.getScalarSizeInBits()) {
             LLVM_DEBUG(dbgs() << "IR Promotion: Couldn't find target register "
----------------
Any reason to prefer `getScalarSizeInBits()` over `PromotedVT.getSizeInBits().getFixedSize()`?  If it's just the number of characters, should we have a "getFixedSizeInBits()`?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D88575/new/

https://reviews.llvm.org/D88575



More information about the llvm-commits mailing list