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

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 7 09:08:30 PST 2022


spatel created this revision.
spatel added reviewers: LuoYuanke, pengfei, RKSimon, craig.topper.
Herald added subscribers: ecnelises, hiraditya, mcrosier.
spatel requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

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 <https://reviews.llvm.org/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 opcodes.


https://reviews.llvm.org/D119150

Files:
  llvm/include/llvm/CodeGen/TargetLowering.h
  llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
  llvm/lib/Target/X86/X86ISelLowering.cpp
  llvm/lib/Target/X86/X86ISelLowering.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D119150.406490.patch
Type: text/x-patch
Size: 8801 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220207/aea89a8e/attachment.bin>


More information about the llvm-commits mailing list