This is an archive of the discontinued LLVM Phabricator instance.

[SVE][CodeGen] Add simple integer add tests for SVE tuple types
ClosedPublic

Authored by david-arm on Jul 17 2020, 3:59 AM.

Details

Summary

I have added tests to:

CodeGen/AArch64/sve-intrinsics-int-arith.ll

for doing simple integer add operations on tuple types. Since these
tests introduced new warnings due to incorrect use of
getVectorNumElements() I have also fixed up these warnings in the
same patch. These fixes are:

  1. In narrowExtractedVectorBinOp I have changed the code to bail out

early for scalable vector types, since we've not yet hit a case that
proves the optimisations are profitable for scalable vectors.

  1. In DAGTypeLegalizer::WidenVecRes_CONCAT_VECTORS I have replaced

calls to getVectorNumElements with getVectorMinNumElements in cases
that work with scalable vectors. For the other cases I have added
asserts that the vector is not scalable because we should not be
using shuffle vectors and build vectors in such cases.

Diff Detail

Event Timeline

david-arm created this revision.Jul 17 2020, 3:59 AM
efriedma added inline comments.Jul 20 2020, 3:42 PM
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
19078

I think I committed a similar change today.

david-arm updated this revision to Diff 280817.Jul 27 2020, 1:47 AM
david-arm edited the summary of this revision. (Show Details)
david-arm marked an inline comment as done.Jul 28 2020, 9:11 AM

Hi @efriedma I've rebased my patch now to pick up the same fix you did.

This revision is now accepted and ready to land.Jul 28 2020, 10:59 AM