[ARM] Enable vector extload combine for legal types.
authorAhmed Bougacha <ahmed.bougacha@gmail.com>
Thu, 5 Mar 2015 19:37:53 +0000 (19:37 +0000)
committerAhmed Bougacha <ahmed.bougacha@gmail.com>
Thu, 5 Mar 2015 19:37:53 +0000 (19:37 +0000)
commit67297cd9563d6385570be219098faf8d0fe4c0de
tree9417170ce30b46f8ef002cf04af6cdc6fe2ff9fd
parent387cf215c00f72212b5b088803c71147f9025ff6
[ARM] Enable vector extload combine for legal types.

This commit enables forming vector extloads for ARM.
It only does so for legal types, and when we can't fold the extension
in a wide/long form of the user instruction.

Enabling it for larger types isn't as good an idea on ARM as it is on
X86, because:
- we pretend that extloads are legal, but end up generating vld+vmov
- we have instructions like vld {dN, dM}, which can't be generated
  when we "manually expand" extloads to vld+vmov.

For legal types, the combine doesn't fire that often: in the
integration tests only in a big endian testcase, where it removes a
pointless AND.

Related to rdar://19723053
Differential Revision: http://reviews.llvm.org/D7423

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231396 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/ARM/ARMISelLowering.cpp
lib/Target/ARM/ARMISelLowering.h
test/CodeGen/ARM/big-endian-neon-extend.ll
test/CodeGen/ARM/dagcombine-anyexttozeroext.ll
test/CodeGen/ARM/vector-extend-narrow.ll