HomePhabricator

[X86][AVX] splitIntVSETCC - handle separate (canonicalized) SETCC operands

Authored by RKSimon on Mar 25 2021, 3:01 AM.

Description

[X86][AVX] splitIntVSETCC - handle separate (canonicalized) SETCC operands

LowerVSETCC calls splitIntVSETCC after canonicalizing certain patterns, in particular (X & CPow2 != 0) -> (X & CPow2 == CPow2).

Unfortunately if we're splitting for AVX1/non-AVX512BW cases, we lose these canonicalizations as we call the split with the original SetCC node, and when the split nodes are later lowered in LowerVSETCC the patterns are lost behind extract_subvector etc. But if we pass the canonicalized operands for splitting we retain the optimizations.

Differential Revision: https://reviews.llvm.org/D99256