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

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 7 10:24:21 PST 2022


RKSimon added a comment.

A slight complication - its going to be tricky to extend this to handle non-binops in the future - fma (inc X86ISD variants) and some target shuffles come to mind



================
Comment at: llvm/include/llvm/CodeGen/TargetLowering.h:2859
 
+  virtual bool shouldFoldBinopIntoSelect(unsigned BinOpcode, EVT VT) const {
+    return false;
----------------
Add comment doxygen


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D119150/new/

https://reviews.llvm.org/D119150



More information about the llvm-commits mailing list