[PATCH] D113495: [TypePromotion] Fix a hardcoded use of 32 as the size being promoted to.

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 10 06:57:38 PST 2021


dmgreen accepted this revision.
dmgreen added a comment.

Do you mind making a couple of other adjustments whilst you are here? If not, I can look into them later - I apparently need to look into adjusting this same function.



================
Comment at: llvm/lib/CodeGen/TypePromotion.cpp:368
 
   APInt Max = APInt::getAllOnes(TypePromotion::TypeSize);
 
----------------
TypePromotion::TypeSize -> TypeSize ?


================
Comment at: llvm/lib/CodeGen/TypePromotion.cpp:370
 
   if (Total.getBitWidth() > Max.getBitWidth()) {
     if (Total.ugt(Max.zext(Total.getBitWidth())))
----------------
Total.getBitWidth() -> RegisterBitWidth
Max.getBitWidth() -> TypeSize


================
Comment at: llvm/lib/CodeGen/TypePromotion.cpp:379
 
   LLVM_DEBUG(dbgs() << "IR Promotion: Allowing safe overflow for "
              << *I << "\n");
----------------
Can you format this comment whilst you are here?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D113495



More information about the llvm-commits mailing list