[llvm-mca] Add tests for XOP and AVX512 instructions that implicitly clear the upper...
authorAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>
Mon, 18 Jun 2018 14:00:30 +0000 (14:00 +0000)
committerAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>
Mon, 18 Jun 2018 14:00:30 +0000 (14:00 +0000)
commit487da729a2c01adbe5d1c54044eda10710bf96bf
treede8f57d1b53ca4cc2f0514ea871d3899d29df45a
parent1197f01bb9721fba537f8cb7607ec3f18b3b9f52
[llvm-mca] Add tests for XOP and AVX512 instructions that implicitly clear the upper portion of a super-register.

When the destination register of a XOP instruction is an XMM register, bits
[255:128] of the corresponding YMM register are cleared.

When the destination register of a EVEX encoded instruction is an XMM/YMM
register, the upper bits of the corresponding ZMM are cleared.
On processors that feature AVX512, a write to an XMM registers always clears the
upper portion of the corresponding ZMM register if the instruction is VEX or
EVEX encoded.

These new tests show some interesting cases which aren't correctly analyzed by
llvm-mca. The lack of knowledge related to the implicit update on the
super-registers is addressed by D48225.

llvm-svn: 334945
llvm/test/tools/llvm-mca/X86/Generic/avx512-super-registers-1.s [new file with mode: 0644]
llvm/test/tools/llvm-mca/X86/Generic/avx512-super-registers-2.s [new file with mode: 0644]
llvm/test/tools/llvm-mca/X86/Generic/avx512-super-registers-3.s [new file with mode: 0644]
llvm/test/tools/llvm-mca/X86/Generic/xop-super-registers-1.s [new file with mode: 0644]
llvm/test/tools/llvm-mca/X86/Generic/xop-super-registers-2.s [new file with mode: 0644]