Fix a couple of things:
authorBruno Cardoso Lopes <bruno.cardoso@gmail.com>
Fri, 15 Jul 2011 22:24:33 +0000 (22:24 +0000)
committerBruno Cardoso Lopes <bruno.cardoso@gmail.com>
Fri, 15 Jul 2011 22:24:33 +0000 (22:24 +0000)
commit5bc37dd1319c81e77878003f557c7c852e819f78
tree24a0316433b4ad9ea6320a2d7ebc9c808e3893b3
parent983d19dd104e0c106c78971b0267d3d5de86e02b
Fix a couple of things:

1) Make non-legal 256-bit loads to be promoted to v4i64. This lets us
canonize the loads and handle things the same way we use to handle
for 128-bit registers. Despite of what one of the removed comments
explained, the load promotion would not mess with VPERM, it's only a
matter of doing the appropriate bitcasts when this instructions comes
to be introduced. Also make LOAD v8i32 legal.

2) Doing 1) exposed two bugs:
- v4i64 was being promoted to itself for several opcodes (introduced
in r124447 by David Greene) causing endless recursion and the stack to
explode.
- there was no support for allOnes BUILD_VECTORs and ANDNP would fail to
match because it was generating early target constant pools during
lowering.

3) The testcases are already checked-in, doing 1) exposed the
bugs in the current testcases.

4) Tidy up code to be more clear and explicit about AVX.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135313 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/X86/avx-256-arith.s [new file with mode: 0644]