If the operands of a shuffle are concatenations of i1 vectors and undef,
this patch tries to rewrite the operands without the concatenation by doing a
bitcast instead. This avoids BUILD_VECTORs during legalisation, which
ultimately leads to better codegen.
This is WIP because currently two tests are failing that need looking into, but
in the meantime I wanted to get your opinion @dmgreen on the approach.
This creates a setcc with the result type set to the input type? What happens for targets which want to use a native vxi1 datatype, as they have native predicate registers?
There is a getSetCCResultType method in which the target specifies what the setcc result type should become. There is also a TargetLowering::BooleanContent that specifies whether the bits of the predicate from setcc should be 0/1 or 0/-1 or the top bits are undefined.