[PATCH] D131966: [TypePromotion] Don't promote PHI + ZExt if wider than RegisterBitWidth

Andre Vieira via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 16 07:36:05 PDT 2022


avieira created this revision.
avieira added a reviewer: samparker.
Herald added subscribers: hiraditya, kristof.beyls.
Herald added a project: All.
avieira requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

There was an issue reported against D111237 <https://reviews.llvm.org/D111237> because for Arm we were promoting a PHI + ZExt chain to i64, causing the existing idiv to require a library routine to perform a 64-bit division. This patch prevents promoting to a width that is wider than the RegisterBitWidth as that is likely to not be beneficial.


https://reviews.llvm.org/D131966

Files:
  llvm/lib/CodeGen/TypePromotion.cpp
  llvm/test/Transforms/TypePromotion/ARM/phi-zext-gep.ll
  llvm/test/Transforms/TypePromotion/ARM/phi-zext-gep2.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D131966.453002.patch
Type: text/x-patch
Size: 5490 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220816/7c8fe1a8/attachment.bin>


More information about the llvm-commits mailing list