[codegen,aarch64] Add a target hook to the code generator to control
authorChandler Carruth <chandlerc@gmail.com>
Thu, 3 Jul 2014 00:23:43 +0000 (00:23 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Thu, 3 Jul 2014 00:23:43 +0000 (00:23 +0000)
commit70968365db232f3a90db22f3ed73a4f6c1b431bd
treeb13f1a405df6dcb24173ba76d7d939a466390fd1
parent1ccffdf27f05569a5b6497afb4dd1e1a3dc6503e
[codegen,aarch64] Add a target hook to the code generator to control
vector type legalization strategies in a more fine grained manner, and
change the legalization of several v1iN types and v1f32 to be widening
rather than scalarization on AArch64.

This fixes an assertion failure caused by scalarizing nodes like "v1i32
trunc v1i64". As v1i64 is legal it will fail to scalarize v1i32.

This also provides a foundation for other targets to have more granular
control over how vector types are legalized.

Patch by Hao Liu, reviewed by Tim Northover. I'm committing it to allow
some work to start taking place on top of this patch as it adds some
really important hooks to the backend that I'd like to immediately start
using. =]

http://reviews.llvm.org/D4322

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212242 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Target/TargetLowering.h
lib/CodeGen/TargetLoweringBase.cpp
lib/Target/AArch64/AArch64ISelLowering.cpp
lib/Target/AArch64/AArch64ISelLowering.h
lib/Target/NVPTX/NVPTXISelLowering.cpp
lib/Target/NVPTX/NVPTXISelLowering.h
lib/Target/R600/SIISelLowering.cpp
lib/Target/R600/SIISelLowering.h
test/CodeGen/AArch64/arm64-neon-copy.ll
test/CodeGen/AArch64/arm64-neon-select_cc.ll