[PATCH] D154936: [AArch64] Improve cost of umull from known bits

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 11 02:56:34 PDT 2023


dmgreen created this revision.
dmgreen added reviewers: SjoerdMeijer, samtebbs, bipmis, fhahn.
Herald added subscribers: StephenFan, hiraditya, kristof.beyls.
Herald added a project: All.
dmgreen requested review of this revision.
Herald added a subscriber: wangpc.
Herald added a project: LLVM.

As in D140287 <https://reviews.llvm.org/D140287>, we can now generate `umull` from `mul(zext(x), y)` in cases where we know that the top bits of `y` are zero. This teaches that to the cost model, adjusting how isWideningInstruction detects mul operations that can extend both operands. This helps for constants and other cases where the operands of the mul are known to be extended, but not directly extends.


https://reviews.llvm.org/D154936

Files:
  llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
  llvm/lib/Target/AArch64/AArch64TargetTransformInfo.h
  llvm/test/Analysis/CostModel/AArch64/arith-widening.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D154936.538988.patch
Type: text/x-patch
Size: 10163 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230711/08d391f0/attachment-0001.bin>


More information about the llvm-commits mailing list