[all-commits] [llvm/llvm-project] 8b7567: [SDAG] try to replace subtract-from-constant with xor

Sanjay Patel via All-commits all-commits at lists.llvm.org
Fri Jul 8 05:16:58 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8b756713140f0661882ddd451cef7e245cf112aa
      https://github.com/llvm/llvm-project/commit/8b756713140f0661882ddd451cef7e245cf112aa
  Author: Sanjay Patel <spatel at rotateright.com>
  Date:   2022-07-08 (Fri, 08 Jul 2022)

  Changed paths:
    M llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
    M llvm/lib/Target/X86/X86InstrCompiler.td
    M llvm/test/CodeGen/AArch64/sub1.ll
    M llvm/test/CodeGen/AMDGPU/ds-sub-offset.ll
    M llvm/test/CodeGen/AMDGPU/setcc-multiple-use.ll
    M llvm/test/CodeGen/ARM/intrinsics-overflow.ll
    M llvm/test/CodeGen/ARM/usub_sat.ll
    M llvm/test/CodeGen/ARM/usub_sat_plus.ll
    M llvm/test/CodeGen/PowerPC/bool-math.ll
    M llvm/test/CodeGen/PowerPC/select_const.ll
    M llvm/test/CodeGen/RISCV/atomic-rmw.ll
    M llvm/test/CodeGen/RISCV/atomic-signext.ll
    M llvm/test/CodeGen/SPARC/64bit.ll

  Log Message:
  -----------
  [SDAG] try to replace subtract-from-constant with xor

This is almost the same as the abandoned D48529, but it
allows splat vector constants too.

This replaces the x86-specific code that was added with
the alternate patch D48557 with the original generic
combine.

This transform is a less restricted form of an existing
InstCombine and the proposed SDAG equivalent for that
in D128080:
https://alive2.llvm.org/ce/z/OUm6N_

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




More information about the All-commits mailing list