[all-commits] [llvm/llvm-project] a68e09: [SDAG] move x86 select-with-identity-constant fold...

Sanjay Patel via All-commits all-commits at lists.llvm.org
Tue Feb 8 06:55:19 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a68e098024708cba7b37d6c5a27a4003e8944142
      https://github.com/llvm/llvm-project/commit/a68e098024708cba7b37d6c5a27a4003e8944142
  Author: Sanjay Patel <spatel at rotateright.com>
  Date:   2022-02-08 (Tue, 08 Feb 2022)

  Changed paths:
    M llvm/include/llvm/CodeGen/TargetLowering.h
    M llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
    M llvm/lib/Target/X86/X86ISelLowering.cpp
    M llvm/lib/Target/X86/X86ISelLowering.h

  Log Message:
  -----------
  [SDAG] move x86 select-with-identity-constant fold behind a target hook; NFC

This is no-functional-change-intended because only the
x86 target enables the TLI hook currently.

We can add fmul/fdiv opcodes to the switch similar to the
proposal D119111, but we don't need to make other changes
like enabling target-specific combines.

We can also add integer opcodes (add, or, shl, etc.) to
the switch because this function is called from all of the
generic binary opcodes.

The goal is to incrementally enable the profitable diffs
from D90113 while avoiding regressions.

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




More information about the All-commits mailing list