[all-commits] [llvm/llvm-project] 3b49a9: [AggressiveInstCombine] Combine consecutive loads ...

bipmis via All-commits all-commits at lists.llvm.org
Wed Sep 28 09:33:26 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3b49a9fcf6931d347923e7993308fb4e275c7fb6
      https://github.com/llvm/llvm-project/commit/3b49a9fcf6931d347923e7993308fb4e275c7fb6
  Author: bipmis <biplob.mishra at arm.com>
  Date:   2022-09-28 (Wed, 28 Sep 2022)

  Changed paths:
    M llvm/lib/Transforms/AggressiveInstCombine/AggressiveInstCombine.cpp
    M llvm/test/Transforms/AggressiveInstCombine/AArch64/or-load.ll
    M llvm/test/Transforms/AggressiveInstCombine/X86/or-load.ll

  Log Message:
  -----------
  [AggressiveInstCombine] Combine consecutive loads which are being merged to form a wider load.

The patch simplifies some of the patterns as below

1. (ZExt(L1) << shift1) | (ZExt(L2) << shift2) -> ZExt(L3) << shift1
2. (ZExt(L1) << shift1) | ZExt(L2) -> ZExt(L3)

The pattern is indicative of the fact that the loads are being merged to a wider load and the only use of this pattern is with a wider load. In this case for a non-atomic/non-volatile loads reduce the pattern to a combined load which would improve the cost of inlining, unrolling, vectorization etc.

Fix the error reported on reverse load merge.

Differential Revision: https://reviews.llvm.org/D127392




More information about the All-commits mailing list