[PATCH] D46541: [CodeGen] Improve diagnostics related to target attributes

2018-05-09 Thread Gabor Buella via Phabricator via cfe-commits
GBuella updated this revision to Diff 145876. https://reviews.llvm.org/D46541 Files: lib/CodeGen/CodeGenFunction.cpp lib/CodeGen/CodeGenModule.cpp lib/CodeGen/CodeGenModule.h test/CodeGen/target-features-error-2.c test/CodeGen/target-features-error.c Index: test/CodeGen/target-features

[PATCH] D46540: [X86] ptwrite intrinsic

2018-05-09 Thread Gabor Buella via Phabricator via cfe-commits
GBuella added a comment. In https://reviews.llvm.org/D46540#1091625, @Hahnfeld wrote: > Could you maybe add some short summaries to your patches? It's hard for > non-Intel employees to guess what all these instructions do... Well, I was thinking I could copy-paste this from https://software.i

[PATCH] D45616: [X86] Lower _mm[256|512]_cmp[.]_mask intrinsics to native llvm IR

2018-05-09 Thread Gabor Buella via Phabricator via cfe-commits
GBuella added a comment. In https://reviews.llvm.org/D45616#1067492, @efriedma wrote: > > The fcmp opcode has no defined behavior with NaN operands in the > > comparisions handled in this patch. > > Could you describe the problem here in a bit more detail? As far as I know, > the LLVM IR fcmp

[PATCH] D46540: [X86] ptwrite intrinsic

2018-05-10 Thread Gabor Buella via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC331962: [X86] ptwrite intrinsic (authored by GBuella, committed by ). Changed prior to commit: https://reviews.llvm.org/D46540?vs=145681&id=146081#toc Repository: rC Clang https://reviews.llvm.org/D

[PATCH] D45616: [X86] Lower _mm[256|512]_cmp[.]_mask intrinsics to native llvm IR

2018-05-10 Thread Gabor Buella via Phabricator via cfe-commits
GBuella added a comment. In https://reviews.llvm.org/D45616#1093514, @efriedma wrote: > There is no difference between "signalling" and "non-signalling" unless > you're using "#pragma STDC FENV_ACCESS", which is currently not supported. > Presumably the work to implement that will include some

[PATCH] D46683: [X86] Assume alignment of movdir64b dst argument

2018-05-10 Thread Gabor Buella via Phabricator via cfe-commits
GBuella created this revision. GBuella added a reviewer: craig.topper. Herald added a subscriber: cfe-commits. Repository: rC Clang https://reviews.llvm.org/D46683 Files: lib/Headers/movdirintrin.h test/CodeGen/builtin-movdir.c Index: test/CodeGen/builtin-movdir.c ===

[PATCH] D46683: [X86] Assume alignment of movdir64b dst argument

2018-05-10 Thread Gabor Buella via Phabricator via cfe-commits
GBuella added a comment. In https://reviews.llvm.org/D46683#1094662, @craig.topper wrote: > What effect does this have? Nothing important really, I just guessed it doesn't cost. One contrived example I could come up with in 2 minutes: #include void x(char *restrict a __attribute__((ali

[PATCH] D46742: [X86] Use __builtin_convertvector to replace some of the avx512 truncate builtins.

2018-05-11 Thread Gabor Buella via Phabricator via cfe-commits
GBuella added a comment. In https://reviews.llvm.org/D46742#1095658, @tkrupa wrote: > There are four other similar intrinsics which convert to 128/256-bit vectors: > > __m128i _mm256_cvtepi32_epi8 (__m256i a) > __m128i _mm256_cvtepi64_epi16 (__m256i a) > __m128i _mm256_cvtepi64_epi8 (__m256i a)

[PATCH] D46683: [X86] Assume alignment of movdir64b dst argument

