[PATCH] D112754: X86: Fold masked merge pattern when and-not is not available
    Matthias Braun via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Fri Oct 29 13:40:24 PDT 2021
    
    
  
MatzeB added a comment.
> Also, we have TargetLowering::hasAndNot - could we not use that and work to make this a generic combine?
Only some targets implement `hasAndNot`: AArch64, PowerPC, VE and X86. Some of the others provide hasAndNot implementations anyway and I've seen various failures in recognizing min/max/saturation patterns when implementing it. So unfortunately implementing this in a generic fashion is not really an option, hence I provide a generic helper function here that target authors can start to use when they made sure there's no accidental regressions.
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D112754/new/
https://reviews.llvm.org/D112754
    
    
More information about the llvm-commits
mailing list