This is an archive of the discontinued LLVM Phabricator instance.

[AArch64][SVE] Implement integer compare intrinsics
ClosedPublic

Authored by c-rhodes on Dec 2 2019, 3:05 AM.

Details

Summary

Adds intrinsics for the following:

  • cmphs, cmphi
  • cmpge, cmpgt
  • cmpeq, cmpne
  • cmplt, cmple
  • cmplo, cmpls

Includes a minor change to TLI.getMemValueType that fixes a crash due to the
scalable flag being dropped.

Diff Detail

Event Timeline

c-rhodes created this revision.Dec 2 2019, 3:05 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 2 2019, 3:05 AM

No testcases for the "IR" (setcc) patterns?

No testcases for the "IR" (setcc) patterns?

Good spot, so for the signed and unsigned immediate variants (defined with sve_int_scmp_vi, sve_int_ucmp_vi) there are IR tests in sve-intrinsics-int-compares-with-imm.ll but it seems I missed a separate test we have downstream covering the non-immediate forms (defined with sve_int_cmp_0). I tried pulling that test in but it looks like it's failing for a number of reasons I don't entirely understand just yet. I think for this patch I'll remove the IR patterns for the non-immediate forms and in the meantime see what's required there for a follow-up patch.

c-rhodes updated this revision to Diff 232356.Dec 5 2019, 8:36 AM

Remove IR patterns for non-immediate forms.

efriedma accepted this revision.Dec 5 2019, 9:29 AM

LGTM

This revision is now accepted and ready to land.Dec 5 2019, 9:29 AM
This revision was automatically updated to reflect the committed changes.