This is an archive of the discontinued LLVM Phabricator instance.

[AArch64][NFC] Add test case for setcc (iN bitcast (vNi1 X)), (iN 0), eq
ClosedPublic

Authored by c-rhodes on Jul 20 2022, 5:54 AM.

Details

Summary

To be combined to vecreduce_or (setcc X, 0, eq) in follow on patch.

Diff Detail

Event Timeline

c-rhodes created this revision.Jul 20 2022, 5:54 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 20 2022, 5:54 AM
c-rhodes requested review of this revision.Jul 20 2022, 5:54 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 20 2022, 5:54 AM
c-rhodes updated this revision to Diff 446158.Jul 20 2022, 7:58 AM

Add test for v8i1.

c-rhodes retitled this revision from [AArch64][NFC] Add test case for setcc (i16 bitcast (v16i1 X)), (i16 0), eq to [AArch64][NFC] Add test case for setcc (iN bitcast (vNi1 X)), (iN 0), eq.Jul 20 2022, 7:58 AM
paulwalker-arm added inline comments.Jul 20 2022, 8:08 AM
llvm/test/CodeGen/AArch64/dag-combine-setcc.ll
5

Others will add related tests to this file so a more descriptive name is desirable.

c-rhodes updated this revision to Diff 446774.Jul 22 2022, 3:54 AM
  • Use more descriptive function names in test.
  • Added tests for v32i1 and v64i1. I've changed the tests to take vectors of i8s rather than i1s since the arg passing codegen for larger i1 vectors is pretty horrendous and not the point of this patch.
c-rhodes marked an inline comment as done.Jul 22 2022, 3:54 AM
paulwalker-arm added inline comments.Jul 22 2022, 7:09 AM
llvm/test/CodeGen/AArch64/dag-combine-setcc.ll
5

Given these are reduction tests, what's the reason for returning a vector type? I think returning i1 is more in keeping with real world usage and removes some of the weirdness seen when returning the larger vector i1 types.

c-rhodes updated this revision to Diff 446845.Jul 22 2022, 8:24 AM

Return i1 from tests.

c-rhodes marked an inline comment as done.Jul 22 2022, 8:26 AM
c-rhodes added inline comments.
llvm/test/CodeGen/AArch64/dag-combine-setcc.ll
5

Given these are reduction tests, what's the reason for returning a vector type? I think returning i1 is more in keeping with real world usage and removes some of the weirdness seen when returning the larger vector i1 types.

Not sure what you mean by weirdness, most of these instructions are gone in the next patch, fair point though there's no need to return vector.

peterwaller-arm accepted this revision.Jul 25 2022, 1:33 AM
This revision is now accepted and ready to land.Jul 25 2022, 1:33 AM
This revision was landed with ongoing or failed builds.Jul 25 2022, 5:15 AM
This revision was automatically updated to reflect the committed changes.
c-rhodes marked an inline comment as done.