[PATCH] D112085: [DAGCombiner] fold bit-hack form of usubsat

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 19 11:13:13 PDT 2021


spatel added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:6020
 
+  if (TLI.isOperationLegal(ISD::USUBSAT, VT))
+    if (SDValue V = foldAndToUsubsat(N, DAG))
----------------
RKSimon wrote:
> If we could use hasOperation then AVX1 should be able to match this for 256-bit integers as well.
Yes - that's how I had drafted this initially, but I noticed potential regressions with extra uses. 
But extra-use patterns on something like this might be too rare to worry about.
I'll add some more tests and update.


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

https://reviews.llvm.org/D112085



More information about the llvm-commits mailing list