HomePhabricator

[X86] Teach combineBitcastvxi1 to prefer movmsk on avx512 in more cases

Authored by craig.topper on Jun 13 2020, 2:50 PM.

Description

[X86] Teach combineBitcastvxi1 to prefer movmsk on avx512 in more cases

If the input to the bitcast is a sign bit test, it makes sense to
directly use vpmovmskb or vmovmskps/pd. This removes the need to
copy the sign bits to a k-register and then to a GPR.

Fixes PR46200.

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