llvm-project
815edc3f - [SelectionDAG] Recurse through mask expression trees in WidenVSELECTMask (#188085)

Commit
1 day ago
[SelectionDAG] Recurse through mask expression trees in WidenVSELECTMask (#188085) WidenVSELECTMask currently handles only two mask shapes: a bare SETCC or a single AND/OR/XOR of exactly two SETCCs. Anything deeper bails out to the generic condition widening path, which often introduces unnecessary narrow/widen roundtrips (xtn+sshll on AArch64, packssdw+vpmovsxwd on X86). Replace the hand-coded cases with a recursive widenMaskTree that walks through SETCC, AND/OR/XOR, FREEZE, VECTOR_SHUFFLE, SELECT/VSELECT, and all-ones/all-zeros BUILD_VECTORs.
Parents
Loading