[all-commits] [llvm/llvm-project] 1626ee: [DAGCombine] Hoist shifts out of a logic operation...

Filipp Zhinkin via All-commits all-commits at lists.llvm.org
Fri Aug 12 02:42:30 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1626ee6a9581be98d4a2dc251524ad6dc2725696
      https://github.com/llvm/llvm-project/commit/1626ee6a9581be98d4a2dc251524ad6dc2725696
  Author: Filipp Zhinkin <filipp.zhinkin at gmail.com>
  Date:   2022-08-12 (Fri, 12 Aug 2022)

  Changed paths:
    M llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
    M llvm/test/CodeGen/ARM/icmp-shift-opt.ll
    M llvm/test/CodeGen/ARM/shift-combine.ll
    M llvm/test/CodeGen/PowerPC/p10-handle-split-promote-vec.ll
    M llvm/test/CodeGen/X86/bswap_tree2.ll
    M llvm/test/CodeGen/X86/shift-combine.ll

  Log Message:
  -----------
  [DAGCombine] Hoist shifts out of a logic operations tree.

Hoist and combine shift operations from logic operations tree:
logic (logic (SH x0, s), y), (logic (SH x1, s), z)  --> logic (SH (logic x0, x1), s), (logic y, z)

The transformation improves code generated for some cases related to the issue https://github.com/llvm/llvm-project/issues/49541.

Correctness:
https://alive2.llvm.org/ce/z/pVqVgY
https://alive2.llvm.org/ce/z/YVvT-q
https://alive2.llvm.org/ce/z/W5zTBq
https://alive2.llvm.org/ce/z/YfJsvJ
https://alive2.llvm.org/ce/z/3YSyDM
https://alive2.llvm.org/ce/z/Bs2kzk
https://alive2.llvm.org/ce/z/EoQpzU
https://alive2.llvm.org/ce/z/Jnc_5H
https://alive2.llvm.org/ce/z/_LP6k_
https://alive2.llvm.org/ce/z/KvZNC9

Reviewed By: spatel

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




More information about the All-commits mailing list