[llvm] [InstCombine] Optimistically allow multiple shufflevector uses in foldOpPhi (PR #114278)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 8 06:36:42 PST 2024


nikic wrote:

> > If I'm reading this correctly, then nothing here actually guarantees that all shufflevectors are going to simplify? You just check that all uses are shufflevectors, but then simplify each individually.
> 
> See L1851-1855:
> 
> ```
>      // Be conservative in cases with multiple uses and require all inputs to
>      // simplify.
> 
>      if (MultipleShuffleVectorUses)
>        return nullptr;
> ```

Right, but doesn't think just check that *this* shufflevector simplifies (for all phi inputs), not that *all* shufflevectors simplify?

https://github.com/llvm/llvm-project/pull/114278


More information about the llvm-commits mailing list