llvm-project
76875480 - [InstCombine] Optimistically allow multiple shufflevector uses in foldOpPhi (#114278)

Commit
293 days ago
[InstCombine] Optimistically allow multiple shufflevector uses in foldOpPhi (#114278) We would like to optimize situations of the form that happen after loop vectorization+SROA: ``` loop: %phi = phi zeroinitializer, %interleaved %deinterleave_a = shufflevector %phi, poison ; pick half of the lanes %deinterleave_b = shufflevector %phi, posion ; pick remaining lanes ... %a = ... %b = ... %interleaved = shufflevector %a, %b ; interleave lanes of a+b ``` where the interleave and de-interleave shuffle operations cancel each other out. This could be handled by `foldOpPhi` but does not currently work because it does not proceed when there are multiple uses of the `Phi` operation. This extends `foldOpPhi` to allow multiple `shufflevector` uses when they are shown to simplify for all `Phi` input values.
Author
Parents
Loading