[all-commits] [llvm/llvm-project] e4a2d7: [AArch64][GISel] Always fold G_SHL into addressing...

Him188 via All-commits all-commits at lists.llvm.org
Thu Jul 18 02:22:49 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e4a2d74e0917d481ecda8e8ff0c0af3c683c9441
      https://github.com/llvm/llvm-project/commit/e4a2d74e0917d481ecda8e8ff0c0af3c683c9441
  Author: Him188 <tguan at nvidia.com>
  Date:   2024-07-18 (Thu, 18 Jul 2024)

  Changed paths:
    M llvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp
    M llvm/test/CodeGen/AArch64/GlobalISel/load-addressing-modes.mir
    M llvm/test/CodeGen/AArch64/GlobalISel/store-addressing-modes.mir
    M llvm/test/CodeGen/AArch64/aarch64-fold-lslfast.ll

  Log Message:
  -----------
  [AArch64][GISel] Always fold G_SHL into addressing mode where possible, unless the subtarget has addr-lsl-slow-14 (#96603)

Before this patch, we fold G_SHL into addressing mode lsl only when
there is exactly one usage, or all the usages are memory ops, or we are
optimizing for size. However, lsl is free on all aarch64 targets except
those with FeatureAddrLSLSlow14.

This patch uses this fact and always folds G_SHL into lsl for memory
ops, with exceptions for FeatureAddrLSLSlow14.


This patch also fixes GISel 15% regression in TSVC kernel s482, and
brings regression in s291 from 20% to 10%.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list