[PATCH] D137934: [InstCombine] Fold extractelt with select of constants
    Thomas Symalla via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Tue Nov 15 03:07:24 PST 2022
    
    
  
tsymalla added a comment.
In D137934#3926911 <https://reviews.llvm.org/D137934#3926911>, @foad wrote:
> You don't need your new function FoldExtractElementSelectConstVector at all. All you should need to do is to call FoldOpIntoSelect from visitExtractElementInst, and add (trivial) support for ExtractElementInst in foldOperationIntoSelectOperand. For example: https://reviews.llvm.org/differential/diff/475368/
Thanks. It needs to be done earlier, in `constantFoldOperationIntoSelectOperand`, but should nevertheless work.
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D137934/new/
https://reviews.llvm.org/D137934
    
    
More information about the llvm-commits
mailing list