[PATCH] D122655: [SDAG] try to canonicalize logical shift after bswap
    Simon Pilgrim via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Tue Mar 29 07:51:10 PDT 2022
    
    
  
RKSimon added a comment.
As bswap nodes tend to be generated in the DAG via load combines I agree we need this fold here as well as instcombine
================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:9756
 
+  if ((N0.getOpcode() == ISD::SHL || N0.getOpcode() == ISD::SRL) &&
+      N0.hasOneUse()) {
----------------
Add comment describing the fold
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D122655/new/
https://reviews.llvm.org/D122655
    
    
More information about the llvm-commits
mailing list