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.
Paths
| Differential D81327
[X86] Teach combineBitcastvxi1 to prefer movmsk on avx512 in more cases ClosedPublic Authored by craig.topper on Jun 5 2020, 10:58 PM.
Details Summary If the input to the bitcast is a sign bit test, it makes sense to Fixes PR46200.
Diff Detail
Unit TestsFailed
Event Timeline
craig.topper added inline comments.
Comment Actions Add a reversing transform for bitcasts that appear during intrinsic lowering. This This revision is now accepted and ready to land.Jun 13 2020, 2:19 PM Closed by commit rGcb5072d1877b: [X86] Teach combineBitcastvxi1 to prefer movmsk on avx512 in more cases (authored by craig.topper). · Explain WhyJun 13 2020, 2:57 PM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 268996 llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/test/CodeGen/X86/avx512bwvl-intrinsics-upgrade.ll
llvm/test/CodeGen/X86/avx512dqvl-intrinsics-upgrade.ll
llvm/test/CodeGen/X86/bitcast-setcc-256.ll
llvm/test/CodeGen/X86/bitcast-vector-bool.ll
llvm/test/CodeGen/X86/movmsk-cmp.ll
|
I don't recognise what (c/c++) intrinsic this would have come from - is this likely to be a problem? Same for the other *-intrinsics-upgrade.ll cases