This is an archive of the discontinued LLVM Phabricator instance.

[x86][inline-asm][AVX512][clang][PART-1] Introducing "k" and "Yk" constraints for extended inline assembly, enabling use of AVX512 masked vectorized instructions.
ClosedPublic

Authored by mharoush on Sep 29 2016, 12:52 AM.

Details

Summary

Extending inline assembly support, compatible with GCC as folowing:
"k" constraint hints the compiler to select any of AVX512 k0-k7 registers.
"Yk" constraint is a subset of "k" excluding k0 which is not allowd to be used as a mask.

This patch is complimented by the following review:
D25062

Diff Detail

Repository
rL LLVM

Event Timeline

mharoush updated this revision to Diff 72953.Sep 29 2016, 12:52 AM
mharoush retitled this revision from to [x86][inliine-asm][AVX512][clang] Introducing "k" and "Yk" constraints for extended inline assembly, enabling use of AVX512 masked vectorized instructions.
mharoush updated this object.
mharoush set the repository for this revision to rL LLVM.
mharoush retitled this revision from [x86][inliine-asm][AVX512][clang] Introducing "k" and "Yk" constraints for extended inline assembly, enabling use of AVX512 masked vectorized instructions to [x86][inline-asm][AVX512][clang][PART-1] Introducing "k" and "Yk" constraints for extended inline assembly, enabling use of AVX512 masked vectorized instructions..Sep 29 2016, 1:01 AM
mharoush updated this object.
mharoush updated this object.Sep 29 2016, 1:05 AM
mharoush added reviewers: delena, myatsina.
mharoush added a subscriber: cfe-commits.
mharoush added a reviewer: rnk.Oct 5 2016, 4:51 AM
rnk added inline comments.Oct 5 2016, 2:58 PM
test/CodeGen/avx512-mask-op-inline_asm_specific.c
1 ↗(On Diff #72953)

Please check the generated LLVM IR, not the assembly.

mharoush updated this revision to Diff 75277.Oct 20 2016, 3:20 AM
mharoush removed rL LLVM as the repository for this revision.

I renamed the test file to be more informative, added LLVM_FALLTHROUGH, removed check of {z} and changed the test to check LLVM IR.

rnk added inline comments.Oct 20 2016, 10:54 AM
test/CodeGen/avx512-kconstraints-att_inline_asm.c
6 ↗(On Diff #75277)

The LLVM IR won't have #APP markers in it. Does this test really pass?

mharoush updated this revision to Diff 75542.Oct 23 2016, 12:40 AM
mharoush set the repository for this revision to rL LLVM.

Only test affected(correct version this time: checking LLVM IR instead of x86 asm),
This test depends on D25012 being applied.

test/CodeGen/avx512-kconstraints-att_inline_asm.c
6 ↗(On Diff #75277)

Sorry I uploaded the wrong patch file.

rnk accepted this revision.Oct 24 2016, 12:35 PM
rnk edited edge metadata.

lgtm

This revision is now accepted and ready to land.Oct 24 2016, 12:35 PM
This revision was automatically updated to reflect the committed changes.