Skip to content

Commit

Permalink
[AArch64][SVE] Asm: Extend EnforceVectorSubVectorTypeIs to distinguis…
Browse files Browse the repository at this point in the history
…h Scalable Vectors

Patch [1/5] in a series to add assembler/disassembler support for AArch64 SVE
unpredicated ADD/SUB instructions.

Patch by Sander De Smalen.

Reviewed by: rengolin

Differential Revision: https://reviews.llvm.org/D39087

llvm-svn: 317564
  • Loading branch information
fhahn committed Nov 7, 2017
1 parent 5976583 commit 603c645
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions llvm/utils/TableGen/CodeGenDAGPatterns.cpp
Expand Up @@ -603,6 +603,11 @@ bool TypeInfer::EnforceVectorSubVectorTypeIs(TypeSetByHwMode &Vec,
auto IsSubVec = [](MVT B, MVT P) -> bool {
if (!B.isVector() || !P.isVector())
return false;
// Logically a <4 x i32> is a valid subvector of <n x 4 x i32>
// but until there are obvious use-cases for this, keep the
// types separate.
if (B.isScalableVector() != P.isScalableVector())
return false;
if (B.getVectorElementType() != P.getVectorElementType())
return false;
return B.getVectorNumElements() < P.getVectorNumElements();
Expand Down

0 comments on commit 603c645

Please sign in to comment.