[X86][SSE] Truncate with PACKSS any input with sufficient sign-bits
So far we've only been using PACKSS truncations with 'all-bits or zero-bits' patterns (vector comparison results etc.). When really we can safely use it for any case as long as the number of sign bits reach down to the last 16-bits (or 8-bits if we're truncating to bytes). The next steps after this is add the equivalent support for PACKUS and to support packing to sub-128 bit vectors for truncating stores etc. Differential Revision: https://reviews.llvm.org/D39476 llvm-svn: 317086
Showing
- llvm/lib/Target/X86/X86ISelLowering.cpp 12 additions, 9 deletionsllvm/lib/Target/X86/X86ISelLowering.cpp
- llvm/test/CodeGen/X86/avg.ll 36 additions, 37 deletionsllvm/test/CodeGen/X86/avg.ll
- llvm/test/CodeGen/X86/avx2-shift.ll 4 additions, 6 deletionsllvm/test/CodeGen/X86/avx2-shift.ll
- llvm/test/CodeGen/X86/avx2-vector-shifts.ll 4 additions, 6 deletionsllvm/test/CodeGen/X86/avx2-vector-shifts.ll
- llvm/test/CodeGen/X86/vector-shift-ashr-128.ll 4 additions, 6 deletionsllvm/test/CodeGen/X86/vector-shift-ashr-128.ll
- llvm/test/CodeGen/X86/vector-trunc.ll 46 additions, 103 deletionsllvm/test/CodeGen/X86/vector-trunc.ll
Loading
Please register or sign in to comment