OSDN Git Service

[X86] Lower blended PACKUSes using appropriate types.
authorAhmed Bougacha <ahmed.bougacha@gmail.com>
Wed, 29 Jun 2016 16:56:09 +0000 (16:56 +0000)
committerAhmed Bougacha <ahmed.bougacha@gmail.com>
Wed, 29 Jun 2016 16:56:09 +0000 (16:56 +0000)
commitcdfe078a42f95b07294f711d84b965fd6ef45ad5
tree2683a7a81067f773c7b2ad40c925b889f4f3113a
parentf98b39d12ddf7e745d2591339b56c979dc13aca3
[X86] Lower blended PACKUSes using appropriate types.

When lowering two blended PACKUS, we used to disregard the types
of the PACKUS inputs, indiscriminately generating a v16i8 PACKUS.

This leads to non-selectable things like:
    (v16i8 (PACKUS (v4i32 v0), (v4i32 v1)))

Instead, check that the PACKUSes have the same type, and use that
as the final result type.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274138 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/X86/vector-shuffle-sse41.ll [new file with mode: 0644]