[PATCH] D111237: [TypePromotion] Search from ZExt + PHI

Andre Vieira via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 8 01:54:10 PDT 2022


avieira updated this revision to Diff 450734.
avieira retitled this revision from "[TypePromotion] Promote PHI + [SZ]Ext" to "[TypePromotion] Search from ZExt + PHI".
avieira added a comment.
Herald added a project: All.

Hi all,

This is a complete revamp of my original patch, based on @samparker's patch in https://reviews.llvm.org/D118906/new/ with some changes. The most important ones are:

- we start searching from a ZExt and use it's result type to determine the width to promote the sequence to,
- we only promote phi node's inside a loop.

Benchmarked SPEC CPU 2017 Intrate on aarch64-none-linux. No significant changes in performance or size. Benchmarked Snappy and with this patch there is no performance regression when the inline assembly hack is removed that was put in place to prevent the generation of the superfluous 'and'.

Also ran llvm-test-suite and geomean stays the same, though I must say that there was a lot of variability from run to run even with the same binaries :(


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

https://reviews.llvm.org/D111237

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D111237.450734.patch
Type: text/x-patch
Size: 10190 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220808/c68c3142/attachment.bin>


More information about the llvm-commits mailing list