HomePhabricator

[X86][SSE] getV4X86ShuffleImm8 - canonicalize broadcast masks

Authored by RKSimon on Wed, Jul 29, 3:32 AM.

Description

[X86][SSE] getV4X86ShuffleImm8 - canonicalize broadcast masks

If the mask input to getV4X86ShuffleImm8 only refers to a single source element (+ undefs) then canonicalize to a full broadcast.

getV4X86ShuffleImm8 defaults to inline values for undefs, which can be useful for shuffle widening/narrowing but does leave SimplifyDemanded* calls thinking the shuffle depends on unnecessary elements.

I'm still investigating what we should do more generally to avoid these undemanded elements, but broadcast cases was a simpler win.

Details

Committed
RKSimonWed, Jul 29, 3:32 AM
Parents
rG2e7baf61970a: [MLIR][Shape] Allow `shape.add` to operate on indices
Branches
Unknown
Tags
Unknown