Page MenuHomePhabricator

[VE] setcc isel patterns
ClosedPublic

Authored by simoll on Wed, Jan 22, 3:48 AM.

Details

Summary

SETCC isel patterns and tests for i32/64 and fp32/64 comparison

Diff Detail

Event Timeline

simoll created this revision.Wed, Jan 22, 3:48 AM
Herald added a project: Restricted Project. · View Herald TranscriptWed, Jan 22, 3:48 AM

Unit tests: pass. 62095 tests passed, 0 failed and 794 were skipped.

clang-tidy: unknown.

clang-format: pass.

Build artifacts: diff.json, clang-format.patch, CMakeCache.txt, console-log.txt, test-results.xml

arsenm added inline comments.Wed, Jan 22, 5:24 AM
llvm/lib/Target/VE/VEInstrInfo.td
50–58

You can achieve this with something like:
def COND_OEQ : PatFrags<(ops), [(OtherVT SETOEQ), (OtherVT SETEQ)]>;

which will also work with the GlobalISel emitter

llvm/test/CodeGen/VE/setcc.ll
11 ↗(On Diff #239530)

Enumerating all of the compare types is usually helpful

arsenm added inline comments.Wed, Jan 22, 5:28 AM
llvm/test/CodeGen/VE/setcc.ll
11 ↗(On Diff #239530)

Actually these seem to be in the other test files, so I'm not sure what this one is for

simoll planned changes to this revision.Wed, Jan 22, 6:19 AM
simoll marked 4 inline comments as done.
simoll added inline comments.
llvm/lib/Target/VE/VEInstrInfo.td
50–58

If we use PatFrags here TableGen will crash when a CCUIOp node is named (as in the patterns below). TableGen asserts that named nodes have only one tree.

llvm/test/CodeGen/VE/setcc.ll
11 ↗(On Diff #239530)

I'll remove the redundant test file.

simoll updated this revision to Diff 239568.Wed, Jan 22, 6:31 AM
simoll marked an inline comment as done.
  • Rebased
  • Removed redundant test
arsenm accepted this revision.Wed, Jan 22, 6:41 AM

LGTM

This revision is now accepted and ready to land.Wed, Jan 22, 6:41 AM

Unit tests: pass. 62100 tests passed, 0 failed and 793 were skipped.

clang-tidy: unknown.

clang-format: pass.

Build artifacts: diff.json, clang-format.patch, CMakeCache.txt, console-log.txt, test-results.xml

This revision was automatically updated to reflect the committed changes.