[Hexagon] Avoid crash on CONCAT_VECTORS with illegal element types
authorKrzysztof Parzyszek <kparzysz@quicinc.com>
Fri, 25 Sep 2020 00:00:15 +0000 (19:00 -0500)
committerKrzysztof Parzyszek <kparzysz@quicinc.com>
Fri, 25 Sep 2020 01:05:23 +0000 (20:05 -0500)
commit3185839bcf6614af28c255e90195f6b1cafee106
tree082b4a65f57d1c27e1917e621a1460fd5a7eadc7
parent1ca6bd261e0aebdd73e3af98fb97c444c2a339cd
[Hexagon] Avoid crash on CONCAT_VECTORS with illegal element types

Legal vector element types may not be legal as scalar types. When
CONCAT_VECTORS is converted to BUILD_VECTOR, the individual vector
elements become standalone operands to the build operation. If they
have illegal (scalar) types, they need to be made legal. In doing
so, the case of TRUNCATE was not handled, causing an assertion to
fail.
llvm/lib/Target/Hexagon/HexagonISelLoweringHVX.cpp
llvm/test/CodeGen/Hexagon/autohvx/isel-hvx-concat-truncate.ll [new file with mode: 0644]