[Hexagon] Fix isTypeForHVX to recognize floating point types

Co-authored-by: Sumanth Gundapaneni <sgundapa@quicinc.com>
This commit is contained in:
Krzysztof Parzyszek 2021-12-30 09:55:44 -08:00
parent 4a8cef157b
commit cd997689f2
2 changed files with 4 additions and 2 deletions

View File

@ -228,7 +228,9 @@ bool HexagonSubtarget::isTypeForHVX(Type *VecTy, bool IncludeBool) const {
if (!VecTy->isVectorTy() || isa<ScalableVectorType>(VecTy))
return false;
// Avoid types like <2 x i32*>.
if (!cast<VectorType>(VecTy)->getElementType()->isIntegerTy())
Type *ScalTy = VecTy->getScalarType();
if (!ScalTy->isIntegerTy() &&
!(ScalTy->isFloatingPointTy() && useHVXFloatingPoint()))
return false;
// The given type may be something like <17 x i32>, which is not MVT,
// but can be represented as (non-simple) EVT.

View File

@ -1,5 +1,5 @@
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc -march=hexagon < %s | FileCheck %s
; RUN: llc -march=hexagon -hexagon-vector-combine=false < %s | FileCheck %s
define void @f0(<128 x i8> %a0, <128 x i8>* %a1) #0 {
; CHECK-LABEL: f0: