Skip to content

Commit 32f0a7c

Browse files
committed
Stash
1 parent 79c747e commit 32f0a7c

File tree

2 files changed

+7
-11
lines changed

2 files changed

+7
-11
lines changed

clang/include/clang/Basic/BuiltinsX86.td

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ let Features = "sse", Attributes = [NoThrow, Const, RequiredVectorWidth<128>] in
182182
}
183183

184184
let Features = "sse",
185-
Attributes = [NoThrow, Constexpr, RequiredVectorWidth<128>] in {
185+
Attributes = [NoThrow, Const, Constexpr, RequiredVectorWidth<128>] in {
186186
def movmskps : X86Builtin<"int(_Vector<4, float>)">;
187187
}
188188

@@ -208,12 +208,6 @@ let Features = "sse2", Attributes = [NoThrow, RequiredVectorWidth<128>] in {
208208
def maskmovdqu : X86Builtin<"void(_Vector<16, char>, _Vector<16, char>, char *)">;
209209
}
210210

211-
let Features = "sse2",
212-
Attributes = [NoThrow, Constexpr, RequiredVectorWidth<128>] in {
213-
def movmskpd : X86Builtin<"int(_Vector<2, double>)">;
214-
def pmovmskb128 : X86Builtin<"int(_Vector<16, char>)">;
215-
}
216-
217211
let Features = "sse2", Attributes = [NoThrow] in {
218212
def movnti : X86Builtin<"void(int *, int)">;
219213
}
@@ -222,6 +216,8 @@ let Features = "sse2", Attributes = [NoThrow, Const, Constexpr, RequiredVectorWi
222216
def pshuflw : X86Builtin<"_Vector<8, short>(_Vector<8, short>, _Constant int)">;
223217
def pshufd : X86Builtin<"_Vector<4, int>(_Vector<4, int>, _Constant int)">;
224218
def pshufhw : X86Builtin<"_Vector<8, short>(_Vector<8, short>, _Constant int)">;
219+
def movmskpd : X86Builtin<"int(_Vector<2, double>)">;
220+
def pmovmskb128 : X86Builtin<"int(_Vector<16, char>)">;
225221
}
226222

227223
let Features = "sse2", Attributes = [NoThrow, Const, RequiredVectorWidth<128>] in {
@@ -529,7 +525,7 @@ let Features = "avx", Attributes = [NoThrow, Const, RequiredVectorWidth<128>] in
529525
}
530526

531527
let Features = "avx",
532-
Attributes = [NoThrow, Constexpr, RequiredVectorWidth<256>] in {
528+
Attributes = [NoThrow, Const, Constexpr, RequiredVectorWidth<256>] in {
533529
def movmskpd256 : X86Builtin<"int(_Vector<4, double>)">;
534530
def movmskps256 : X86Builtin<"int(_Vector<8, float>)">;
535531
}
@@ -580,7 +576,7 @@ let Features = "avx", Attributes = [NoThrow, Const, Constexpr, RequiredVectorWid
580576
}
581577

582578
let Features = "avx2",
583-
Attributes = [NoThrow, Constexpr, RequiredVectorWidth<256>] in {
579+
Attributes = [NoThrow, Const, Constexpr, RequiredVectorWidth<256>] in {
584580
def pmovmskb256 : X86Builtin<"int(_Vector<32, char>)">;
585581
}
586582

clang/lib/AST/ByteCode/InterpBuiltin.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2824,8 +2824,8 @@ static bool interp__builtin_ia32_movmsk_op(InterpState &S, CodePtr OpPC,
28242824
const Pointer &Source = S.Stk.pop<Pointer>();
28252825

28262826
unsigned SourceLen = Source.getNumElems();
2827-
const QualType ElemQT = getElemType(Source);
2828-
const OptPrimType ElemPT = S.getContext().classify(ElemQT);
2827+
QualType ElemQT = getElemType(Source);
2828+
OptPrimType ElemPT = S.getContext().classify(ElemQT);
28292829
unsigned LaneWidth = S.getASTContext().getTypeSize(ElemQT);
28302830

28312831
if (ElemQT->isIntegerType()) {

0 commit comments

Comments
 (0)