2018-05-11 Thread Gabor Buella via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL332091: [X86] Assume alignment of movdir64b dst argument (authored by GBuella, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D46683 Files: cfe

[PATCH] D45616: [X86] Lower _mm[256|512]_cmp[.]_mask intrinsics to native llvm IR

2018-05-14 Thread Gabor Buella via Phabricator via cfe-commits
GBuella accepted this revision. GBuella added a comment. This revision is now accepted and ready to land. LGTM Repository: rC Clang https://reviews.llvm.org/D45616 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-

[PATCH] D45616: [X86] Lower _mm[256|512]_cmp[.]_mask intrinsics to native llvm IR

2018-05-14 Thread Gabor Buella via Phabricator via cfe-commits
GBuella requested review of this revision. GBuella added a comment. Oops, accepted this by accident. Repository: rC Clang https://reviews.llvm.org/D45616 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailma

[PATCH] D46742: [X86] Use __builtin_convertvector to replace some of the avx512 truncate builtins.

2018-05-14 Thread Gabor Buella via Phabricator via cfe-commits
GBuella accepted this revision. GBuella added a comment. This revision is now accepted and ready to land. LGTM Repository: rC Clang https://reviews.llvm.org/D46742 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-

[PATCH] D47125: [X86] Remove masking from pternlog llvm intrinsics and use a select instruction instead.

2018-05-21 Thread Gabor Buella via Phabricator via cfe-commits
GBuella added a comment. So do these really need to be implemented as macros? Repository: rC Clang https://reviews.llvm.org/D47125 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D45616: [X86] Lower _mm[256|512]_cmp[.]_mask intrinsics to native llvm IR

2018-05-21 Thread Gabor Buella via Phabricator via cfe-commits
GBuella added a comment. Ping @efriedma Repository: rC Clang https://reviews.llvm.org/D45616 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D46541: [CodeGen] Improve diagnostics related to target attributes

2018-05-21 Thread Gabor Buella via Phabricator via cfe-commits
GBuella updated this revision to Diff 147775. GBuella added a comment. Fixed a horrible bug in the patch. Adding a ref to temporary string is not a wise thing to do, so I had to remove this line: ReqFeatures.push_back(F.substr(1)); Now the ReqFeatures vector can also refer to strings starting

[PATCH] D47142: [x86] invpcid intrinsic

2018-05-21 Thread Gabor Buella via Phabricator via cfe-commits
GBuella created this revision. GBuella added a reviewer: craig.topper. Herald added subscribers: cfe-commits, mgorny. An intrinsic for an old instruction, as described in the Intel SDM. Repository: rC Clang https://reviews.llvm.org/D47142 Files: include/clang/Basic/BuiltinsX86.def includ

[PATCH] D47142: [x86] invpcid intrinsic

2018-05-21 Thread Gabor Buella via Phabricator via cfe-commits
GBuella added a comment. In https://reviews.llvm.org/D47142#1106664, @rnk wrote: > Why do we need a feature flag for this in the first place? The MSVC model for > most "instruction" intrinsics is that the exact instruction is emitted > regardless of the feature enabled. The target attribute see

[PATCH] D47142: [x86] invpcid intrinsic

2018-05-21 Thread Gabor Buella via Phabricator via cfe-commits
GBuella added inline comments. Comment at: lib/Headers/intrin.h:196 + */ void __cdecl _invpcid(unsigned int, void *); +#endif rnk wrote: > craig.topper wrote: > > @rnk, what's the right thing to do here? > What problems does this redeclaration cause? Now that I

[PATCH] D47142: [x86] invpcid intrinsic

2018-05-21 Thread Gabor Buella via Phabricator via cfe-commits
GBuella added inline comments. Comment at: lib/Headers/intrin.h:196 + */ void __cdecl _invpcid(unsigned int, void *); +#endif GBuella wrote: > rnk wrote: > > craig.topper wrote: > > > @rnk, what's the right thing to do here? > > What problems does this redeclara

[PATCH] D47142: [x86] invpcid intrinsic

2018-05-21 Thread Gabor Buella via Phabricator via cfe-commits
GBuella added inline comments. Comment at: lib/Headers/intrin.h:196 + */ void __cdecl _invpcid(unsigned int, void *); +#endif rnk wrote: > GBuella wrote: > > GBuella wrote: > > > rnk wrote: > > > > craig.topper wrote: > > > > > @rnk, what's the right thing to do

[PATCH] D46052: GNUstep Objective-C ABI version 2

2018-05-22 Thread Gabor Buella via Phabricator via cfe-commits
GBuella added inline comments. Comment at: lib/CodeGen/CGObjCGNU.cpp:1056 +char c = Str[i]; +if (isalpha(c) || isnumber(c)) + StringName += c; theraven wrote: > Ka-Ka wrote: > > The isnumber() function was added to cctype.h by Apple. I do

[PATCH] D46052: GNUstep Objective-C ABI version 2

2018-05-22 Thread Gabor Buella via Phabricator via cfe-commits
GBuella added inline comments. Comment at: lib/CodeGen/CGObjCGNU.cpp:1056 +char c = Str[i]; +if (isalpha(c) || isnumber(c)) + StringName += c; GBuella wrote: > theraven wrote: > > Ka-Ka wrote: > > > The isnumber() function was added to cc

[PATCH] D46541: [CodeGen] Improve diagnostics related to target attributes

2018-05-22 Thread Gabor Buella via Phabricator via cfe-commits
GBuella updated this revision to Diff 147984. https://reviews.llvm.org/D46541 Files: lib/CodeGen/CodeGenFunction.cpp lib/CodeGen/CodeGenModule.cpp lib/CodeGen/CodeGenModule.h test/CodeGen/target-features-error-2.c test/CodeGen/target-features-error.c Index: test/CodeGen/target-features

[PATCH] D46541: [CodeGen] Improve diagnostics related to target attributes

2018-05-22 Thread Gabor Buella via Phabricator via cfe-commits
GBuella added a comment. In https://reviews.llvm.org/D46541#1106743, @craig.topper wrote: > I think you can pass StringRef(F).substr(1). That won't create a temporary > string. It will just create a StringRef pointing into the middle of an > existing std::string stored in the parsed attributes.

[PATCH] D47182: [X86] Move all Intel defined intrinsic includes into immintrin.h

2018-05-22 Thread Gabor Buella via Phabricator via cfe-commits
GBuella added a comment. What does "imm" mean anyways? Repository: rC Clang https://reviews.llvm.org/D47182 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D47142: [x86] invpcid intrinsic

2018-05-22 Thread Gabor Buella via Phabricator via cfe-commits
GBuella updated this revision to Diff 148011. https://reviews.llvm.org/D47142 Files: include/clang/Basic/BuiltinsX86.def include/clang/Driver/Options.td lib/Basic/Targets/X86.cpp lib/Basic/Targets/X86.h lib/Headers/CMakeLists.txt lib/Headers/cpuid.h lib/Headers/invpcidintrin.h lib

[PATCH] D47142: [x86] invpcid intrinsic

2018-05-23 Thread Gabor Buella via Phabricator via cfe-commits
GBuella updated this revision to Diff 148341. GBuella added a comment. Relocated header inclusion from x86intrin.h -> immintrin.h I gave up on the MSVC intrinsic idea, it wouldn't work in a way compatible with MSVC as long as LLVM requires the feature to be enabled anyways. If once we decide to

[PATCH] D47142: [x86] invpcid intrinsic

2018-05-24 Thread Gabor Buella via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL333256: [x86] invpcid intrinsic (authored by GBuella, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D47142?vs=148341&id=148547#toc Repositor

[PATCH] D43459: [X86] Disable CLWB in Cannon Lake

2018-02-19 Thread Gabor Buella via Phabricator via cfe-commits
GBuella created this revision. GBuella added reviewers: craig.topper, zvi, echristo. Herald added a subscriber: cfe-commits. Cannon Lake does not support CLWB, therefore it does not include all features listed under SKX. Repository: rC Clang https://reviews.llvm.org/D43459 Files: lib/Basic

[PATCH] D43459: [X86] Disable CLWB in Cannon Lake

2018-02-19 Thread Gabor Buella via Phabricator via cfe-commits
GBuella added a comment. See also: https://reviews.llvm.org/D43380 Repository: rC Clang https://reviews.llvm.org/D43459 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D43814: [x86][CET] Introduce _get_ssp, _inc_ssp intrinsics

2018-02-27 Thread Gabor Buella via Phabricator via cfe-commits
GBuella created this revision. GBuella added reviewers: craig.topper, ashlykov. Herald added a subscriber: cfe-commits. The _get_ssp intrinsic can be used to retrieve the shadow stack pointer, independent of the current arch -- in contract with the rdsspd and the rdsspq intrinsics. Also, this intr

[PATCH] D43815: CodeGen tests - typo fixes

2018-02-27 Thread Gabor Buella via Phabricator via cfe-commits
GBuella created this revision. GBuella added reviewers: craig.topper, ashlykov. Herald added a subscriber: cfe-commits. Repository: rC Clang https://reviews.llvm.org/D43815 Files: test/CodeGen/avx512-reduceMinMaxIntrin.c test/CodeGen/avx512f-builtins.c Index: test/CodeGen/avx512f-builtins

[PATCH] D43817: [x86] wbnoinvd intrinsic

2018-02-27 Thread Gabor Buella via Phabricator via cfe-commits
GBuella created this revision. GBuella added reviewers: craig.topper, zvi, ashlykov. Herald added subscribers: cfe-commits, mgorny. Also, a new intrinsic for the wbinvd instruction. Repository: rC Clang https://reviews.llvm.org/D43817 Files: docs/ClangCommandLineReference.rst include/cla

[PATCH] D43817: [x86] wbnoinvd intrinsic

2018-03-01 Thread Gabor Buella via Phabricator via cfe-commits
GBuella updated this revision to Diff 136510. GBuella edited the summary of this revision. GBuella added a comment. Added Ice Lake Server architecture. Removed wbinvd related code. https://reviews.llvm.org/D43817 Files: docs/ClangCommandLineReference.rst include/clang/Basic/BuiltinsX86.def

[PATCH] D43814: [x86][CET] Introduce _get_ssp, _inc_ssp intrinsics

2018-03-02 Thread Gabor Buella via Phabricator via cfe-commits
GBuella added inline comments. Comment at: lib/Headers/cetintrin.h:45 +static __inline__ void __DEFAULT_FN_ATTRS _inc_ssp(unsigned int __a) { + __builtin_ia32_incsspq(__a); +} craig.topper wrote: > Where is the zeroing behavior for older CPUs coming from? This i

[PATCH] D43814: [x86][CET] Introduce _get_ssp, _inc_ssp intrinsics

2018-03-02 Thread Gabor Buella via Phabricator via cfe-commits
GBuella updated this revision to Diff 136703. https://reviews.llvm.org/D43814 Files: lib/Headers/cetintrin.h test/CodeGen/cetintrin.c Index: test/CodeGen/cetintrin.c === --- test/CodeGen/cetintrin.c +++ test/CodeGen/cetintrin.c

[PATCH] D44387: [x86] Introduce the pconfig/encl[u|s|v] intrinsics

2018-03-12 Thread Gabor Buella via Phabricator via cfe-commits
GBuella created this revision. GBuella added reviewers: craig.topper, zvi. Herald added subscribers: cfe-commits, mgorny. Introduce pconfig and SGX related intrinsics. Repository: rC Clang https://reviews.llvm.org/D44387 Files: include/clang/Basic/BuiltinsX86.def include/clang/Driver/Opt

[PATCH] D46541: [CodeGen] Improve diagnostics related to target attributes

2018-06-05 Thread Gabor Buella via Phabricator via cfe-commits
GBuella added inline comments. Comment at: test/CodeGen/target-features-error-2.c:39 __m128d need_avx(__m128d a, __m128d b) { return _mm_cmp_sd(a, b, 0); // expected-error {{'__builtin_ia32_cmpsd' needs target feature avx}} } craig.topper wrote: > The 4 com

[PATCH] D46541: [CodeGen] Improve diagnostics related to target attributes

2018-06-05 Thread Gabor Buella via Phabricator via cfe-commits
GBuella updated this revision to Diff 150018. https://reviews.llvm.org/D46541 Files: lib/CodeGen/CodeGenFunction.cpp lib/CodeGen/CodeGenModule.cpp lib/CodeGen/CodeGenModule.h test/CodeGen/target-features-error-2.c test/CodeGen/target-features-error.c Index: test/CodeGen/target-features

[PATCH] D46541: [CodeGen] Improve diagnostics related to target attributes

2018-06-05 Thread Gabor Buella via Phabricator via cfe-commits
GBuella marked an inline comment as done. GBuella added inline comments. Comment at: test/CodeGen/target-features-error-2.c:39 __m128d need_avx(__m128d a, __m128d b) { return _mm_cmp_sd(a, b, 0); // expected-error {{'__builtin_ia32_cmpsd' needs target feature avx}} } --

[PATCH] D46541: [CodeGen] Improve diagnostics related to target attributes

2018-06-07 Thread Gabor Buella via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL334174: [CodeGen] Improve diagnostics related to target attributes (authored by GBuella, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D46541

[PATCH] D47912: [CMake] Consider LLVM_APPEND_VC_REV when generating SVNVersion.inc

2018-06-07 Thread Gabor Buella via Phabricator via cfe-commits
GBuella created this revision. GBuella added reviewers: beanz, bogner, hintonda. Herald added subscribers: cfe-commits, mgorny. This is merely a quickfix, due to being fustrated with waiting for ~70 objects to be linked each time following `git commit --amend`. When toggling LLVM_APPEND_VC_REV bet

[PATCH] D47912: [CMake] Consider LLVM_APPEND_VC_REV when generating SVNVersion.inc

2018-06-07 Thread Gabor Buella via Phabricator via cfe-commits
GBuella added a comment. In https://reviews.llvm.org/D47912#1125803, @smeenai wrote: > I believe LLVM_APPEND_VC_REV controls whether the revision is appended to > LLVM version string (e.g. the output of `llvm-config --version`), whereas the > SVNRevision.inc file (which is what's causing the re

[PATCH] D45616: [X86] Lower _mm[256|512]_cmp[.]_mask intrinsics to native llvm IR

2018-06-11 Thread Gabor Buella via Phabricator via cfe-commits
GBuella updated this revision to Diff 150767. GBuella added a comment. I altered the code, to ignore the the signaling behaviour, as suggested. Also, it handles more vector cmp builtins now. https://reviews.llvm.org/D45616 Files: lib/CodeGen/CGBuiltin.cpp test/CodeGen/avx-builtins.c test/

[PATCH] D45616: [X86] Lower _mm[256|512]_cmp[.]_mask intrinsics to native llvm IR

2018-06-11 Thread Gabor Buella via Phabricator via cfe-commits
GBuella added a comment. Ping @efriedma https://reviews.llvm.org/D45616 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D45616: [X86] Lower _mm[256|512]_cmp[.]_mask intrinsics to native llvm IR

2018-06-12 Thread Gabor Buella via Phabricator via cfe-commits
GBuella added inline comments. Comment at: lib/CodeGen/CGBuiltin.cpp:10071 + // is _MM_FROUND_CUR_DIRECTION + if (cast(Ops[4])->getZExtValue() != 4) +UsesNonDefaultRounding = true; efriedma wrote: > Given we're ignoring floating-point exceptions

[PATCH] D45616: [X86] Lower _mm[256|512]_cmp[.]_mask intrinsics to native llvm IR

2018-06-13 Thread Gabor Buella via Phabricator via cfe-commits
GBuella added inline comments. Comment at: lib/CodeGen/CGBuiltin.cpp:10090-10100 +// _CMP_TRUE_UQ, _CMP_TRUE_US produce -1,-1... vector +// on any input and _CMP_FALSE_OQ, _CMP_FALSE_OS produce 0, 0... +if (CC == 0xf || CC == 0xb || CC == 0x1b || CC == 0x1f) { +

[PATCH] D45616: [X86] Lower _mm[256|512]_cmp[.]_mask intrinsics to native llvm IR

2018-06-13 Thread Gabor Buella via Phabricator via cfe-commits
GBuella updated this revision to Diff 151203. GBuella edited the summary of this revision. GBuella added a comment. Ignoring signaling behviour - and rounding mode with it. Also lowering `__builtin_ia32_cmpsd` and `__builtin_ia32_cmpss`. https://reviews.llvm.org/D45616 Files: lib/CodeGen/CGBu

[PATCH] D45616: [X86] Lower _mm[256|512]_cmp[.]_mask intrinsics to native llvm IR

2018-06-14 Thread Gabor Buella via Phabricator via cfe-commits
GBuella added inline comments. Comment at: lib/CodeGen/CGBuiltin.cpp:10107-10112 +case 0x0b: // FALSE_OQ +case 0x1b: // FALSE_OS + return llvm::Constant::getNullValue(ConvertType(E->getType())); +case 0x0f: // TRUE_UQ +case 0x1f: // TRUE_US + return llvm

[PATCH] D45616: [X86] Lower _mm[256|512]_cmp[.]_mask intrinsics to native llvm IR

2018-06-18 Thread Gabor Buella via Phabricator via cfe-commits
GBuella added a comment. The question still left is, should we remove, auto upgrade the LLVM intrinsics not used anymore, or keep them around for when the signal behaviour is going to matter? https://reviews.llvm.org/D45616 ___ cfe-commits mailing

[PATCH] D45616: [X86] Lower _mm[256|512]_cmp[.]_mask intrinsics to native llvm IR

2018-06-18 Thread Gabor Buella via Phabricator via cfe-commits
GBuella updated this revision to Diff 151710. https://reviews.llvm.org/D45616 Files: lib/CodeGen/CGBuiltin.cpp test/CodeGen/avx-builtins.c test/CodeGen/avx-cmp-builtins.c test/CodeGen/avx2-builtins.c test/CodeGen/avx512f-builtins.c test/CodeGen/avx512vl-builtins.c Index: test/CodeGen

[PATCH] D45616: [X86] Lower _mm[256|512]_cmp[.]_mask intrinsics to native llvm IR

2018-06-19 Thread Gabor Buella via Phabricator via cfe-commits
GBuella updated this revision to Diff 151884. GBuella added a comment. Added `__builtin_ia32_cmpsd_mask` & `__builtin_ia32_cmpss_mask`. https://reviews.llvm.org/D45616 Files: lib/CodeGen/CGBuiltin.cpp test/CodeGen/avx-builtins.c test/CodeGen/avx-cmp-builtins.c test/CodeGen/avx2-builtins

[PATCH] D45616: [X86] Lower _mm[256|512]_cmp[.]_mask intrinsics to native llvm IR

2018-06-20 Thread Gabor Buella via Phabricator via cfe-commits
GBuella updated this revision to Diff 152060. GBuella edited the summary of this revision. https://reviews.llvm.org/D45616 Files: lib/CodeGen/CGBuiltin.cpp test/CodeGen/avx-builtins.c test/CodeGen/avx-cmp-builtins.c test/CodeGen/avx2-builtins.c test/CodeGen/avx512f-builtins.c test/Cod

[PATCH] D45616: [X86] Lower _mm[256|512]_cmp[.]_mask intrinsics to native llvm IR

2018-06-20 Thread Gabor Buella via Phabricator via cfe-commits
GBuella added a comment. I was overzealous with the intrinsics, I lower really only the packed comparison now. https://reviews.llvm.org/D45616 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cf

[PATCH] D45616: [X86] Lower _mm[256|512]_cmp[.]_mask intrinsics to native llvm IR

2018-06-22 Thread Gabor Buella via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC335339: [X86] Lower _mm[256|512]_cmp[.]_mask intrinsics to native llvm IR (authored by GBuella, committed by ). Changed prior to commit: https://reviews.llvm.org/D45616?vs=152060&id=152456#toc Reposito

[PATCH] D48487: [X86][AVX512] Lowering _mm512_[max|min]_p[s|d] to native IR

2018-06-22 Thread Gabor Buella via Phabricator via cfe-commits
GBuella created this revision. GBuella added reviewers: craig.topper, uriel.k, RKSimon, andrew.w.kaylor, spatel, scanon, efriedma. Herald added a subscriber: cfe-commits. Repository: rC Clang https://reviews.llvm.org/D48487 Files: lib/Headers/avx512fintrin.h test/CodeGen/avx512f-builtins.

[PATCH] D45561: NFC - Indentation fixes in predefined-arch-macros.c

2018-04-12 Thread Gabor Buella via Phabricator via cfe-commits
GBuella created this revision. GBuella added a reviewer: craig.topper. Herald added subscribers: cfe-commits, fedor.sergeev. Consistently separating tests with empty lines. Helps while navigating this file. Repository: rC Clang https://reviews.llvm.org/D45561 Files: test/Preprocessor/prede

[PATCH] D45311: [X86] Introduce wbinvd intrinsic

2018-04-12 Thread Gabor Buella via Phabricator via cfe-commits
GBuella updated this revision to Diff 142142. GBuella retitled this revision from "Introduce wbinvd intrinsic" to "[X86] Introduce wbinvd intrinsic". https://reviews.llvm.org/D45311 Files: include/clang/Basic/BuiltinsX86.def lib/Headers/ia32intrin.h test/CodeGen/builtin-wbinvd.c Index: t

[PATCH] D45561: NFC - Indentation fixes in predefined-arch-macros.c

2018-04-12 Thread Gabor Buella via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC329932: NFC - Indentation fixes in predefined-arch-macros.c (authored by GBuella, committed by ). Changed prior to commit: https://reviews.llvm.org/D45561?vs=142138&id=142223#toc Repository: rC Clang

[PATCH] D45311: [X86] Introduce wbinvd intrinsic

2018-04-12 Thread Gabor Buella via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL329937: [X86] Introduce wbinvd intrinsic (authored by GBuella, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D45311?vs=142142&id=142228#toc

[PATCH] D45257: [X86] Introduce cldemote intrinsic

2018-04-13 Thread Gabor Buella via Phabricator via cfe-commits
GBuella updated this revision to Diff 142340. GBuella added a comment. Rebase. https://reviews.llvm.org/D45257 Files: include/clang/Basic/BuiltinsX86.def include/clang/Driver/Options.td lib/Basic/Targets/X86.cpp lib/Basic/Targets/X86.h lib/Headers/CMakeLists.txt lib/Headers/cldemote

[PATCH] D45257: [X86] Introduce cldemote intrinsic

2018-04-13 Thread Gabor Buella via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL329993: [X86] Introduce cldemote intrinsic (authored by GBuella, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D45257?vs=142340&id=142345#toc

[PATCH] D45613: [X86] Introduce archs: goldmont-plus & tremont

2018-04-13 Thread Gabor Buella via Phabricator via cfe-commits
GBuella created this revision. GBuella added a reviewer: craig.topper. Herald added a subscriber: cfe-commits. Repository: rC Clang https://reviews.llvm.org/D45613 Files: include/clang/Basic/X86Target.def lib/Basic/Targets/X86.cpp test/Driver/x86-march.c test/Misc/target-invalid-cpu-no

[PATCH] D45616: [X86] Lower _mm[256|512]_cmp[.]_mask intrinsics to native llvm IR

2018-04-13 Thread Gabor Buella via Phabricator via cfe-commits
GBuella created this revision. GBuella added a reviewer: craig.topper. Herald added a subscriber: cfe-commits. The fcmp opcode has no defined behavior with NaN operands in the comparisions handled in this patch. Thus, these intrinsics can only be safe lowered to fcmp opcodes when fast-math is enab

[PATCH] D45613: [X86] Introduce archs: goldmont-plus & tremont

2018-04-13 Thread Gabor Buella via Phabricator via cfe-commits
GBuella added a comment. I was not sure about what predefined macros to add for goldmont-plus & tremont. I found this conversation: https://reviews.llvm.org/D38824 which seems to suggest no new arch specifix macros. But apparently atom archs have their own macros. Repository: rC Clang https:

[PATCH] D45613: [X86] Introduce archs: goldmont-plus & tremont

2018-04-16 Thread Gabor Buella via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL330110: [X86] Introduce archs: goldmont-plus & tremont (authored by GBuella, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D45613 Files: cfe/t

[PATCH] D45254: [X86][WAITPKG] WaitPKG intrinsics

2018-04-18 Thread Gabor Buella via Phabricator via cfe-commits
GBuella updated this revision to Diff 142910. GBuella added a comment. Modified the intrinsic. https://reviews.llvm.org/D45254 Files: include/clang/Basic/BuiltinsX86.def include/clang/Driver/Options.td lib/Basic/Targets/X86.cpp lib/Basic/Targets/X86.h lib/Headers/CMakeLists.txt lib/

[PATCH] D45254: [X86][WAITPKG] WaitPKG intrinsics

2018-04-18 Thread Gabor Buella via Phabricator via cfe-commits
GBuella updated this revision to Diff 142913. https://reviews.llvm.org/D45254 Files: include/clang/Basic/BuiltinsX86.def include/clang/Driver/Options.td lib/Basic/Targets/X86.cpp lib/Basic/Targets/X86.h lib/Headers/CMakeLists.txt lib/Headers/cpuid.h lib/Headers/waitpkgintrin.h lib

[PATCH] D45254: [X86] WaitPKG intrinsics

2018-04-20 Thread Gabor Buella via Phabricator via cfe-commits
GBuella updated this revision to Diff 143249. GBuella retitled this revision from "[X86][WAITPKG] WaitPKG intrinsics" to "[X86] WaitPKG intrinsics". https://reviews.llvm.org/D45254 Files: include/clang/Basic/BuiltinsX86.def include/clang/Driver/Options.td lib/Basic/Targets/X86.cpp lib/Ba

[PATCH] D45254: [X86] WaitPKG intrinsics

2018-04-20 Thread Gabor Buella via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL330463: [X86] WaitPKG intrinsics (authored by GBuella, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D45254?vs=143249&id=143355#toc Reposito

[PATCH] D45984: [X86] directstore and movdir64b intrinsics

2018-04-23 Thread Gabor Buella via Phabricator via cfe-commits
GBuella created this revision. GBuella added a reviewer: craig.topper. Herald added subscribers: cfe-commits, mgorny. Repository: rC Clang https://reviews.llvm.org/D45984 Files: docs/ClangCommandLineReference.rst include/clang/Basic/BuiltinsX86.def include/clang/Driver/Options.td lib/B

[PATCH] D44387: [x86] Introduce the pconfig/encl[u|s|v] intrinsics

2018-04-23 Thread Gabor Buella via Phabricator via cfe-commits
GBuella updated this revision to Diff 143639. GBuella added a comment. Rebased the patch. Added pconfig to Icelake Server. https://reviews.llvm.org/D44387 Files: include/clang/Basic/BuiltinsX86.def include/clang/Driver/Options.td lib/Basic/Targets/X86.cpp lib/Basic/Targets/X86.h lib/C

[PATCH] D44387: [x86] Introduce the pconfig/encl[u|s|v] intrinsics

2018-04-23 Thread Gabor Buella via Phabricator via cfe-commits
GBuella updated this revision to Diff 143640. https://reviews.llvm.org/D44387 Files: include/clang/Basic/BuiltinsX86.def include/clang/Driver/Options.td lib/Basic/Targets/X86.cpp lib/Basic/Targets/X86.h lib/CodeGen/CGBuiltin.cpp lib/Headers/CMakeLists.txt lib/Headers/cpuid.h lib/H

[PATCH] D45984: [X86] directstore and movdir64b intrinsics

2018-04-23 Thread Gabor Buella via Phabricator via cfe-commits
GBuella updated this revision to Diff 143642. https://reviews.llvm.org/D45984 Files: docs/ClangCommandLineReference.rst include/clang/Basic/BuiltinsX86.def include/clang/Basic/BuiltinsX86_64.def include/clang/Driver/Options.td lib/Basic/Targets/X86.cpp lib/Basic/Targets/X86.h lib/He

[PATCH] D45984: [X86] directstore and movdir64b intrinsics

2018-04-23 Thread Gabor Buella via Phabricator via cfe-commits
GBuella updated this revision to Diff 143644. https://reviews.llvm.org/D45984 Files: docs/ClangCommandLineReference.rst include/clang/Basic/BuiltinsX86.def include/clang/Basic/BuiltinsX86_64.def include/clang/Driver/Options.td lib/Basic/Targets/X86.cpp lib/Basic/Targets/X86.h lib/He

[PATCH] D45984: [X86] directstore and movdir64b intrinsics

2018-04-23 Thread Gabor Buella via Phabricator via cfe-commits
GBuella updated this revision to Diff 143647. https://reviews.llvm.org/D45984 Files: docs/ClangCommandLineReference.rst include/clang/Basic/BuiltinsX86.def include/clang/Basic/BuiltinsX86_64.def include/clang/Driver/Options.td lib/Basic/Targets/X86.cpp lib/Basic/Targets/X86.h lib/He

[PATCH] D45984: [X86] directstore and movdir64b intrinsics

2018-04-24 Thread Gabor Buella via Phabricator via cfe-commits
GBuella updated this revision to Diff 143718. https://reviews.llvm.org/D45984 Files: docs/ClangCommandLineReference.rst include/clang/Basic/BuiltinsX86.def include/clang/Basic/BuiltinsX86_64.def include/clang/Driver/Options.td lib/Basic/Targets/X86.cpp lib/Basic/Targets/X86.h lib/He

[PATCH] D44387: [x86] Introduce the pconfig/encl[u|s|v] intrinsics

2018-04-26 Thread Gabor Buella via Phabricator via cfe-commits
GBuella updated this revision to Diff 144112. https://reviews.llvm.org/D44387 Files: include/clang/Basic/BuiltinsX86.def include/clang/Driver/Options.td lib/Basic/Targets/X86.cpp lib/Basic/Targets/X86.h lib/CodeGen/CGBuiltin.cpp lib/Headers/CMakeLists.txt lib/Headers/cpuid.h lib/H

[PATCH] D44387: [x86] Introduce the pconfig/encl[u|s|v] intrinsics

2018-04-26 Thread Gabor Buella via Phabricator via cfe-commits
GBuella updated this revision to Diff 144113. https://reviews.llvm.org/D44387 Files: include/clang/Basic/BuiltinsX86.def include/clang/Driver/Options.td lib/Basic/Targets/X86.cpp lib/Basic/Targets/X86.h lib/CodeGen/CGBuiltin.cpp lib/Headers/CMakeLists.txt lib/Headers/cpuid.h lib/H

[PATCH] D45984: [X86] directstore and movdir64b intrinsics

2018-05-01 Thread Gabor Buella via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL331249: [X86] directstore and movdir64b intrinsics (authored by GBuella, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D45984?vs=143718&id=14

[PATCH] D46431: [x86] Introduce the pconfig intrinsic

2018-05-04 Thread Gabor Buella via Phabricator via cfe-commits
GBuella created this revision. GBuella added reviewers: craig.topper, zvi. Herald added subscribers: cfe-commits, mgorny. Repository: rC Clang https://reviews.llvm.org/D46431 Files: include/clang/Driver/Options.td lib/Basic/Targets/X86.cpp lib/Basic/Targets/X86.h lib/Headers/CMakeLists

[PATCH] D44387: [x86] Introduce the pconfig/encl[u|s|v] intrinsics

2018-05-04 Thread Gabor Buella via Phabricator via cfe-commits
GBuella added a comment. Here is a variation on this, using inline asm: https://reviews.llvm.org/D46431 https://reviews.llvm.org/D44387 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

[PATCH] D46435: [x86] Introduce the encl[u|s|v] intrinsics

2018-05-04 Thread Gabor Buella via Phabricator via cfe-commits
GBuella created this revision. GBuella added reviewers: craig.topper, zvi. Herald added subscribers: cfe-commits, mgorny. Repository: rC Clang https://reviews.llvm.org/D46435 Files: lib/Headers/CMakeLists.txt lib/Headers/module.modulemap lib/Headers/sgxintrin.h lib/Headers/x86intrin.h

[PATCH] D46431: [x86] Introduce the pconfig intrinsic

2018-05-04 Thread Gabor Buella via Phabricator via cfe-commits
GBuella updated this revision to Diff 145207. https://reviews.llvm.org/D46431 Files: include/clang/Driver/Options.td lib/Basic/Targets/X86.cpp lib/Basic/Targets/X86.h lib/Headers/CMakeLists.txt lib/Headers/cpuid.h lib/Headers/module.modulemap lib/Headers/pconfigintrin.h lib/Header

[PATCH] D46540: [X86] ptwrite intrinsic

2018-05-07 Thread Gabor Buella via Phabricator via cfe-commits
GBuella created this revision. GBuella added a reviewer: craig.topper. Herald added subscribers: cfe-commits, mgorny. Repository: rC Clang https://reviews.llvm.org/D46540 Files: include/clang/Basic/BuiltinsX86.def include/clang/Basic/BuiltinsX86_64.def include/clang/Driver/Options.td l

[PATCH] D46541: [CodeGen] Improve diagnostics related to target attributes

2018-05-07 Thread Gabor Buella via Phabricator via cfe-commits
GBuella created this revision. GBuella added reviewers: craig.topper, echristo, dblaikie. Herald added a subscriber: cfe-commits. When requirement imposed by __target__ attributes on functions are not satisfied, prefer printing those requirements, which are explicitly mentioned in the attributes.

[PATCH] D46431: [x86] Introduce the pconfig intrinsic

2018-05-07 Thread Gabor Buella via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL331740: [x86] Introduce the pconfig intrinsic (authored by GBuella, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D46431?vs=145207&id=145634#

[PATCH] D46431: [x86] Introduce the pconfig intrinsic

2018-05-07 Thread Gabor Buella via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC331740: [x86] Introduce the pconfig intrinsic (authored by GBuella, committed by ). Repository: rC Clang https://reviews.llvm.org/D46431 Files: include/clang/Driver/Options.td lib/Basic/Targets/X8

[PATCH] D46435: [x86] Introduce the encl[u|s|v] intrinsics

2018-05-08 Thread Gabor Buella via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC331743: [x86] Introduce the encl[u|s|v] intrinsics (authored by GBuella, committed by ). Changed prior to commit: https://reviews.llvm.org/D46435?vs=145205&id=145638#toc Repository: rC Clang https:/

[PATCH] D46541: [CodeGen] Improve diagnostics related to target attributes

2018-05-08 Thread Gabor Buella via Phabricator via cfe-commits
GBuella updated this revision to Diff 145680. https://reviews.llvm.org/D46541 Files: lib/CodeGen/CodeGenFunction.cpp lib/CodeGen/CodeGenModule.cpp lib/CodeGen/CodeGenModule.h test/CodeGen/target-features-error-2.c test/CodeGen/target-features-error.c Index: test/CodeGen/target-features

[PATCH] D46540: [X86] ptwrite intrinsic

2018-05-08 Thread Gabor Buella via Phabricator via cfe-commits
GBuella updated this revision to Diff 145681. GBuella added a comment. Rebased. https://reviews.llvm.org/D46540 Files: include/clang/Basic/BuiltinsX86.def include/clang/Basic/BuiltinsX86_64.def include/clang/Driver/Options.td lib/Basic/Targets/X86.cpp lib/Basic/Targets/X86.h lib/Hea

[PATCH] D48708: NFC Build fix in RegisterCustomCheckersTest.cpp

2018-06-28 Thread Gabor Buella via Phabricator via cfe-commits
GBuella created this revision. GBuella added reviewers: alexfh, george.karpenkov. Herald added a subscriber: cfe-commits. `ninja-build check-clang` failed using GCC 4.8.5 with: unittests/StaticAnalyzer/RegisterCustomCheckersTest.cpp:64:12: error: could not convert ‘AnalysisConsumer’ from ‘std

[PATCH] D48715: [X86] Fix some vector cmp builtins - TRUE/FALSE predicates

2018-06-28 Thread Gabor Buella via Phabricator via cfe-commits
GBuella created this revision. GBuella added reviewers: craig.topper, uriel.k, RKSimon, andrew.w.kaylor, spatel, scanon, efriedma. Herald added a subscriber: cfe-commits. This patch removes on optimization used with the TRUE/FALSE predicates, as was suggested in https://reviews.llvm.org/D45616 fo

[PATCH] D48715: [X86] Fix some vector cmp builtins - TRUE/FALSE predicates

2018-06-28 Thread Gabor Buella via Phabricator via cfe-commits
GBuella added inline comments. Comment at: test/CodeGen/avx-builtins.c:1423 - -__m256 test_mm256_cmp_ps_true(__m256 a, __m256 b) { - // CHECK-LABEL: @test_mm256_cmp_ps_true spatel wrote: > Why are we deleting tests instead of replacing the CHECK lines with the n

[PATCH] D48715: [X86] Fix some vector cmp builtins - TRUE/FALSE predicates

2018-06-28 Thread Gabor Buella via Phabricator via cfe-commits
GBuella added inline comments. Comment at: test/CodeGen/avx-builtins.c:1423 - -__m256 test_mm256_cmp_ps_true(__m256 a, __m256 b) { - // CHECK-LABEL: @test_mm256_cmp_ps_true spatel wrote: > GBuella wrote: > > spatel wrote: > > > Why are we deleting tests instead

[PATCH] D48921: NFC - type fix in test/CodeGenCXX/runtime-dllstorage.cpp

2018-07-04 Thread Gabor Buella via Phabricator via cfe-commits
GBuella created this revision. GBuella added reviewers: compnerd, espindola. Herald added a subscriber: cfe-commits. Repository: rC Clang https://reviews.llvm.org/D48921 Files: test/CodeGenCXX/runtime-dllstorage.cpp Index: test/CodeGenCXX/runtime-dllstorage.cpp

[PATCH] D48715: [X86] Fix some vector cmp builtins - TRUE/FALSE predicates

2018-07-05 Thread Gabor Buella via Phabricator via cfe-commits
GBuella updated this revision to Diff 154216. GBuella added a comment. As suggested, I added test cases with all predicates (in r336346). https://reviews.llvm.org/D48715 Files: lib/CodeGen/CGBuiltin.cpp test/CodeGen/avx-builtins.c test/CodeGen/avx512f-builtins.c test/CodeGen/avx512vl-bu

[PATCH] D48715: [X86] Fix some vector cmp builtins - TRUE/FALSE predicates

2018-07-05 Thread Gabor Buella via Phabricator via cfe-commits
GBuella added a comment. ping @spatel https://reviews.llvm.org/D48715 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D48715: [X86] Fix some vector cmp builtins - TRUE/FALSE predicates

2018-07-05 Thread Gabor Buella via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC336355: [X86] Fix some vector cmp builtins - TRUE/FALSE predicates (authored by GBuella, committed by ). Repository: rC Clang https://reviews.llvm.org/D48715 Files: lib/CodeGen/CGBuiltin.cpp test/

[PATCH] D48921: NFC - type fix in test/CodeGenCXX/runtime-dllstorage.cpp

2018-07-06 Thread Gabor Buella via Phabricator via cfe-commits
GBuella requested review of this revision. GBuella added a comment. Well, apparently the test fails with the typo fix. There is no `declare dllimport void @_ZSt9terminatev()` line that could be matched for `CHECK-DYNAMIC-IA-DAG`. Repository: rC Clang https://reviews.llvm.org/D48921 _

  1   2   >