This is an archive of the discontinued LLVM Phabricator instance.

[X86] SET0 to use XMM registers where possible PR26018 PR32862 2/2
ClosedPublic

Authored by dtemirbulatov on Jul 27 2017, 4:27 PM.

Details

Summary

This is part2 of https://reviews.llvm.org/D35839 and this change is related to AVX512.

VEX-encoded vxorps %xmm0, %xmm0, %xmm0 does the same thing as EVEX-encoded vxorps %zmm0, %zmm0, %zmm0, zeroing the full-width vector and breaking dependencies on the old value of the architectural register.

The VEX version is one byte shorter than the EVEX version.

Diff Detail

Repository
rL LLVM

Event Timeline

dtemirbulatov created this revision.Jul 27 2017, 4:27 PM
craig.topper added inline comments.Jul 27 2017, 5:42 PM
lib/Target/X86/X86InstrInfo.cpp
7736 ↗(On Diff #108547)

You need to change to a subregister here too.

Fix "change to a subregister" issue pointed by Craig.

craig.topper added inline comments.Jul 30 2017, 9:00 AM
lib/Target/X86/X86InstrInfo.cpp
7743 ↗(On Diff #108823)

This should not be a sub register. You're using a ZMM opcode.

update after Craig's remark.

craig.topper edited edge metadata.Jul 31 2017, 8:37 AM

I think I messed up in that last comment. I think it was creating a super register, not a sub register and that was correct. Please change it back. I'm sorry.

Reversed back the last change.

@RKSimon, any idea why the script has started insert "End function" on some tests? I've noticed this in my own runs lately, but I've been dropping them.

test/CodeGen/X86/avx512vl-vbroadcast.ll
2 ↗(On Diff #109053)

Please delete this second comment. The one with 'utils' is the correct version.

RKSimon edited edge metadata.Aug 1 2017, 1:07 AM

@RKSimon, any idea why the script has started insert "End function" on some tests? I've noticed this in my own runs lately, but I've been dropping them.

I've noticed this mainly in apple-darwin triples - I guess the script is matching through to .cfi_endproc or something and those extra tags come before it?

Rebase, remove all "End function" lines.

craig.topper accepted this revision.Aug 2 2017, 11:27 PM

Before commit, please remove one of the two comments at the top of test/CodeGen/X86/avx512vl-vbroadcast.ll. And remove the blanks added to one of the tests.

With those two fixes, LGTM.

test/CodeGen/X86/avx512vl-arith.ll
865 ↗(On Diff #109382)

Can you remove the blank lines added to this test before commit?

This revision is now accepted and ready to land.Aug 2 2017, 11:27 PM
This revision was automatically updated to reflect the committed changes.