This is an archive of the discontinued LLVM Phabricator instance.

[x86][icelake][vbmi2]
ClosedPublic

Authored by coby on Dec 23 2017, 2:47 PM.

Details

Summary

added intrinsics support for (whole of) vbmi2 instructions, matching a similar work on the backend (D40206)

Diff Detail

Repository
rL LLVM

Event Timeline

coby created this revision.Dec 23 2017, 2:47 PM
coby edited the summary of this revision. (Show Details)Dec 23 2017, 3:17 PM

Update the ICL macros in test/Preprocessor/predefined-arch-macros.c

include/clang/Basic/BuiltinsX86.def
1254 ↗(On Diff #128090)

Arguments corresponding to immediates need a capital 'I' in front of them so clang will error if they are a compile time constant.

lib/Basic/Targets/X86.cpp
135 ↗(On Diff #128090)

Dont' remove the TODO until all features are added.

589 ↗(On Diff #128090)

Do two equality checks ORed together. I think bad target attributes on functions only issue a warning and are discarded in codegen. So strings like avx512vbmifoo can get here and we should ignore them.

Add tests for -mavx512vbmi2 and -mno-avx512vbmi2 to test/Driver/x86-target-features.c

Add a test for -mno-avx512bw also disabling avx512vbmi2 to test/Preprocessor/x86_target_features.c. Look for AVX512VBMINOAVX512BW for the existing test for avx512vbmi. Also add the test -mavx512vbmi2.

coby marked 2 inline comments as done.Dec 26 2017, 6:46 AM
coby added inline comments.
lib/Basic/Targets/X86.cpp
589 ↗(On Diff #128090)

conditions on 582 .. 585 see that only "avx512vbmi" and "avx512vbmi2" will be candidates to the added check at 589, so we should be fine

coby updated this revision to Diff 128171.Dec 26 2017, 6:55 AM

addressed comments

This revision is now accepted and ready to land.Dec 26 2017, 9:00 AM
This revision was automatically updated to reflect the committed changes.