]> granicus.if.org Git - llvm/commit
[X86][SSE] Improve SINT_TO_FP of boolean vector results (signum)
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Tue, 15 Nov 2016 16:24:40 +0000 (16:24 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Tue, 15 Nov 2016 16:24:40 +0000 (16:24 +0000)
commit5ecd47336f91f388a9ddce7fd6e39e12136cfb67
treeb8040feca374a5da55386c3ec7c379d06a37b8d4
parent33942aedc592969d6a780db6ae3a48200fe8cd70
[X86][SSE] Improve SINT_TO_FP of boolean vector results (signum)

This patch helps avoids poor legalization of boolean vector results (e.g. 8f32 -> 8i1 -> 8i16) that feed into SINT_TO_FP by inserting an early SIGN_EXTEND and so help improve the truncation logic.

This is not necessary for AVX512 targets where boolean vectors are legal - AVX512 manages to lower ( sint_to_fp vXi1 ) into some form of ( select mask, 1.0f , 0.0f ) in most cases.

Fix for PR13248

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286979 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/X86/avx512-cvt.ll
test/CodeGen/X86/sse-fsignum.ll