Merge commit '7391f7f03cb48c406dcd855627888b9895263be7' into HEAD

This commit is contained in:
dotnet-bot 2016-02-22 06:07:00 -08:00
Родитель f5fdd7c3d0 7391f7f03c
Коммит af5b7b65ac
27 изменённых файлов: 909 добавлений и 96 удалений

Просмотреть файл

@ -451,7 +451,7 @@ def Availability : InheritableAttr {
let Args = [IdentifierArgument<"platform">, VersionArgument<"introduced">,
VersionArgument<"deprecated">, VersionArgument<"obsoleted">,
BoolArgument<"unavailable">, StringArgument<"message">,
BoolArgument<"nopartial">];
BoolArgument<"strict">];
let AdditionalMembers =
[{static llvm::StringRef getPrettyPlatformName(llvm::StringRef Platform) {
return llvm::StringSwitch<llvm::StringRef>(Platform)

Просмотреть файл

@ -685,20 +685,21 @@ are:
Apple's watchOS operating system. The minimum deployment target is specified by
the ``-mwatchos-version-min=*version*`` command-line argument.
An optional nopartial can be placed after the platform name.
With the optional nopartial, when deploying back to a platform version prior to
when the declaration was introduced, Clang emits an error specifying that the
function is not introduced yet.
Without the optional nopartial, a declaration can be used even when deploying back
to a platform version prior to when the declaration was introduced. When this
happens, the declaration is `weakly linked
A declaration can typically be used even when deploying back to a platform
version prior to when the declaration was introduced. When this happens, the
declaration is `weakly linked
<https://developer.apple.com/library/mac/#documentation/MacOSX/Conceptual/BPFrameworks/Concepts/WeakLinking.html>`_,
as if the ``weak_import`` attribute were added to the declaration. A
weakly-linked declaration may or may not be present a run-time, and a program
can determine whether the declaration is present by checking whether the
address of that declaration is non-NULL.
The flag ``strict`` disallows using API when deploying back to a
platform version prior to when the declaration was introduced. An
attempt to use such API before its introduction causes a hard error.
Weakly-linking is almost always a better API choice, since it allows
users to query availability at runtime.
If there are multiple declarations of the same entity, the availability
attributes must either match on a per-platform basis or later
declarations must not have availability attributes for that

Просмотреть файл

@ -1590,6 +1590,24 @@ TARGET_BUILTIN(__builtin_ia32_pmovsxwd128_mask, "V4iV8sV4iUc","","avx512vl")
TARGET_BUILTIN(__builtin_ia32_pmovsxwd256_mask, "V8iV8sV8iUc","","avx512vl")
TARGET_BUILTIN(__builtin_ia32_pmovsxwq128_mask, "V2LLiV8sV2LLiUc","","avx512vl")
TARGET_BUILTIN(__builtin_ia32_pmovsxwq256_mask, "V4LLiV8sV4LLiUc","","avx512vl")
TARGET_BUILTIN(__builtin_ia32_pmovzxbw512_mask, "V32sV32cV32sUi","","avx512bw")
TARGET_BUILTIN(__builtin_ia32_pmovzxbd512_mask, "V16iV16cV16iUs","","avx512f")
TARGET_BUILTIN(__builtin_ia32_pmovzxbq512_mask, "V8LLiV16cV8LLiUc","","avx512f")
TARGET_BUILTIN(__builtin_ia32_pmovzxdq512_mask, "V8LLiV8iV8LLiUc","","avx512f")
TARGET_BUILTIN(__builtin_ia32_pmovzxwd512_mask, "V16iV16sV16iUs","","avx512f")
TARGET_BUILTIN(__builtin_ia32_pmovzxwq512_mask, "V8LLiV8sV8LLiUc","","avx512f")
TARGET_BUILTIN(__builtin_ia32_pmovzxbw128_mask, "V8sV16cV8sUc","","avx512vl,avx512bw")
TARGET_BUILTIN(__builtin_ia32_pmovzxbw256_mask, "V16sV16cV16sUs","","avx512vl,avx512bw")
TARGET_BUILTIN(__builtin_ia32_pmovzxbd128_mask, "V4iV16cV4iUc","","avx512vl")
TARGET_BUILTIN(__builtin_ia32_pmovzxbd256_mask, "V8iV16cV8iUc","","avx512vl")
TARGET_BUILTIN(__builtin_ia32_pmovzxbq128_mask, "V2LLiV16cV2LLiUc","","avx512vl")
TARGET_BUILTIN(__builtin_ia32_pmovzxbq256_mask, "V4LLiV16cV4LLiUc","","avx512vl")
TARGET_BUILTIN(__builtin_ia32_pmovzxdq128_mask, "V2LLiV4iV2LLiUc","","avx512vl")
TARGET_BUILTIN(__builtin_ia32_pmovzxdq256_mask, "V4LLiV4iV4LLiUc","","avx512vl")
TARGET_BUILTIN(__builtin_ia32_pmovzxwd128_mask, "V4iV8sV4iUc","","avx512vl")
TARGET_BUILTIN(__builtin_ia32_pmovzxwd256_mask, "V8iV8sV8iUc","","avx512vl")
TARGET_BUILTIN(__builtin_ia32_pmovzxwq128_mask, "V2LLiV8sV2LLiUc","","avx512vl")
TARGET_BUILTIN(__builtin_ia32_pmovzxwq256_mask, "V4LLiV8sV4LLiUc","","avx512vl")
#undef BUILTIN
#undef TARGET_BUILTIN

Просмотреть файл

@ -87,7 +87,6 @@ def DeprecatedAttributes : DiagGroup<"deprecated-attributes">;
def DeprecatedDeclarations : DiagGroup<"deprecated-declarations">;
def UnavailableDeclarations : DiagGroup<"unavailable-declarations">;
def PartialAvailability : DiagGroup<"partial-availability">;
def NotYetIntroducedDeclarations : DiagGroup<"not-yet-introduced-declarations">;
def DeprecatedImplementations :DiagGroup<"deprecated-implementations">;
def DeprecatedIncrementBool : DiagGroup<"deprecated-increment-bool">;
def DeprecatedRegister : DiagGroup<"deprecated-register">;

Просмотреть файл

@ -841,7 +841,7 @@ def warn_accessor_property_type_mismatch : Warning<
def not_conv_function_declared_at : Note<"type conversion function declared here">;
def note_method_declared_at : Note<"method %0 declared here">;
def note_property_attribute : Note<"property %0 is declared "
"%select{deprecated|unavailable|partial|not-yet-introduced}1 here">;
"%select{deprecated|unavailable|partial}1 here">;
def err_setter_type_void : Error<"type of setter must be void">;
def err_duplicate_method_decl : Error<"duplicate declaration of method %0">;
def warn_duplicate_method_decl :
@ -4128,14 +4128,9 @@ def err_unavailable_message : Error<"%0 is unavailable: %1">;
def warn_unavailable_fwdclass_message : Warning<
"%0 may be unavailable because the receiver type is unknown">,
InGroup<UnavailableDeclarations>;
def err_notyetintroduced : Error<"%0 is not introduced yet">;
def err_notyetintroduced_message : Error<"%0 is not introduced yet: %1">;
def warn_notyetintroduced_fwdclass_message : Warning<
"%0 may not be introduced because the receiver type is unknown">,
InGroup<NotYetIntroducedDeclarations>;
def note_availability_specified_here : Note<
"%0 has been explicitly marked "
"%select{unavailable|deleted|deprecated|partial|not-yet-introduced}1 here">;
"%select{unavailable|deleted|deprecated|partial}1 here">;
def note_implicitly_deleted : Note<
"explicitly defaulted function was implicitly deleted here">;
def note_inherited_deleted_here : Note<

Просмотреть файл

@ -134,8 +134,8 @@ class Parser : public CodeCompletionHandler {
/// \brief Identifier for "message".
IdentifierInfo *Ident_message;
/// \brief Identifier for "nopartial".
IdentifierInfo *Ident_nopartial;
/// \brief Identifier for "strict".
IdentifierInfo *Ident_strict;
/// C++0x contextual keywords.
mutable IdentifierInfo *Ident_final;

Просмотреть файл

@ -157,13 +157,13 @@ private:
+ NumArgs)[index];
}
/// The location of the 'nopartial' keyword in an availability attribute.
SourceLocation *getNopartialSlot() {
/// The location of the 'strict' keyword in an availability attribute.
SourceLocation *getStrictSlot() {
return reinterpret_cast<SourceLocation*>(
&getAvailabilitySlot(ObsoletedSlot) + 1);
}
SourceLocation const *getNopartialSlot() const {
SourceLocation const *getStrictSlot() const {
return reinterpret_cast<SourceLocation const*>(
&getAvailabilitySlot(ObsoletedSlot) + 1);
}
@ -244,7 +244,7 @@ private:
const AvailabilityChange &obsoleted,
SourceLocation unavailable,
const Expr *messageExpr,
Syntax syntaxUsed, SourceLocation nopartial)
Syntax syntaxUsed, SourceLocation strict)
: AttrName(attrName), ScopeName(scopeName), AttrRange(attrRange),
ScopeLoc(scopeLoc), EllipsisLoc(), NumArgs(1), SyntaxUsed(syntaxUsed),
Invalid(false), UsedAsTypeAttr(false), IsAvailability(true),
@ -256,7 +256,7 @@ private:
new (&getAvailabilitySlot(IntroducedSlot)) AvailabilityChange(introduced);
new (&getAvailabilitySlot(DeprecatedSlot)) AvailabilityChange(deprecated);
new (&getAvailabilitySlot(ObsoletedSlot)) AvailabilityChange(obsoleted);
memcpy(getNopartialSlot(), &nopartial, sizeof(SourceLocation));
memcpy(getStrictSlot(), &strict, sizeof(SourceLocation));
AttrKind = getKind(getName(), getScopeName(), syntaxUsed);
}
@ -424,9 +424,9 @@ public:
return getAvailabilitySlot(ObsoletedSlot);
}
SourceLocation getNopartialLoc() const {
SourceLocation getStrictLoc() const {
assert(getKind() == AT_Availability && "Not an availability attribute");
return *getNopartialSlot();
return *getStrictSlot();
}
SourceLocation getUnavailableLoc() const {
@ -624,13 +624,13 @@ public:
SourceLocation unavailable,
const Expr *MessageExpr,
AttributeList::Syntax syntax,
SourceLocation nopartial) {
SourceLocation strict) {
void *memory = allocate(AttributeFactory::AvailabilityAllocSize);
return add(new (memory) AttributeList(attrName, attrRange,
scopeName, scopeLoc,
Param, introduced, deprecated,
obsoleted, unavailable, MessageExpr,
syntax, nopartial));
syntax, strict));
}
AttributeList *create(IdentifierInfo *attrName, SourceRange attrRange,
@ -760,11 +760,11 @@ public:
SourceLocation unavailable,
const Expr *MessageExpr,
AttributeList::Syntax syntax,
SourceLocation nopartial) {
SourceLocation strict) {
AttributeList *attr =
pool.create(attrName, attrRange, scopeName, scopeLoc, Param, introduced,
deprecated, obsoleted, unavailable, MessageExpr, syntax,
nopartial);
strict);
add(attr);
return attr;
}

