This is an archive of the discontinued LLVM Phabricator instance.

[X86] Adding tests for the memory folding tables generated by the TableGen backend.
AbandonedPublic

Authored by aymanmus on Apr 30 2017, 7:41 AM.

Details

Summary

utils/TableGen/X86FoldTablesEmitter.cpp backend generates the memory folding tables for the X86 target, these tests check each entry of the currently generated tables.
The tests run the greedy register allocator while "mocking" register pressure by adding an inline assembly with defs/uses of the registers.

Diff Detail

Event Timeline

craig.topper edited edge metadata.May 26 2017, 9:50 AM
craig.topper added a subscriber: RKSimon.

I don't know a much about mir tests. @RKSimon or @zvi do these tests ok with you?

zvi edited edge metadata.May 30 2017, 1:22 AM

Please update this patch to address the issues fixed in r304163

aymanmus updated this revision to Diff 100677.May 30 2017, 2:42 AM

Removing XCHG tests

RKSimon added inline comments.Jun 4 2017, 8:10 AM
test/CodeGen/X86/memoryFolding-avx512Other.mir
4

Split these more by target type, don't just dump them all them all together.

test/CodeGen/X86/memoryFolding-other.mir
4

Probably best to split these at least into targets with unusual/larger numbers of intrinsics: 3dnow, adx, bmi, bmi2, f16c, fma, fma4, mmx, mpx, sha, tbm, xop

test/CodeGen/X86/memoryFolding-x86.mir
5

Why are you testing with avx512+ enabled?

zvi added a comment.Jun 4 2017, 11:39 AM

Removing XCHG tests

Do we really want them removed or make them negative tests?

igorb added inline comments.Jun 5 2017, 7:24 AM
test/CodeGen/X86/memoryFolding-avx512Other.mir
1

could you please add -verify-machineinstrs

aymanmus abandoned this revision.Jun 25 2017, 12:36 AM

rL304088 was reverted.