diff options
author | Hao Liu <Hao.Liu@arm.com> | 2014-10-31 02:35:34 +0000 |
---|---|---|
committer | Hao Liu <Hao.Liu@arm.com> | 2014-10-31 02:35:34 +0000 |
commit | e02b1a068fddc29b51afd6cf6fc96671696aa5f6 (patch) | |
tree | 085e4edef9aacb5f6f86a8390003cd5cc92f2393 /llvm/lib/CodeGen/TargetLoweringBase.cpp | |
parent | 6256a0ea8fdd051e0f76ac422c353e4ac2b05d35 (diff) | |
download | bcm5719-llvm-e02b1a068fddc29b51afd6cf6fc96671696aa5f6.tar.gz bcm5719-llvm-e02b1a068fddc29b51afd6cf6fc96671696aa5f6.zip |
PR20557: Fix the bug that bogus cpu parameter crashes llc on AArch64 backend.
Initial patch by Oleg Ranevskyy.
llvm-svn: 220945
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringBase.cpp')
-rw-r--r-- | llvm/lib/CodeGen/TargetLoweringBase.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/TargetLoweringBase.cpp b/llvm/lib/CodeGen/TargetLoweringBase.cpp index a5889db9104..d0acf0e6913 100644 --- a/llvm/lib/CodeGen/TargetLoweringBase.cpp +++ b/llvm/lib/CodeGen/TargetLoweringBase.cpp @@ -1200,8 +1200,12 @@ void TargetLoweringBase::computeRegisterProperties() { TransformToType[i] = MVT::Other; if (PreferredAction == TypeScalarizeVector) ValueTypeActions.setTypeAction(VT, TypeScalarizeVector); - else + else if (PreferredAction == TypeSplitVector) ValueTypeActions.setTypeAction(VT, TypeSplitVector); + else + // Set type action according to the number of elements. + ValueTypeActions.setTypeAction(VT, NElts == 1 ? TypeScalarizeVector + : TypeSplitVector); } else { TransformToType[i] = NVT; ValueTypeActions.setTypeAction(VT, TypeWidenVector); |