[SelectionDAG] Add partial BITCAST support to computeKnownBits
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Fri, 9 Dec 2016 10:13:45 +0000 (10:13 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Fri, 9 Dec 2016 10:13:45 +0000 (10:13 +0000)
commite4050a296181d10e90eb85cf66ce49e417a96e2a
tree873f54cbde58451f9484b720551a50d64abd3dff
parent73ee5c2fc4d9b3d793772a610ae02f4cf04e3ba3
[SelectionDAG] Add partial BITCAST support to computeKnownBits

Adds support for bitcasting a little endian 'small element' vector to 'large element' scalar/vector (e.g. v16i8 to v4i32 or v2i32 to i64), which is required for PR30845. We extract the knownbits for each 'small element' part and concatenate the results together.

We can add support for big endian and 'large element' scalar/vector to 'small element' vector bitcasting once we have test cases for them.

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

llvm-svn: 289200
llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
llvm/test/CodeGen/X86/pmul.ll