Просмотреть файл

@ -113,8 +113,7 @@ private:
/// the complete parsing of the current declaration.
class DelayedDiagnostic {
public:
enum DDKind { Deprecation, Unavailable, Access, ForbiddenType,
NotYetIntroduced };
enum DDKind { Deprecation, Unavailable, Access, ForbiddenType };
unsigned char Kind; // actually a DDKind
bool Triggered;
@ -166,15 +165,13 @@ public:
}
const NamedDecl *getDeprecationDecl() const {
assert((Kind == Deprecation || Kind == Unavailable ||
Kind == NotYetIntroduced) &&
assert((Kind == Deprecation || Kind == Unavailable) &&
"Not a deprecation diagnostic.");
return DeprecationData.Decl;
}
StringRef getDeprecationMessage() const {
assert((Kind == Deprecation || Kind == Unavailable ||
Kind == NotYetIntroduced) &&
assert((Kind == Deprecation || Kind == Unavailable) &&
"Not a deprecation diagnostic.");
return StringRef(DeprecationData.Message,
DeprecationData.MessageLen);

Просмотреть файл

@ -2108,7 +2108,7 @@ public:
VersionTuple Obsoleted,
bool IsUnavailable,
StringRef Message,
bool IsNopartial,
bool IsStrict,
AvailabilityMergeKind AMK,
unsigned AttrSpellingListIndex);
TypeVisibilityAttr *mergeTypeVisibilityAttr(Decl *D, SourceRange Range,
@ -3536,8 +3536,7 @@ public:
void redelayDiagnostics(sema::DelayedDiagnosticPool &pool);
enum AvailabilityDiagnostic { AD_Deprecation, AD_Unavailable, AD_Partial,
AD_NotYetIntroduced };
enum AvailabilityDiagnostic { AD_Deprecation, AD_Unavailable, AD_Partial };
void EmitAvailabilityWarning(AvailabilityDiagnostic AD,
NamedDecl *D, StringRef Message,

Просмотреть файл

@ -1522,6 +1522,33 @@ _mm512_maskz_cvtepi8_epi16 (__mmask32 __U, __m256i __A)
(__mmask32) __U);
}
static __inline__ __m512i __DEFAULT_FN_ATTRS
_mm512_cvtepu8_epi16 (__m256i __A)
{
return (__m512i) __builtin_ia32_pmovzxbw512_mask ((__v32qi) __A,
(__v32hi)
_mm512_setzero_hi (),
(__mmask32) -1);
}
static __inline__ __m512i __DEFAULT_FN_ATTRS
_mm512_mask_cvtepu8_epi16 (__m512i __W, __mmask32 __U, __m256i __A)
{
return (__m512i) __builtin_ia32_pmovzxbw512_mask ((__v32qi) __A,
(__v32hi) __W,
(__mmask32) __U);
}
static __inline__ __m512i __DEFAULT_FN_ATTRS
_mm512_maskz_cvtepu8_epi16 (__mmask32 __U, __m256i __A)
{
return (__m512i) __builtin_ia32_pmovzxbw512_mask ((__v32qi) __A,
(__v32hi)
_mm512_setzero_hi(),
(__mmask32) __U);
}
#define _mm512_cmp_epi8_mask(a, b, p) __extension__ ({ \
(__mmask16)__builtin_ia32_cmpb512_mask((__v64qi)(__m512i)(a), \
(__v64qi)(__m512i)(b), \

Просмотреть файл

@ -3159,6 +3159,137 @@ _mm512_maskz_cvtepi16_epi64 (__mmask8 __U, __m128i __A)
(__mmask8) __U);
}
static __inline__ __m512i __DEFAULT_FN_ATTRS
_mm512_cvtepu8_epi32 (__m128i __A)
{
return (__m512i) __builtin_ia32_pmovzxbd512_mask ((__v16qi) __A,
(__v16si)
_mm512_setzero_si512 (),
(__mmask16) -1);
}
static __inline__ __m512i __DEFAULT_FN_ATTRS
_mm512_mask_cvtepu8_epi32 (__m512i __W, __mmask16 __U, __m128i __A)
{
return (__m512i) __builtin_ia32_pmovzxbd512_mask ((__v16qi) __A,
(__v16si) __W,
(__mmask16) __U);
}
static __inline__ __m512i __DEFAULT_FN_ATTRS
_mm512_maskz_cvtepu8_epi32 (__mmask16 __U, __m128i __A)
{
return (__m512i) __builtin_ia32_pmovzxbd512_mask ((__v16qi) __A,
(__v16si)
_mm512_setzero_si512 (),
(__mmask16) __U);
}
static __inline__ __m512i __DEFAULT_FN_ATTRS
_mm512_cvtepu8_epi64 (__m128i __A)
{
return (__m512i) __builtin_ia32_pmovzxbq512_mask ((__v16qi) __A,
(__v8di)
_mm512_setzero_si512 (),
(__mmask8) -1);
}
static __inline__ __m512i __DEFAULT_FN_ATTRS
_mm512_mask_cvtepu8_epi64 (__m512i __W, __mmask8 __U, __m128i __A)
{
return (__m512i) __builtin_ia32_pmovzxbq512_mask ((__v16qi) __A,
(__v8di) __W,
(__mmask8) __U);
}
static __inline__ __m512i __DEFAULT_FN_ATTRS
_mm512_maskz_cvtepu8_epi64 (__mmask8 __U, __m128i __A)
{
return (__m512i) __builtin_ia32_pmovzxbq512_mask ((__v16qi) __A,
(__v8di)
_mm512_setzero_si512 (),
(__mmask8) __U);
}
static __inline__ __m512i __DEFAULT_FN_ATTRS
_mm512_cvtepu32_epi64 (__m256i __X)
{
return (__m512i) __builtin_ia32_pmovzxdq512_mask ((__v8si) __X,
(__v8di)
_mm512_setzero_si512 (),
(__mmask8) -1);
}
static __inline__ __m512i __DEFAULT_FN_ATTRS
_mm512_mask_cvtepu32_epi64 (__m512i __W, __mmask8 __U, __m256i __X)
{
return (__m512i) __builtin_ia32_pmovzxdq512_mask ((__v8si) __X,
(__v8di) __W,
(__mmask8) __U);
}
static __inline__ __m512i __DEFAULT_FN_ATTRS
_mm512_maskz_cvtepu32_epi64 (__mmask8 __U, __m256i __X)
{
return (__m512i) __builtin_ia32_pmovzxdq512_mask ((__v8si) __X,
(__v8di)
_mm512_setzero_si512 (),
(__mmask8) __U);
}
static __inline__ __m512i __DEFAULT_FN_ATTRS
_mm512_cvtepu16_epi32 (__m256i __A)
{
return (__m512i) __builtin_ia32_pmovzxwd512_mask ((__v16hi) __A,
(__v16si)
_mm512_setzero_si512 (),
(__mmask16) -1);
}
static __inline__ __m512i __DEFAULT_FN_ATTRS
_mm512_mask_cvtepu16_epi32 (__m512i __W, __mmask16 __U, __m256i __A)
{
return (__m512i) __builtin_ia32_pmovzxwd512_mask ((__v16hi) __A,
(__v16si) __W,
(__mmask16) __U);
}
static __inline__ __m512i __DEFAULT_FN_ATTRS
_mm512_maskz_cvtepu16_epi32 (__mmask16 __U, __m256i __A)
{
return (__m512i) __builtin_ia32_pmovzxwd512_mask ((__v16hi) __A,
(__v16si)
_mm512_setzero_si512 (),
(__mmask16) __U);
}
static __inline__ __m512i __DEFAULT_FN_ATTRS
_mm512_cvtepu16_epi64 (__m128i __A)
{
return (__m512i) __builtin_ia32_pmovzxwq512_mask ((__v8hi) __A,
(__v8di)
_mm512_setzero_si512 (),
(__mmask8) -1);
}
static __inline__ __m512i __DEFAULT_FN_ATTRS
_mm512_mask_cvtepu16_epi64 (__m512i __W, __mmask8 __U, __m128i __A)
{
return (__m512i) __builtin_ia32_pmovzxwq512_mask ((__v8hi) __A,
(__v8di) __W,
(__mmask8) __U);
}
static __inline__ __m512i __DEFAULT_FN_ATTRS
_mm512_maskz_cvtepu16_epi64 (__mmask8 __U, __m128i __A)
{
return (__m512i) __builtin_ia32_pmovzxwq512_mask ((__v8hi) __A,
(__v8di)
_mm512_setzero_si512 (),
(__mmask8) __U);
}
#define _mm512_cmp_epi32_mask(a, b, p) __extension__ ({ \
(__mmask16)__builtin_ia32_cmpd512_mask((__v16si)(__m512i)(a), \
(__v16si)(__m512i)(b), (p), \

Просмотреть файл

@ -2286,6 +2286,41 @@ _mm256_maskz_cvtepi8_epi16 (__mmask16 __U, __m128i __A)
}
static __inline__ __m128i __DEFAULT_FN_ATTRS
_mm_mask_cvtepu8_epi16 (__m128i __W, __mmask32 __U, __m128i __A)
{
return (__m128i) __builtin_ia32_pmovzxbw128_mask ((__v16qi) __A,
(__v8hi) __W,
(__mmask8) __U);
}
static __inline__ __m128i __DEFAULT_FN_ATTRS
_mm_maskz_cvtepu8_epi16 (__mmask8 __U, __m128i __A)
{
return (__m128i) __builtin_ia32_pmovzxbw128_mask ((__v16qi) __A,
(__v8hi)
_mm_setzero_si128 (),
(__mmask8) __U);
}
static __inline__ __m256i __DEFAULT_FN_ATTRS
_mm256_mask_cvtepu8_epi16 (__m256i __W, __mmask32 __U, __m128i __A)
{
return (__m256i) __builtin_ia32_pmovzxbw256_mask ((__v16qi) __A,
(__v16hi) __W,
(__mmask16) __U);
}
static __inline__ __m256i __DEFAULT_FN_ATTRS
_mm256_maskz_cvtepu8_epi16 (__mmask16 __U, __m128i __A)
{
return (__m256i) __builtin_ia32_pmovzxbw256_mask ((__v16qi) __A,
(__v16hi)
_mm256_setzero_si256 (),
(__mmask16) __U);
}
#define _mm_cmp_epi8_mask(a, b, p) __extension__ ({ \
(__mmask16)__builtin_ia32_cmpb128_mask((__v16qi)(__m128i)(a), \
(__v16qi)(__m128i)(b), \

Просмотреть файл

@ -4771,6 +4771,177 @@ _mm256_maskz_cvtepi16_epi64 (__mmask8 __U, __m128i __A)
}
static __inline__ __m128i __DEFAULT_FN_ATTRS
_mm_mask_cvtepu8_epi32 (__m128i __W, __mmask8 __U, __m128i __A)
{
return (__m128i) __builtin_ia32_pmovzxbd128_mask ((__v16qi) __A,
(__v4si) __W,
(__mmask8) __U);
}
static __inline__ __m128i __DEFAULT_FN_ATTRS
_mm_maskz_cvtepu8_epi32 (__mmask8 __U, __m128i __A)
{
return (__m128i) __builtin_ia32_pmovzxbd128_mask ((__v16qi) __A,
(__v4si)
_mm_setzero_si128 (),
(__mmask8) __U);
}
static __inline__ __m256i __DEFAULT_FN_ATTRS
_mm256_mask_cvtepu8_epi32 (__m256i __W, __mmask8 __U, __m128i __A)
{
return (__m256i) __builtin_ia32_pmovzxbd256_mask ((__v16qi) __A,
(__v8si) __W,
(__mmask8) __U);
}
static __inline__ __m256i __DEFAULT_FN_ATTRS
_mm256_maskz_cvtepu8_epi32 (__mmask8 __U, __m128i __A)
{
return (__m256i) __builtin_ia32_pmovzxbd256_mask ((__v16qi) __A,
(__v8si)
_mm256_setzero_si256 (),
(__mmask8) __U);
}
static __inline__ __m128i __DEFAULT_FN_ATTRS
_mm_mask_cvtepu8_epi64 (__m128i __W, __mmask8 __U, __m128i __A)
{
return (__m128i) __builtin_ia32_pmovzxbq128_mask ((__v16qi) __A,
(__v2di) __W,
(__mmask8) __U);
}
static __inline__ __m128i __DEFAULT_FN_ATTRS
_mm_maskz_cvtepu8_epi64 (__mmask8 __U, __m128i __A)
{
return (__m128i) __builtin_ia32_pmovzxbq128_mask ((__v16qi) __A,
(__v2di)
_mm_setzero_si128 (),
(__mmask8) __U);
}
static __inline__ __m256i __DEFAULT_FN_ATTRS
_mm256_mask_cvtepu8_epi64 (__m256i __W, __mmask8 __U, __m128i __A)
{
return (__m256i) __builtin_ia32_pmovzxbq256_mask ((__v16qi) __A,
(__v4di) __W,
(__mmask8) __U);
}
static __inline__ __m256i __DEFAULT_FN_ATTRS
_mm256_maskz_cvtepu8_epi64 (__mmask8 __U, __m128i __A)
{
return (__m256i) __builtin_ia32_pmovzxbq256_mask ((__v16qi) __A,
(__v4di)
_mm256_setzero_si256 (),
(__mmask8) __U);
}
static __inline__ __m128i __DEFAULT_FN_ATTRS
_mm_mask_cvtepu32_epi64 (__m128i __W, __mmask8 __U, __m128i __X)
{
return (__m128i) __builtin_ia32_pmovzxdq128_mask ((__v4si) __X,
(__v2di) __W,
(__mmask8) __U);
}
static __inline__ __m128i __DEFAULT_FN_ATTRS
_mm_maskz_cvtepu32_epi64 (__mmask8 __U, __m128i __X)
{
return (__m128i) __builtin_ia32_pmovzxdq128_mask ((__v4si) __X,
(__v2di)
_mm_setzero_si128 (),
(__mmask8) __U);
}
static __inline__ __m256i __DEFAULT_FN_ATTRS
_mm256_mask_cvtepu32_epi64 (__m256i __W, __mmask8 __U, __m128i __X)
{
return (__m256i) __builtin_ia32_pmovzxdq256_mask ((__v4si) __X,
(__v4di) __W,
(__mmask8) __U);
}
static __inline__ __m256i __DEFAULT_FN_ATTRS
_mm256_maskz_cvtepu32_epi64 (__mmask8 __U, __m128i __X)
{
return (__m256i) __builtin_ia32_pmovzxdq256_mask ((__v4si) __X,
(__v4di)
_mm256_setzero_si256 (),
(__mmask8) __U);
}
static __inline__ __m128i __DEFAULT_FN_ATTRS
_mm_mask_cvtepu16_epi32 (__m128i __W, __mmask8 __U, __m128i __A)
{
return (__m128i) __builtin_ia32_pmovzxwd128_mask ((__v8hi) __A,
(__v4si) __W,
(__mmask8) __U);
}
static __inline__ __m128i __DEFAULT_FN_ATTRS
_mm_maskz_cvtepu16_epi32 (__mmask8 __U, __m128i __A)
{
return (__m128i) __builtin_ia32_pmovzxwd128_mask ((__v8hi) __A,
(__v4si)
_mm_setzero_si128 (),
(__mmask8) __U);
}
static __inline__ __m256i __DEFAULT_FN_ATTRS
_mm256_mask_cvtepu16_epi32 (__m256i __W, __mmask8 __U, __m128i __A)
{
return (__m256i) __builtin_ia32_pmovzxwd256_mask ((__v8hi) __A,
(__v8si) __W,
(__mmask8) __U);
}
static __inline__ __m256i __DEFAULT_FN_ATTRS
_mm256_maskz_cvtepu16_epi32 (__mmask8 __U, __m128i __A)
{
return (__m256i) __builtin_ia32_pmovzxwd256_mask ((__v8hi) __A,
(__v8si)
_mm256_setzero_si256 (),
(__mmask8) __U);
}
static __inline__ __m128i __DEFAULT_FN_ATTRS
_mm_mask_cvtepu16_epi64 (__m128i __W, __mmask8 __U, __m128i __A)
{
return (__m128i) __builtin_ia32_pmovzxwq128_mask ((__v8hi) __A,
(__v2di) __W,
(__mmask8) __U);
}
static __inline__ __m128i __DEFAULT_FN_ATTRS
_mm_maskz_cvtepu16_epi64 (__mmask8 __U, __m128i __A)
{
return (__m128i) __builtin_ia32_pmovzxwq128_mask ((__v8hi) __A,
(__v2di)
_mm_setzero_si128 (),
(__mmask8) __U);
}
static __inline__ __m256i __DEFAULT_FN_ATTRS
_mm256_mask_cvtepu16_epi64 (__m256i __W, __mmask8 __U, __m128i __A)
{
return (__m256i) __builtin_ia32_pmovzxwq256_mask ((__v8hi) __A,
(__v4di) __W,
(__mmask8) __U);
}
static __inline__ __m256i __DEFAULT_FN_ATTRS
_mm256_maskz_cvtepu16_epi64 (__mmask8 __U, __m128i __A)
{
return (__m256i) __builtin_ia32_pmovzxwq256_mask ((__v8hi) __A,
(__v4di)
_mm256_setzero_si256 (),
(__mmask8) __U);
}
#undef __DEFAULT_FN_ATTRS
#undef __DEFAULT_FN_ATTRS_BOTH

Просмотреть файл

@ -833,13 +833,13 @@ VersionTuple Parser::ParseVersionTuple(SourceRange &Range) {
/// \brief Parse the contents of the "availability" attribute.
///
/// availability-attribute:
/// 'availability' '(' platform ',' opt-nopartial version-arg-list, opt-message')'
/// 'availability' '(' platform ',' opt-strict version-arg-list, opt-message')'
///
/// platform:
/// identifier
///
/// opt-nopartial:
/// 'nopartial' ','
/// opt-strict:
/// 'strict' ','
///
/// version-arg-list:
/// version-arg
@ -892,12 +892,12 @@ void Parser::ParseAvailabilityAttribute(IdentifierInfo &Availability,
Ident_obsoleted = PP.getIdentifierInfo("obsoleted");
Ident_unavailable = PP.getIdentifierInfo("unavailable");
Ident_message = PP.getIdentifierInfo("message");
Ident_nopartial = PP.getIdentifierInfo("nopartial");
Ident_strict = PP.getIdentifierInfo("strict");
}
// Parse the optional "nopartial" and the set of
// Parse the optional "strict" and the set of
// introductions/deprecations/removals.
SourceLocation UnavailableLoc, NopartialLoc;
SourceLocation UnavailableLoc, StrictLoc;
do {
if (Tok.isNot(tok::identifier)) {
Diag(Tok, diag::err_availability_expected_change);
@ -907,12 +907,12 @@ void Parser::ParseAvailabilityAttribute(IdentifierInfo &Availability,
IdentifierInfo *Keyword = Tok.getIdentifierInfo();
SourceLocation KeywordLoc = ConsumeToken();
if (Keyword == Ident_nopartial) {
if (NopartialLoc.isValid()) {
if (Keyword == Ident_strict) {
if (StrictLoc.isValid()) {
Diag(KeywordLoc, diag::err_availability_redundant)
<< Keyword << SourceRange(NopartialLoc);
<< Keyword << SourceRange(StrictLoc);
}
NopartialLoc = KeywordLoc;
StrictLoc = KeywordLoc;
continue;
}
@ -1037,7 +1037,7 @@ void Parser::ParseAvailabilityAttribute(IdentifierInfo &Availability,
Changes[Deprecated],
Changes[Obsoleted],
UnavailableLoc, MessageExpr.get(),
Syntax, NopartialLoc);
Syntax, StrictLoc);
}
/// \brief Parse the contents of the "objc_bridge_related" attribute.

Просмотреть файл

@ -491,7 +491,7 @@ void Parser::Initialize() {
Ident_deprecated = nullptr;
Ident_obsoleted = nullptr;
Ident_unavailable = nullptr;
Ident_nopartial = nullptr;
Ident_strict = nullptr;
Ident__except = nullptr;

Просмотреть файл

@ -35,9 +35,6 @@ DelayedDiagnostic::makeAvailability(Sema::AvailabilityDiagnostic AD,
case Sema::AD_Unavailable:
DD.Kind = Unavailable;
break;
case Sema::AD_NotYetIntroduced:
DD.Kind = NotYetIntroduced;
break;
case Sema::AD_Partial:
llvm_unreachable("AD_Partial diags should not be delayed");
}
@ -66,7 +63,6 @@ void DelayedDiagnostic::Destroy() {
case Deprecation:
case Unavailable:
case NotYetIntroduced:
delete [] DeprecationData.Message;
break;

Просмотреть файл

@ -2196,7 +2196,7 @@ static bool mergeDeclAttribute(Sema &S, NamedDecl *D,
NewAttr = S.mergeAvailabilityAttr(D, AA->getRange(), AA->getPlatform(),
AA->getIntroduced(), AA->getDeprecated(),
AA->getObsoleted(), AA->getUnavailable(),
AA->getMessage(), AA->getNopartial(), AMK,
AA->getMessage(), AA->getStrict(), AMK,
AttrSpellingListIndex);
else if (const auto *VA = dyn_cast<VisibilityAttr>(Attr))
NewAttr = S.mergeVisibilityAttr(D, VA->getRange(), VA->getVisibility(),

Просмотреть файл

@ -1918,7 +1918,7 @@ AvailabilityAttr *Sema::mergeAvailabilityAttr(NamedDecl *D, SourceRange Range,
VersionTuple Obsoleted,
bool IsUnavailable,
StringRef Message,
bool IsNopartial,
bool IsStrict,
AvailabilityMergeKind AMK,
unsigned AttrSpellingListIndex) {
VersionTuple MergedIntroduced = Introduced;
@ -2065,7 +2065,7 @@ AvailabilityAttr *Sema::mergeAvailabilityAttr(NamedDecl *D, SourceRange Range,
return ::new (Context) AvailabilityAttr(Range, Context, Platform,
Introduced, Deprecated,
Obsoleted, IsUnavailable, Message,
IsNopartial, AttrSpellingListIndex);
IsStrict, AttrSpellingListIndex);
}
return nullptr;
}
@ -2092,7 +2092,7 @@ static void handleAvailabilityAttr(Sema &S, Decl *D,
AvailabilityChange Deprecated = Attr.getAvailabilityDeprecated();
AvailabilityChange Obsoleted = Attr.getAvailabilityObsoleted();
bool IsUnavailable = Attr.getUnavailableLoc().isValid();
bool IsNopartial = Attr.getNopartialLoc().isValid();
bool IsStrict = Attr.getStrictLoc().isValid();
StringRef Str;
if (const StringLiteral *SE =
dyn_cast_or_null<StringLiteral>(Attr.getMessageExpr()))
@ -2103,7 +2103,7 @@ static void handleAvailabilityAttr(Sema &S, Decl *D,
Deprecated.Version,
Obsoleted.Version,
IsUnavailable, Str,
IsNopartial,
IsStrict,
Sema::AMK_None,
Index);
if (NewAttr)
@ -2148,7 +2148,7 @@ static void handleAvailabilityAttr(Sema &S, Decl *D,
NewDeprecated,
NewObsoleted,
IsUnavailable, Str,
IsNopartial,
IsStrict,
Sema::AMK_None,
Index);
if (NewAttr)
@ -2171,7 +2171,7 @@ static void handleAvailabilityAttr(Sema &S, Decl *D,
Deprecated.Version,
Obsoleted.Version,
IsUnavailable, Str,
IsNopartial,
IsStrict,
Sema::AMK_None,
Index);
if (NewAttr)
@ -5964,14 +5964,6 @@ static void DoEmitAvailabilityWarning(Sema &S, Sema::AvailabilityDiagnostic K,
property_note_select = /* partial */ 2;
available_here_select_kind = /* partial */ 3;
break;
case Sema::AD_NotYetIntroduced:
diag = diag::err_notyetintroduced;
diag_message = diag::err_notyetintroduced_message;
diag_fwdclass_message = diag::warn_notyetintroduced_fwdclass_message;
property_note_select = /* deprecated */ 3;
available_here_select_kind = /* notyetintroduced */ 4;
break;
}
if (!Message.empty()) {
@ -5998,22 +5990,10 @@ static void DoEmitAvailabilityWarning(Sema &S, Sema::AvailabilityDiagnostic K,
static void handleDelayedAvailabilityCheck(Sema &S, DelayedDiagnostic &DD,
Decl *Ctx) {
assert(DD.Kind == DelayedDiagnostic::Deprecation ||
DD.Kind == DelayedDiagnostic::Unavailable ||
DD.Kind == DelayedDiagnostic::NotYetIntroduced);
Sema::AvailabilityDiagnostic AD;
switch (DD.Kind) {
case DelayedDiagnostic::Deprecation:
AD = Sema::AD_Deprecation;
break;
case DelayedDiagnostic::Unavailable:
AD = Sema::AD_Unavailable;
break;
case DelayedDiagnostic::NotYetIntroduced:
AD = Sema::AD_NotYetIntroduced;
break;
default:
llvm_unreachable("Expecting: deprecated, unavailable, not-yet-introduced");
}
DD.Kind == DelayedDiagnostic::Unavailable);
Sema::AvailabilityDiagnostic AD = DD.Kind == DelayedDiagnostic::Deprecation
? Sema::AD_Deprecation
: Sema::AD_Unavailable;
DD.Triggered = true;
DoEmitAvailabilityWarning(
S, AD, Ctx, DD.getDeprecationDecl(), DD.getDeprecationMessage(), DD.Loc,

Просмотреть файл

@ -159,12 +159,11 @@ DiagnoseAvailabilityOfDecl(Sema &S, NamedDecl *D, SourceLocation Loc,
break;
case AR_NotYetIntroduced: {
// With nopartial, the compiler will emit delayed error just like how
// "deprecated, unavailable" are handled.
// With strict, the compiler will emit unavailable error.
AvailabilityAttr *AA = D->getAttr<AvailabilityAttr>();
if (AA && AA->getNopartial() &&
if (AA && AA->getStrict() &&
S.getCurContextAvailability() != AR_NotYetIntroduced)
S.EmitAvailabilityWarning(Sema::AD_NotYetIntroduced,
S.EmitAvailabilityWarning(Sema::AD_Unavailable,
D, Message, Loc, UnknownObjCClass, ObjCPDecl,
ObjCPropertyAccess);

Просмотреть файл

@ -902,6 +902,32 @@ static bool IsInFnTryBlockHandler(const Scope *S) {
return false;
}
static VarDecl *
getVarTemplateSpecialization(Sema &S, VarTemplateDecl *VarTempl,
const TemplateArgumentListInfo *TemplateArgs,
const DeclarationNameInfo &MemberNameInfo,
SourceLocation TemplateKWLoc) {
if (!TemplateArgs) {
S.Diag(MemberNameInfo.getBeginLoc(), diag::err_template_decl_ref)
<< /*Variable template*/ 1 << MemberNameInfo.getName()
<< MemberNameInfo.getSourceRange();
S.Diag(VarTempl->getLocation(), diag::note_template_decl_here);
return nullptr;
}
DeclResult VDecl = S.CheckVarTemplateId(
VarTempl, TemplateKWLoc, MemberNameInfo.getLoc(), *TemplateArgs);
if (VDecl.isInvalid())
return nullptr;
VarDecl *Var = cast<VarDecl>(VDecl.get());
if (!Var->getTemplateSpecializationKind())
Var->setTemplateSpecializationKind(TSK_ImplicitInstantiation,
MemberNameInfo.getLoc());
return Var;
}
ExprResult
Sema::BuildMemberReferenceExpr(Expr *BaseExpr, QualType BaseExprType,
SourceLocation OpLoc, bool IsArrow,
@ -1069,9 +1095,20 @@ Sema::BuildMemberReferenceExpr(Expr *BaseExpr, QualType BaseExprType,
// Handle the implicit-member-access case.
if (!BaseExpr) {
// If this is not an instance member, convert to a non-member access.
if (!MemberDecl->isCXXInstanceMember())
if (!MemberDecl->isCXXInstanceMember()) {
// If this is a variable template, get the instantiated variable
// declaration corresponding to the supplied template arguments
// (while emitting diagnostics as necessary) that will be referenced
// by this expression.
if (isa<VarTemplateDecl>(MemberDecl)) {
MemberDecl = getVarTemplateSpecialization(
*this, cast<VarTemplateDecl>(MemberDecl), TemplateArgs,
R.getLookupNameInfo(), TemplateKWLoc);
if (!MemberDecl)
return ExprError();
}
return BuildDeclarationNameExpr(SS, R.getLookupNameInfo(), MemberDecl);
}
SourceLocation Loc = R.getNameLoc();
if (SS.getRange().isValid())
Loc = SS.getRange().getBegin();
@ -1127,6 +1164,15 @@ Sema::BuildMemberReferenceExpr(Expr *BaseExpr, QualType BaseExprType,
TemplateKWLoc, Enum, FoundDecl, MemberNameInfo,
Enum->getType(), VK_RValue, OK_Ordinary);
}
if (VarTemplateDecl *VarTempl = dyn_cast<VarTemplateDecl>(MemberDecl)) {
if (VarDecl *Var = getVarTemplateSpecialization(
*this, VarTempl, TemplateArgs, MemberNameInfo, TemplateKWLoc))
return BuildMemberExpr(*this, Context, BaseExpr, IsArrow, OpLoc, SS,
TemplateKWLoc, Var, FoundDecl, MemberNameInfo,
Var->getType().getNonReferenceType(), VK_LValue,
OK_Ordinary);
return ExprError();
}
// We found something that we didn't expect. Complain.
if (isa<TypeDecl>(MemberDecl))

Просмотреть файл

@ -1058,3 +1058,21 @@ __m512i test_mm512_maskz_cvtepi8_epi16(__mmask32 __U, __m256i __A) {
// CHECK: @llvm.x86.avx512.mask.pmovsxb.w.512
return _mm512_maskz_cvtepi8_epi16(__U, __A);
}
__m512i test_mm512_cvtepu8_epi16(__m256i __A) {
// CHECK-LABEL: @test_mm512_cvtepu8_epi16
// CHECK: @llvm.x86.avx512.mask.pmovzxb.w.512
return _mm512_cvtepu8_epi16(__A);
}
__m512i test_mm512_mask_cvtepu8_epi16(__m512i __W, __mmask32 __U, __m256i __A) {
// CHECK-LABEL: @test_mm512_mask_cvtepu8_epi16
// CHECK: @llvm.x86.avx512.mask.pmovzxb.w.512
return _mm512_mask_cvtepu8_epi16(__W, __U, __A);
}
__m512i test_mm512_maskz_cvtepu8_epi16(__mmask32 __U, __m256i __A) {
// CHECK-LABEL: @test_mm512_maskz_cvtepu8_epi16
// CHECK: @llvm.x86.avx512.mask.pmovzxb.w.512
return _mm512_maskz_cvtepu8_epi16(__U, __A);
}

Просмотреть файл

@ -1990,3 +1990,92 @@ __m512i test_mm512_maskz_cvtepi16_epi64(__mmask8 __U, __m128i __A) {
return _mm512_maskz_cvtepi16_epi64(__U, __A);
}
__m512i test_mm512_cvtepu8_epi32(__m128i __A) {
// CHECK-LABEL: @test_mm512_cvtepu8_epi32
// CHECK: @llvm.x86.avx512.mask.pmovzxb.d.512
return _mm512_cvtepu8_epi32(__A);
}
__m512i test_mm512_mask_cvtepu8_epi32(__m512i __W, __mmask16 __U, __m128i __A) {
// CHECK-LABEL: @test_mm512_mask_cvtepu8_epi32
// CHECK: @llvm.x86.avx512.mask.pmovzxb.d.512
return _mm512_mask_cvtepu8_epi32(__W, __U, __A);
}
__m512i test_mm512_maskz_cvtepu8_epi32(__mmask16 __U, __m128i __A) {
// CHECK-LABEL: @test_mm512_maskz_cvtepu8_epi32
// CHECK: @llvm.x86.avx512.mask.pmovzxb.d.512
return _mm512_maskz_cvtepu8_epi32(__U, __A);
}
__m512i test_mm512_cvtepu8_epi64(__m128i __A) {
// CHECK-LABEL: @test_mm512_cvtepu8_epi64
// CHECK: @llvm.x86.avx512.mask.pmovzxb.q.512
return _mm512_cvtepu8_epi64(__A);
}
__m512i test_mm512_mask_cvtepu8_epi64(__m512i __W, __mmask8 __U, __m128i __A) {
// CHECK-LABEL: @test_mm512_mask_cvtepu8_epi64
// CHECK: @llvm.x86.avx512.mask.pmovzxb.q.512
return _mm512_mask_cvtepu8_epi64(__W, __U, __A);
}
__m512i test_mm512_maskz_cvtepu8_epi64(__mmask8 __U, __m128i __A) {
// CHECK-LABEL: @test_mm512_maskz_cvtepu8_epi64
// CHECK: @llvm.x86.avx512.mask.pmovzxb.q.512
return _mm512_maskz_cvtepu8_epi64(__U, __A);
}
__m512i test_mm512_cvtepu32_epi64(__m256i __X) {
// CHECK-LABEL: @test_mm512_cvtepu32_epi64
// CHECK: @llvm.x86.avx512.mask.pmovzxd.q.512
return _mm512_cvtepu32_epi64(__X);
}
__m512i test_mm512_mask_cvtepu32_epi64(__m512i __W, __mmask8 __U, __m256i __X) {
// CHECK-LABEL: @test_mm512_mask_cvtepu32_epi64
// CHECK: @llvm.x86.avx512.mask.pmovzxd.q.512
return _mm512_mask_cvtepu32_epi64(__W, __U, __X);
}
__m512i test_mm512_maskz_cvtepu32_epi64(__mmask8 __U, __m256i __X) {
// CHECK-LABEL: @test_mm512_maskz_cvtepu32_epi64
// CHECK: @llvm.x86.avx512.mask.pmovzxd.q.512
return _mm512_maskz_cvtepu32_epi64(__U, __X);
}
__m512i test_mm512_cvtepu16_epi32(__m256i __A) {
// CHECK-LABEL: @test_mm512_cvtepu16_epi32
// CHECK: @llvm.x86.avx512.mask.pmovzxw.d.512
return _mm512_cvtepu16_epi32(__A);
}
__m512i test_mm512_mask_cvtepu16_epi32(__m512i __W, __mmask16 __U, __m256i __A) {
// CHECK-LABEL: @test_mm512_mask_cvtepu16_epi32
// CHECK: @llvm.x86.avx512.mask.pmovzxw.d.512
return _mm512_mask_cvtepu16_epi32(__W, __U, __A);
}
__m512i test_mm512_maskz_cvtepu16_epi32(__mmask16 __U, __m256i __A) {
// CHECK-LABEL: @test_mm512_maskz_cvtepu16_epi32
// CHECK: @llvm.x86.avx512.mask.pmovzxw.d.512
return _mm512_maskz_cvtepu16_epi32(__U, __A);
}
__m512i test_mm512_cvtepu16_epi64(__m128i __A) {
// CHECK-LABEL: @test_mm512_cvtepu16_epi64
// CHECK: @llvm.x86.avx512.mask.pmovzxw.q.512
return _mm512_cvtepu16_epi64(__A);
}
__m512i test_mm512_mask_cvtepu16_epi64(__m512i __W, __mmask8 __U, __m128i __A) {
// CHECK-LABEL: @test_mm512_mask_cvtepu16_epi64
// CHECK: @llvm.x86.avx512.mask.pmovzxw.q.512
return _mm512_mask_cvtepu16_epi64(__W, __U, __A);
}
__m512i test_mm512_maskz_cvtepu16_epi64(__mmask8 __U, __m128i __A) {
// CHECK-LABEL: @test_mm512_maskz_cvtepu16_epi64
// CHECK: @llvm.x86.avx512.mask.pmovzxw.q.512
return _mm512_maskz_cvtepu16_epi64(__U, __A);
}

Просмотреть файл

@ -3275,3 +3275,122 @@ __m256i test_mm256_maskz_cvtepi16_epi64(__mmask8 __U, __m128i __A) {
return _mm256_maskz_cvtepi16_epi64(__U, __A);
}
__m128i test_mm_mask_cvtepu8_epi32(__m128i __W, __mmask8 __U, __m128i __A) {
// CHECK-LABEL: @test_mm_mask_cvtepu8_epi32
// CHECK: @llvm.x86.avx512.mask.pmovzxb.d.128
return _mm_mask_cvtepu8_epi32(__W, __U, __A);
}
__m128i test_mm_maskz_cvtepu8_epi32(__mmask8 __U, __m128i __A) {
// CHECK-LABEL: @test_mm_maskz_cvtepu8_epi32
// CHECK: @llvm.x86.avx512.mask.pmovzxb.d.128
return _mm_maskz_cvtepu8_epi32(__U, __A);
}
__m256i test_mm256_mask_cvtepu8_epi32(__m256i __W, __mmask8 __U, __m128i __A) {
// CHECK-LABEL: @test_mm256_mask_cvtepu8_epi32
// CHECK: @llvm.x86.avx512.mask.pmovzxb.d.256
return _mm256_mask_cvtepu8_epi32(__W, __U, __A);
}
__m256i test_mm256_maskz_cvtepu8_epi32(__mmask8 __U, __m128i __A) {
// CHECK-LABEL: @test_mm256_maskz_cvtepu8_epi32
// CHECK: @llvm.x86.avx512.mask.pmovzxb.d.256
return _mm256_maskz_cvtepu8_epi32(__U, __A);
}
__m128i test_mm_mask_cvtepu8_epi64(__m128i __W, __mmask8 __U, __m128i __A) {
// CHECK-LABEL: @test_mm_mask_cvtepu8_epi64
// CHECK: @llvm.x86.avx512.mask.pmovzxb.q.128
return _mm_mask_cvtepu8_epi64(__W, __U, __A);
}
__m128i test_mm_maskz_cvtepu8_epi64(__mmask8 __U, __m128i __A) {
// CHECK-LABEL: @test_mm_maskz_cvtepu8_epi64
// CHECK: @llvm.x86.avx512.mask.pmovzxb.q.128
return _mm_maskz_cvtepu8_epi64(__U, __A);
}
__m256i test_mm256_mask_cvtepu8_epi64(__m256i __W, __mmask8 __U, __m128i __A) {
// CHECK-LABEL: @test_mm256_mask_cvtepu8_epi64
// CHECK: @llvm.x86.avx512.mask.pmovzxb.q.256
return _mm256_mask_cvtepu8_epi64(__W, __U, __A);
}
__m256i test_mm256_maskz_cvtepu8_epi64(__mmask8 __U, __m128i __A) {
// CHECK-LABEL: @test_mm256_maskz_cvtepu8_epi64
// CHECK: @llvm.x86.avx512.mask.pmovzxb.q.256
return _mm256_maskz_cvtepu8_epi64(__U, __A);
}
__m128i test_mm_mask_cvtepu32_epi64(__m128i __W, __mmask8 __U, __m128i __X) {
// CHECK-LABEL: @test_mm_mask_cvtepu32_epi64
// CHECK: @llvm.x86.avx512.mask.pmovzxd.q.128
return _mm_mask_cvtepu32_epi64(__W, __U, __X);
}
__m128i test_mm_maskz_cvtepu32_epi64(__mmask8 __U, __m128i __X) {
// CHECK-LABEL: @test_mm_maskz_cvtepu32_epi64
// CHECK: @llvm.x86.avx512.mask.pmovzxd.q.128
return _mm_maskz_cvtepu32_epi64(__U, __X);
}
__m256i test_mm256_mask_cvtepu32_epi64(__m256i __W, __mmask8 __U, __m128i __X) {
// CHECK-LABEL: @test_mm256_mask_cvtepu32_epi64
// CHECK: @llvm.x86.avx512.mask.pmovzxd.q.256
return _mm256_mask_cvtepu32_epi64(__W, __U, __X);
}
__m256i test_mm256_maskz_cvtepu32_epi64(__mmask8 __U, __m128i __X) {
// CHECK-LABEL: @test_mm256_maskz_cvtepu32_epi64
// CHECK: @llvm.x86.avx512.mask.pmovzxd.q.256
return _mm256_maskz_cvtepu32_epi64(__U, __X);
}
__m128i test_mm_mask_cvtepu16_epi32(__m128i __W, __mmask8 __U, __m128i __A) {
// CHECK-LABEL: @test_mm_mask_cvtepu16_epi32
// CHECK: @llvm.x86.avx512.mask.pmovzxw.d.128
return _mm_mask_cvtepu16_epi32(__W, __U, __A);
}
__m128i test_mm_maskz_cvtepu16_epi32(__mmask8 __U, __m128i __A) {
// CHECK-LABEL: @test_mm_maskz_cvtepu16_epi32
// CHECK: @llvm.x86.avx512.mask.pmovzxw.d.128
return _mm_maskz_cvtepu16_epi32(__U, __A);
}
__m256i test_mm256_mask_cvtepu16_epi32(__m256i __W, __mmask8 __U, __m128i __A) {
// CHECK-LABEL: @test_mm256_mask_cvtepu16_epi32
// CHECK: @llvm.x86.avx512.mask.pmovzxw.d.256
return _mm256_mask_cvtepu16_epi32(__W, __U, __A);
}
__m256i test_mm256_maskz_cvtepu16_epi32(__mmask8 __U, __m128i __A) {
// CHECK-LABEL: @test_mm256_maskz_cvtepu16_epi32
// CHECK: @llvm.x86.avx512.mask.pmovzxw.d.256
return _mm256_maskz_cvtepu16_epi32(__U, __A);
}
__m128i test_mm_mask_cvtepu16_epi64(__m128i __W, __mmask8 __U, __m128i __A) {
// CHECK-LABEL: @test_mm_mask_cvtepu16_epi64
// CHECK: @llvm.x86.avx512.mask.pmovzxw.q.128
return _mm_mask_cvtepu16_epi64(__W, __U, __A);
}
__m128i test_mm_maskz_cvtepu16_epi64(__mmask8 __U, __m128i __A) {
// CHECK-LABEL: @test_mm_maskz_cvtepu16_epi64
// CHECK: @llvm.x86.avx512.mask.pmovzxw.q.128
return _mm_maskz_cvtepu16_epi64(__U, __A);
}
__m256i test_mm256_mask_cvtepu16_epi64(__m256i __W, __mmask8 __U, __m128i __A) {
// CHECK-LABEL: @test_mm256_mask_cvtepu16_epi64
// CHECK: @llvm.x86.avx512.mask.pmovzxw.q.256
return _mm256_mask_cvtepu16_epi64(__W, __U, __A);
}
__m256i test_mm256_maskz_cvtepu16_epi64(__mmask8 __U, __m128i __A) {
// CHECK-LABEL: @test_mm256_maskz_cvtepu16_epi64
// CHECK: @llvm.x86.avx512.mask.pmovzxw.q.256
return _mm256_maskz_cvtepu16_epi64(__U, __A);
}

Просмотреть файл

@ -1728,3 +1728,147 @@ __m256i test_mm256_maskz_cvtepi8_epi16(__mmask16 __U, __m128i __A) {
// CHECK: @llvm.x86.avx512.mask.pmovsxb.w.256
return _mm256_maskz_cvtepi8_epi16(__U, __A);
}
__m128i test_mm_mask_cvtepu8_epi32(__m128i __W, __mmask8 __U, __m128i __A) {
// CHECK-LABEL: @test_mm_mask_cvtepu8_epi32
// CHECK: @llvm.x86.avx512.mask.pmovzxb.d.128
return _mm_mask_cvtepu8_epi32(__W, __U, __A);
}
__m128i test_mm_maskz_cvtepu8_epi32(__mmask8 __U, __m128i __A) {
// CHECK-LABEL: @test_mm_maskz_cvtepu8_epi32
// CHECK: @llvm.x86.avx512.mask.pmovzxb.d.128
return _mm_maskz_cvtepu8_epi32(__U, __A);
}
__m256i test_mm256_mask_cvtepu8_epi32(__m256i __W, __mmask8 __U, __m128i __A) {
// CHECK-LABEL: @test_mm256_mask_cvtepu8_epi32
// CHECK: @llvm.x86.avx512.mask.pmovzxb.d.256
return _mm256_mask_cvtepu8_epi32(__W, __U, __A);
}
__m256i test_mm256_maskz_cvtepu8_epi32(__mmask8 __U, __m128i __A) {
// CHECK-LABEL: @test_mm256_maskz_cvtepu8_epi32
// CHECK: @llvm.x86.avx512.mask.pmovzxb.d.256
return _mm256_maskz_cvtepu8_epi32(__U, __A);
}
__m128i test_mm_mask_cvtepu8_epi64(__m128i __W, __mmask8 __U, __m128i __A) {
// CHECK-LABEL: @test_mm_mask_cvtepu8_epi64
// CHECK: @llvm.x86.avx512.mask.pmovzxb.q.128
return _mm_mask_cvtepu8_epi64(__W, __U, __A);
}
__m128i test_mm_maskz_cvtepu8_epi64(__mmask8 __U, __m128i __A) {
// CHECK-LABEL: @test_mm_maskz_cvtepu8_epi64
// CHECK: @llvm.x86.avx512.mask.pmovzxb.q.128
return _mm_maskz_cvtepu8_epi64(__U, __A);
}
__m256i test_mm256_mask_cvtepu8_epi64(__m256i __W, __mmask8 __U, __m128i __A) {
// CHECK-LABEL: @test_mm256_mask_cvtepu8_epi64
// CHECK: @llvm.x86.avx512.mask.pmovzxb.q.256
return _mm256_mask_cvtepu8_epi64(__W, __U, __A);
}
__m256i test_mm256_maskz_cvtepu8_epi64(__mmask8 __U, __m128i __A) {
// CHECK-LABEL: @test_mm256_maskz_cvtepu8_epi64
// CHECK: @llvm.x86.avx512.mask.pmovzxb.q.256
return _mm256_maskz_cvtepu8_epi64(__U, __A);
}
__m128i test_mm_mask_cvtepu32_epi64(__m128i __W, __mmask8 __U, __m128i __X) {
// CHECK-LABEL: @test_mm_mask_cvtepu32_epi64
// CHECK: @llvm.x86.avx512.mask.pmovzxd.q.128
return _mm_mask_cvtepu32_epi64(__W, __U, __X);
}
__m128i test_mm_maskz_cvtepu32_epi64(__mmask8 __U, __m128i __X) {
// CHECK-LABEL: @test_mm_maskz_cvtepu32_epi64
// CHECK: @llvm.x86.avx512.mask.pmovzxd.q.128
return _mm_maskz_cvtepu32_epi64(__U, __X);
}
__m256i test_mm256_mask_cvtepu32_epi64(__m256i __W, __mmask8 __U, __m128i __X) {
// CHECK-LABEL: @test_mm256_mask_cvtepu32_epi64
// CHECK: @llvm.x86.avx512.mask.pmovzxd.q.256
return _mm256_mask_cvtepu32_epi64(__W, __U, __X);
}
__m256i test_mm256_maskz_cvtepu32_epi64(__mmask8 __U, __m128i __X) {
// CHECK-LABEL: @test_mm256_maskz_cvtepu32_epi64
// CHECK: @llvm.x86.avx512.mask.pmovzxd.q.256
return _mm256_maskz_cvtepu32_epi64(__U, __X);
}
__m128i test_mm_mask_cvtepu16_epi32(__m128i __W, __mmask8 __U, __m128i __A) {
// CHECK-LABEL: @test_mm_mask_cvtepu16_epi32
// CHECK: @llvm.x86.avx512.mask.pmovzxw.d.128
return _mm_mask_cvtepu16_epi32(__W, __U, __A);
}
__m128i test_mm_maskz_cvtepu16_epi32(__mmask8 __U, __m128i __A) {
// CHECK-LABEL: @test_mm_maskz_cvtepu16_epi32
// CHECK: @llvm.x86.avx512.mask.pmovzxw.d.128
return _mm_maskz_cvtepu16_epi32(__U, __A);
}
__m256i test_mm256_mask_cvtepu16_epi32(__m256i __W, __mmask8 __U, __m128i __A) {
// CHECK-LABEL: @test_mm256_mask_cvtepu16_epi32
// CHECK: @llvm.x86.avx512.mask.pmovzxw.d.256
return _mm256_mask_cvtepu16_epi32(__W, __U, __A);
}
__m256i test_mm256_maskz_cvtepu16_epi32(__mmask8 __U, __m128i __A) {
// CHECK-LABEL: @test_mm256_maskz_cvtepu16_epi32
// CHECK: @llvm.x86.avx512.mask.pmovzxw.d.256
return _mm256_maskz_cvtepu16_epi32(__U, __A);
}
__m128i test_mm_mask_cvtepu16_epi64(__m128i __W, __mmask8 __U, __m128i __A) {
// CHECK-LABEL: @test_mm_mask_cvtepu16_epi64
// CHECK: @llvm.x86.avx512.mask.pmovzxw.q.128
return _mm_mask_cvtepu16_epi64(__W, __U, __A);
}
__m128i test_mm_maskz_cvtepu16_epi64(__mmask8 __U, __m128i __A) {
// CHECK-LABEL: @test_mm_maskz_cvtepu16_epi64
// CHECK: @llvm.x86.avx512.mask.pmovzxw.q.128
return _mm_maskz_cvtepu16_epi64(__U, __A);
}
__m256i test_mm256_mask_cvtepu16_epi64(__m256i __W, __mmask8 __U, __m128i __A) {
// CHECK-LABEL: @test_mm256_mask_cvtepu16_epi64
// CHECK: @llvm.x86.avx512.mask.pmovzxw.q.256
return _mm256_mask_cvtepu16_epi64(__W, __U, __A);
}
__m256i test_mm256_maskz_cvtepu16_epi64(__mmask8 __U, __m128i __A) {
// CHECK-LABEL: @test_mm256_maskz_cvtepu16_epi64
// CHECK: @llvm.x86.avx512.mask.pmovzxw.q.256
return _mm256_maskz_cvtepu16_epi64(__U, __A);
}
__m128i test_mm_mask_cvtepu8_epi16(__m128i __W, __mmask32 __U, __m128i __A) {
// CHECK-LABEL: @test_mm_mask_cvtepu8_epi16
// CHECK: @llvm.x86.avx512.mask.pmovzxb.w.128
return _mm_mask_cvtepu8_epi16(__W, __U, __A);
}
__m128i test_mm_maskz_cvtepu8_epi16(__mmask8 __U, __m128i __A) {
// CHECK-LABEL: @test_mm_maskz_cvtepu8_epi16
// CHECK: @llvm.x86.avx512.mask.pmovzxb.w.128
return _mm_maskz_cvtepu8_epi16(__U, __A);
}
__m256i test_mm256_mask_cvtepu8_epi16(__m256i __W, __mmask32 __U, __m128i __A) {
// CHECK-LABEL: @test_mm256_mask_cvtepu8_epi16
// CHECK: @llvm.x86.avx512.mask.pmovzxb.w.256
return _mm256_mask_cvtepu8_epi16(__W, __U, __A);
}
__m256i test_mm256_maskz_cvtepu8_epi16(__mmask16 __U, __m128i __A) {
// CHECK-LABEL: @test_mm256_maskz_cvtepu8_epi16
// CHECK: @llvm.x86.avx512.mask.pmovzxb.w.256
return _mm256_maskz_cvtepu8_epi16(__U, __A);
}

Просмотреть файл

@ -6,7 +6,7 @@ void f2(int) __attribute__((availability(macosx,introduced=10.4,deprecated=10.5)
void f3(int) __attribute__((availability(macosx,introduced=10.6)));
void f4(int) __attribute__((availability(macosx,introduced=10.1,deprecated=10.3,obsoleted=10.5), availability(ios,introduced=2.0,deprecated=3.0))); // expected-note{{explicitly marked unavailable}}
void f5(int) __attribute__((availability(ios,introduced=3.2), availability(macosx,unavailable))); // expected-note{{'f5' has been explicitly marked unavailable here}}
void f6(int) __attribute__((availability(macosx,nopartial,introduced=10.6))); //expected-note{{'f6' has been explicitly marked not-yet-introduced here}}
void f6(int) __attribute__((availability(macosx,strict,introduced=10.6))); //expected-note{{'f6' has been explicitly marked unavailable here}}
void test() {
f0(0);
@ -15,7 +15,7 @@ void test() {
f3(0);
f4(0); // expected-error{{f4' is unavailable: obsoleted in OS X 10.5}}
f5(0); // expected-error{{'f5' is unavailable: not available on OS X}}
f6(0); // expected-error{{'f6' is not introduced yet: introduced in OS X 10.6}}
f6(0); // expected-error{{'f6' is unavailable: introduced in OS X 10.6}}
}
// rdar://10535640

Просмотреть файл

@ -1,6 +1,6 @@
// RUN: %clang_cc1 -verify -fsyntax-only %s -Wno-c++11-extensions -Wno-c++1y-extensions -DPRECXX11
// RUN: %clang_cc1 -std=c++11 -verify -fsyntax-only -Wno-c++1y-extensions %s
// RUN: %clang_cc1 -std=c++1y -verify -fsyntax-only %s
// RUN: %clang_cc1 -std=c++1y -verify -fsyntax-only %s -DCPP1Y
#define CONST const
@ -338,3 +338,47 @@ namespace b20896909 {
A<int> ai; // expected-note {{in instantiation of}}
}
}
namespace member_access_is_ok {
#ifdef CPP1Y
namespace ns1 {
struct A {
template<class T, T N> constexpr static T Var = N;
};
static_assert(A{}.Var<int,5> == 5,"");
} // end ns1
#endif // CPP1Y
namespace ns2 {
template<class T> struct A {
template<class U, T N, U M> static T&& Var;
};
template<class T> template<class U, T N, U M> T&& A<T>::Var = T(N + M);
int *AV = &A<int>().Var<char, 5, 'A'>;
} //end ns2
} // end ns member_access_is_ok
#ifdef CPP1Y
namespace PR24473 {
struct Value
{
template<class T>
static constexpr T value = 0;
};
template<typename TValue>
struct Something
{
void foo() {
static_assert(TValue::template value<int> == 0, ""); // error
}
};
int main() {
Something<Value>{}.foo();
return 0;
}
} // end ns PR24473
#endif // CPP1Y

Просмотреть файл

@ -35,7 +35,12 @@ def report_directory(hint, keep):
keep -- a boolean value to keep or delete the empty report directory. """
stamp = time.strftime('scan-build-%Y-%m-%d-%H%M%S-', time.localtime())
name = tempfile.mkdtemp(prefix=stamp, dir=hint)
parentdir = os.path.abspath(hint)
if not os.path.exists(parentdir):
os.makedirs(parentdir)
name = tempfile.mkdtemp(prefix=stamp, dir=parentdir)
logging.info('Report directory created: %s', name)