Skip to content

Commit 5c6c17c

Browse files
author
z1_cciauto
authored
merge main into amd-staging (llvm#4335)
2 parents 508ea5e + c6652cd commit 5c6c17c

File tree

211 files changed

+14778
-3361
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

211 files changed

+14778
-3361
lines changed

clang/docs/analyzer/developer-docs/DebugChecks.rst

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,22 @@ The analyzer contains a number of checkers which can aid in debugging. Enable
99
them by using the "-analyzer-checker=" flag, followed by the name of the
1010
checker.
1111

12+
These checkers are especially useful when analyzing a specific function, using
13+
the `-analyze-function` flag. The flag accepts the function name for C code,
14+
like `-analyze-function=myfunction`.
15+
For C++ code, due to overloading, the function name must include the
16+
parameter list, like `-analyze-function="myfunction(int, _Bool)"`.
17+
18+
Note that `bool` must be spelled as `_Bool` in the parameter list.
19+
Refer to the output of `-analyzer-display-progress` to find the fully qualified
20+
function name.
21+
22+
There are cases when this name can still collide. For example with template
23+
function instances with non-deducible (aka. explicit) template parameters.
24+
In such cases, prefer passing a USR instead of a function name can resolve this
25+
ambiguity, like this: `-analyze-function="c:@S@Window@F@overloaded#I#"`.
26+
27+
Use the `clang-extdef-mapping` tool to find the USR for different functions.
1228

1329
General Analysis Dumpers
1430
========================

clang/include/clang/Basic/BuiltinsX86.td

Lines changed: 25 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def emms : X86Builtin<"void()"> {
5252
let Features = "mmx";
5353
}
5454

55-
let Attributes = [NoThrow, Const, RequiredVectorWidth<64>], Features = "sse" in {
55+
let Attributes = [NoThrow, Const, Constexpr, RequiredVectorWidth<64>], Features = "sse" in {
5656
def vec_ext_v4hi : X86Builtin<"short(_Vector<4, short>, _Constant int)">;
5757
def vec_set_v4hi : X86Builtin<"_Vector<4, short>(_Vector<4, short>, short, _Constant int)">;
5858
}
@@ -92,13 +92,6 @@ let Attributes = [Const, NoThrow, RequiredVectorWidth<128>] in {
9292
def cmpsd : X86Builtin<"_Vector<2, double>(_Vector<2, double>, _Vector<2, double>, _Constant char)">;
9393
}
9494

95-
let Features = "sse2" in {
96-
def vec_ext_v2di : X86Builtin<"long long int(_Vector<2, long long int>, _Constant int)">;
97-
def vec_ext_v4si : X86Builtin<"int(_Vector<4, int>, _Constant int)">;
98-
def vec_ext_v4sf : X86Builtin<"float(_Vector<4, float>, _Constant int)">;
99-
def vec_ext_v8hi : X86Builtin<"short(_Vector<8, short>, _Constant int)">;
100-
def vec_set_v8hi : X86Builtin<"_Vector<8, short>(_Vector<8, short>, short, _Constant int)">;
101-
}
10295

10396
let Features = "sse2", Attributes = [NoThrow, Const, Constexpr, RequiredVectorWidth<128>] in {
10497
def pavgb128 : X86Builtin<"_Vector<16, unsigned char>(_Vector<16, unsigned char>, _Vector<16, unsigned char>)">;
@@ -108,6 +101,12 @@ let Attributes = [Const, NoThrow, RequiredVectorWidth<128>] in {
108101
def packsswb128 : X86Builtin<"_Vector<16, char>(_Vector<8, short>, _Vector<8, short>)">;
109102
def packssdw128 : X86Builtin<"_Vector<8, short>(_Vector<4, int>, _Vector<4, int>)">;
110103
def packuswb128 : X86Builtin<"_Vector<16, char>(_Vector<8, short>, _Vector<8, short>)">;
104+
105+
def vec_ext_v2di : X86Builtin<"long long int(_Vector<2, long long int>, _Constant int)">;
106+
def vec_ext_v4si : X86Builtin<"int(_Vector<4, int>, _Constant int)">;
107+
def vec_ext_v4sf : X86Builtin<"float(_Vector<4, float>, _Constant int)">;
108+
def vec_ext_v8hi : X86Builtin<"short(_Vector<8, short>, _Constant int)">;
109+
def vec_set_v8hi : X86Builtin<"_Vector<8, short>(_Vector<8, short>, short, _Constant int)">;
111110
}
112111

113112
let Features = "sse3" in {
@@ -217,10 +216,13 @@ let Features = "sse2", Attributes = [NoThrow] in {
217216
def movnti : X86Builtin<"void(int *, int)">;
218217
}
219218

220-
let Features = "sse2", Attributes = [NoThrow, Const, RequiredVectorWidth<128>] in {
221-
def pshufd : X86Builtin<"_Vector<4, int>(_Vector<4, int>, _Constant int)">;
219+
let Features = "sse2", Attributes = [NoThrow, Const, Constexpr, RequiredVectorWidth<128>] in {
222220
def pshuflw : X86Builtin<"_Vector<8, short>(_Vector<8, short>, _Constant int)">;
221+
def pshufd : X86Builtin<"_Vector<4, int>(_Vector<4, int>, _Constant int)">;
223222
def pshufhw : X86Builtin<"_Vector<8, short>(_Vector<8, short>, _Constant int)">;
223+
}
224+
225+
let Features = "sse2", Attributes = [NoThrow, Const, RequiredVectorWidth<128>] in {
224226
def psadbw128 : X86Builtin<"_Vector<2, long long int>(_Vector<16, char>, _Vector<16, char>)">;
225227
def sqrtpd : X86Builtin<"_Vector<2, double>(_Vector<2, double>)">;
226228
def sqrtsd : X86Builtin<"_Vector<2, double>(_Vector<2, double>)">;
@@ -323,9 +325,6 @@ let Features = "sse4.1", Attributes = [NoThrow, Const, RequiredVectorWidth<128>]
323325
def ptestnzc128 : X86Builtin<"int(_Vector<2, long long int>, _Vector<2, long long int>)">;
324326
def mpsadbw128 : X86Builtin<"_Vector<16, char>(_Vector<16, char>, _Vector<16, char>, _Constant char)">;
325327
def phminposuw128 : X86Builtin<"_Vector<8, short>(_Vector<8, short>)">;
326-
def vec_ext_v16qi : X86Builtin<"char(_Vector<16, char>, _Constant int)">;
327-
def vec_set_v16qi : X86Builtin<"_Vector<16, char>(_Vector<16, char>, char, _Constant int)">;
328-
def vec_set_v4si : X86Builtin<"_Vector<4, int>(_Vector<4, int>, int, _Constant int)">;
329328
}
330329

331330
let Features = "sse4.1", Attributes = [NoThrow, Const, Constexpr, RequiredVectorWidth<128>] in {
@@ -338,6 +337,10 @@ let Features = "sse4.1", Attributes = [NoThrow, Const, Constexpr, RequiredVector
338337

339338
def pmuldq128 : X86Builtin<"_Vector<2, long long int>(_Vector<4, int>, _Vector<4, int>)">;
340339
def packusdw128 : X86Builtin<"_Vector<8, short>(_Vector<4, int>, _Vector<4, int>)">;
340+
341+
def vec_ext_v16qi : X86Builtin<"char(_Vector<16, char>, _Constant int)">;
342+
def vec_set_v16qi : X86Builtin<"_Vector<16, char>(_Vector<16, char>, char, _Constant int)">;
343+
def vec_set_v4si : X86Builtin<"_Vector<4, int>(_Vector<4, int>, int, _Constant int)">;
341344
}
342345

343346
let Features = "sse4.2", Attributes = [NoThrow, Const, RequiredVectorWidth<128>] in {
@@ -560,7 +563,7 @@ let Features = "avx", Attributes = [NoThrow, RequiredVectorWidth<128>] in {
560563
def maskstoreps : X86Builtin<"void(_Vector<4, float *>, _Vector<4, int>, _Vector<4, float>)">;
561564
}
562565

563-
let Features = "avx", Attributes = [NoThrow, Const, RequiredVectorWidth<256>] in {
566+
let Features = "avx", Attributes = [NoThrow, Const, Constexpr, RequiredVectorWidth<256>] in {
564567
def vec_ext_v32qi : X86Builtin<"char(_Vector<32, char>, _Constant int)">;
565568
def vec_ext_v16hi : X86Builtin<"short(_Vector<16, short>, _Constant int)">;
566569
def vec_ext_v8si : X86Builtin<"int(_Vector<8, int>, _Constant int)">;
@@ -584,9 +587,6 @@ let Features = "avx2", Attributes = [NoThrow, Const, RequiredVectorWidth<256>] i
584587
def pmulhrsw256 : X86Builtin<"_Vector<16, short>(_Vector<16, short>, _Vector<16, short>)">;
585588
def psadbw256 : X86Builtin<"_Vector<4, long long int>(_Vector<32, char>, _Vector<32, char>)">;
586589
def pshufb256 : X86Builtin<"_Vector<32, char>(_Vector<32, char>, _Vector<32, char>)">;
587-
def pshufd256 : X86Builtin<"_Vector<8, int>(_Vector<8, int>, _Constant int)">;
588-
def pshuflw256 : X86Builtin<"_Vector<16, short>(_Vector<16, short>, _Constant int)">;
589-
def pshufhw256 : X86Builtin<"_Vector<16, short>(_Vector<16, short>, _Constant int)">;
590590
def psignb256 : X86Builtin<"_Vector<32, char>(_Vector<32, char>, _Vector<32, char>)">;
591591
def psignw256 : X86Builtin<"_Vector<16, short>(_Vector<16, short>, _Vector<16, short>)">;
592592
def psignd256 : X86Builtin<"_Vector<8, int>(_Vector<8, int>, _Vector<8, int>)">;
@@ -647,6 +647,10 @@ let Features = "avx2", Attributes = [NoThrow, Const, Constexpr, RequiredVectorWi
647647
def packsswb256 : X86Builtin<"_Vector<32, char>(_Vector<16, short>, _Vector<16, short>)">;
648648
def packssdw256 : X86Builtin<"_Vector<16, short>(_Vector<8, int>, _Vector<8, int>)">;
649649
def packuswb256 : X86Builtin<"_Vector<32, char>(_Vector<16, short>, _Vector<16, short>)">;
650+
651+
def pshuflw256 : X86Builtin<"_Vector<16, short>(_Vector<16, short>, _Constant int)">;
652+
def pshufhw256 : X86Builtin<"_Vector<16, short>(_Vector<16, short>, _Constant int)">;
653+
def pshufd256 : X86Builtin<"_Vector<8, int>(_Vector<8, int>, _Constant int)">;
650654
}
651655

652656
let Features = "avx2", Attributes = [NoThrow, Const, Constexpr, RequiredVectorWidth<128>] in {
@@ -1017,6 +1021,7 @@ let Features = "avx512f", Attributes = [NoThrow, Const, RequiredVectorWidth<512>
10171021
let Features = "avx512f", Attributes = [NoThrow, Const, Constexpr, RequiredVectorWidth<512>] in {
10181022
def pmuldq512 : X86Builtin<"_Vector<8, long long int>(_Vector<16, int>, _Vector<16, int>)">;
10191023
def pmuludq512 : X86Builtin<"_Vector<8, long long int>(_Vector<16, int>, _Vector<16, int>)">;
1024+
def pshufd512 : X86Builtin<"_Vector<16, int>(_Vector<16, int>, _Constant int)">;
10201025
}
10211026

10221027
let Features = "avx512f", Attributes = [NoThrow, RequiredVectorWidth<512>] in {
@@ -1990,13 +1995,13 @@ let Features = "avx512vl", Attributes = [NoThrow, Const, Constexpr, RequiredVect
19901995
}
19911996

19921997
let Features = "avx512bw", Attributes = [NoThrow, Const, RequiredVectorWidth<512>] in {
1993-
def pshufhw512 : X86Builtin<"_Vector<32, short>(_Vector<32, short>, _Constant int)">;
1994-
def pshuflw512 : X86Builtin<"_Vector<32, short>(_Vector<32, short>, _Constant int)">;
19951998
def psllw512 : X86Builtin<"_Vector<32, short>(_Vector<32, short>, _Vector<8, short>)">;
19961999
}
19972000

19982001
let Features = "avx512bw", Attributes = [NoThrow, Const, Constexpr, RequiredVectorWidth<512>] in {
19992002
def psllv32hi : X86Builtin<"_Vector<32, short>(_Vector<32, short>, _Vector<32, short>)">;
2003+
def pshufhw512 : X86Builtin<"_Vector<32, short>(_Vector<32, short>, _Constant int)">;
2004+
def pshuflw512 : X86Builtin<"_Vector<32, short>(_Vector<32, short>, _Constant int)">;
20002005
}
20012006

20022007
let Features = "avx512bw,avx512vl", Attributes = [NoThrow, Const, Constexpr, RequiredVectorWidth<256>] in {
@@ -2026,8 +2031,7 @@ let Features = "avx512bw,avx512vl", Attributes = [NoThrow, Const, Constexpr, Req
20262031
def psrlv8hi : X86Builtin<"_Vector<8, short>(_Vector<8, short>, _Vector<8, short>)">;
20272032
}
20282033

2029-
let Features = "avx512f",
2030-
Attributes = [NoThrow, Const, Constexpr, RequiredVectorWidth<512>] in {
2034+
let Features = "avx512f", Attributes = [NoThrow, Const, Constexpr, RequiredVectorWidth<512>] in {
20312035
def psrlwi512 : X86Builtin<"_Vector<32, short>(_Vector<32, short>, int)">;
20322036
def psrldi512 : X86Builtin<"_Vector<16, int>(_Vector<16, int>, int)">;
20332037
def psrlqi512 : X86Builtin<"_Vector<8, long long int>(_Vector<8, long long int>, int)">;
@@ -3266,7 +3270,6 @@ let Features = "avx512f", Attributes = [NoThrow, Const, RequiredVectorWidth<128>
32663270
}
32673271

32683272
let Features = "avx512f", Attributes = [NoThrow, Const, RequiredVectorWidth<512>] in {
3269-
def pshufd512 : X86Builtin<"_Vector<16, int>(_Vector<16, int>, _Constant int)">;
32703273
def expanddf512_mask : X86Builtin<"_Vector<8, double>(_Vector<8, double>, _Vector<8, double>, unsigned char)">;
32713274
def expanddi512_mask : X86Builtin<"_Vector<8, long long int>(_Vector<8, long long int>, _Vector<8, long long int>, unsigned char)">;
32723275
}

clang/include/clang/Basic/BuiltinsX86_64.td

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,15 @@ let Features = "sse2", Attributes = [NoThrow] in {
5656
def movnti64 : X86Builtin<"void(long long int *, long long int)">;
5757
}
5858

59-
let Features = "sse4.1", Attributes = [NoThrow, Const, RequiredVectorWidth<128>] in {
59+
let Features = "sse4.1", Attributes = [NoThrow, Const, Constexpr, RequiredVectorWidth<128>] in {
6060
def vec_set_v2di : X86Builtin<"_Vector<2, long long int>(_Vector<2, long long int>, long long int, _Constant int)">;
6161
}
6262

6363
let Features = "crc32", Attributes = [NoThrow, Const] in {
6464
def crc32di : X86Builtin<"unsigned long long int(unsigned long long int, unsigned long long int)">;
6565
}
6666

67-
let Features = "avx", Attributes = [NoThrow, Const, RequiredVectorWidth<256>] in {
67+
let Features = "avx", Attributes = [NoThrow, Const, Constexpr, RequiredVectorWidth<256>] in {
6868
def vec_ext_v4di : X86Builtin<"long long int(_Vector<4, long long int>, _Constant int)">;
6969
def vec_set_v4di : X86Builtin<"_Vector<4, long long int>(_Vector<4, long long int>, long long int, _Constant int)">;
7070
}

clang/include/clang/CrossTU/CrossTranslationUnit.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,8 @@ class CrossTranslationUnitContext {
180180
llvm::Expected<const VarDecl *> importDefinition(const VarDecl *VD,
181181
ASTUnit *Unit);
182182

183-
/// Get a name to identify a named decl.
184-
static std::optional<std::string> getLookupName(const NamedDecl *ND);
183+
/// Get a name to identify a decl.
184+
static std::optional<std::string> getLookupName(const Decl *D);
185185

186186
/// Emit diagnostics for the user for potential configuration errors.
187187
void emitCrossTUDiagnostics(const IndexError &IE);

clang/include/clang/StaticAnalyzer/Core/PathSensitive/EntryPointStats.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class EntryPointStat {
2525
public:
2626
llvm::StringLiteral name() const { return Name; }
2727

28-
static void lockRegistry();
28+
static void lockRegistry(llvm::StringRef CPPFileName);
2929

3030
static void takeSnapshot(const Decl *EntryPoint);
3131
static void dumpStatsAsCSV(llvm::raw_ostream &OS);

clang/lib/AST/ByteCode/InterpBuiltin.cpp

Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2773,6 +2773,50 @@ static bool interp__builtin_blend(InterpState &S, CodePtr OpPC,
27732773
return true;
27742774
}
27752775

2776+
static bool interp__builtin_ia32_pshuf(InterpState &S, CodePtr OpPC,
2777+
const CallExpr *Call, bool IsShufHW) {
2778+
assert(Call->getNumArgs() == 2 && "masked forms handled via select*");
2779+
APSInt ControlImm = popToAPSInt(S, Call->getArg(1));
2780+
const Pointer &Src = S.Stk.pop<Pointer>();
2781+
const Pointer &Dst = S.Stk.peek<Pointer>();
2782+
2783+
unsigned NumElems = Dst.getNumElems();
2784+
PrimType ElemT = Dst.getFieldDesc()->getPrimType();
2785+
2786+
unsigned ElemBits = static_cast<unsigned>(primSize(ElemT) * 8);
2787+
if (ElemBits != 16 && ElemBits != 32)
2788+
return false;
2789+
2790+
unsigned LaneElts = 128u / ElemBits;
2791+
assert(LaneElts && (NumElems % LaneElts == 0));
2792+
2793+
uint8_t Ctl = static_cast<uint8_t>(ControlImm.getZExtValue());
2794+
2795+
for (unsigned Idx = 0; Idx != NumElems; Idx++) {
2796+
unsigned LaneBase = (Idx / LaneElts) * LaneElts;
2797+
unsigned LaneIdx = Idx % LaneElts;
2798+
unsigned SrcIdx = Idx;
2799+
unsigned Sel = (Ctl >> (2 * LaneIdx)) & 0x3;
2800+
if (ElemBits == 32) {
2801+
SrcIdx = LaneBase + Sel;
2802+
} else {
2803+
constexpr unsigned HalfSize = 4;
2804+
bool InHigh = LaneIdx >= HalfSize;
2805+
if (!IsShufHW && !InHigh) {
2806+
SrcIdx = LaneBase + Sel;
2807+
} else if (IsShufHW && InHigh) {
2808+
unsigned Rel = LaneIdx - HalfSize;
2809+
Sel = (Ctl >> (2 * Rel)) & 0x3;
2810+
SrcIdx = LaneBase + HalfSize + Sel;
2811+
}
2812+
}
2813+
2814+
INT_TYPE_SWITCH_NO_BOOL(ElemT, { Dst.elem<T>(Idx) = Src.elem<T>(SrcIdx); });
2815+
}
2816+
Dst.initializeAllElements();
2817+
return true;
2818+
}
2819+
27762820
static bool interp__builtin_elementwise_triop(
27772821
InterpState &S, CodePtr OpPC, const CallExpr *Call,
27782822
llvm::function_ref<APInt(const APSInt &, const APSInt &, const APSInt &)>
@@ -2878,6 +2922,61 @@ static bool interp__builtin_x86_insert_subvector(InterpState &S, CodePtr OpPC,
28782922
return true;
28792923
}
28802924

2925+
static bool interp__builtin_vec_ext(InterpState &S, CodePtr OpPC,
2926+
const CallExpr *Call, unsigned ID) {
2927+
assert(Call->getNumArgs() == 2);
2928+
2929+
APSInt ImmAPS = popToAPSInt(S, Call->getArg(1));
2930+
const Pointer &Vec = S.Stk.pop<Pointer>();
2931+
if (!Vec.getFieldDesc()->isPrimitiveArray())
2932+
return false;
2933+
2934+
unsigned NumElems = Vec.getNumElems();
2935+
unsigned Index =
2936+
static_cast<unsigned>(ImmAPS.getZExtValue() & (NumElems - 1));
2937+
2938+
PrimType ElemPT = Vec.getFieldDesc()->getPrimType();
2939+
// FIXME(#161685): Replace float+int split with a numeric-only type switch
2940+
if (ElemPT == PT_Float) {
2941+
S.Stk.push<Floating>(Vec.elem<Floating>(Index));
2942+
return true;
2943+
}
2944+
INT_TYPE_SWITCH_NO_BOOL(ElemPT, {
2945+
APSInt V = Vec.elem<T>(Index).toAPSInt();
2946+
pushInteger(S, V, Call->getType());
2947+
});
2948+
2949+
return true;
2950+
}
2951+
2952+
static bool interp__builtin_vec_set(InterpState &S, CodePtr OpPC,
2953+
const CallExpr *Call, unsigned ID) {
2954+
assert(Call->getNumArgs() == 3);
2955+
2956+
APSInt ImmAPS = popToAPSInt(S, Call->getArg(2));
2957+
APSInt ValAPS = popToAPSInt(S, Call->getArg(1));
2958+
2959+
const Pointer &Base = S.Stk.pop<Pointer>();
2960+
if (!Base.getFieldDesc()->isPrimitiveArray())
2961+
return false;
2962+
2963+
const Pointer &Dst = S.Stk.peek<Pointer>();
2964+
2965+
unsigned NumElems = Base.getNumElems();
2966+
unsigned Index =
2967+
static_cast<unsigned>(ImmAPS.getZExtValue() & (NumElems - 1));
2968+
2969+
PrimType ElemPT = Base.getFieldDesc()->getPrimType();
2970+
INT_TYPE_SWITCH_NO_BOOL(ElemPT, {
2971+
for (unsigned I = 0; I != NumElems; ++I)
2972+
Dst.elem<T>(I) = Base.elem<T>(I);
2973+
Dst.elem<T>(Index) = static_cast<T>(ValAPS);
2974+
});
2975+
2976+
Dst.initializeAllElements();
2977+
return true;
2978+
}
2979+
28812980
bool InterpretBuiltin(InterpState &S, CodePtr OpPC, const CallExpr *Call,
28822981
uint32_t BuiltinID) {
28832982
if (!S.getASTContext().BuiltinInfo.isConstantEvaluated(BuiltinID))
@@ -3606,6 +3705,21 @@ bool InterpretBuiltin(InterpState &S, CodePtr OpPC, const CallExpr *Call,
36063705
case X86::BI__builtin_ia32_selectpd_512:
36073706
return interp__builtin_select(S, OpPC, Call);
36083707

3708+
case X86::BI__builtin_ia32_pshuflw:
3709+
case X86::BI__builtin_ia32_pshuflw256:
3710+
case X86::BI__builtin_ia32_pshuflw512:
3711+
return interp__builtin_ia32_pshuf(S, OpPC, Call, false);
3712+
3713+
case X86::BI__builtin_ia32_pshufhw:
3714+
case X86::BI__builtin_ia32_pshufhw256:
3715+
case X86::BI__builtin_ia32_pshufhw512:
3716+
return interp__builtin_ia32_pshuf(S, OpPC, Call, true);
3717+
3718+
case X86::BI__builtin_ia32_pshufd:
3719+
case X86::BI__builtin_ia32_pshufd256:
3720+
case X86::BI__builtin_ia32_pshufd512:
3721+
return interp__builtin_ia32_pshuf(S, OpPC, Call, false);
3722+
36093723
case X86::BI__builtin_ia32_kandqi:
36103724
case X86::BI__builtin_ia32_kandhi:
36113725
case X86::BI__builtin_ia32_kandsi:
@@ -3686,6 +3800,29 @@ bool InterpretBuiltin(InterpState &S, CodePtr OpPC, const CallExpr *Call,
36863800
case X86::BI__builtin_ia32_insert128i256:
36873801
return interp__builtin_x86_insert_subvector(S, OpPC, Call, BuiltinID);
36883802

3803+
case X86::BI__builtin_ia32_vec_ext_v4hi:
3804+
case X86::BI__builtin_ia32_vec_ext_v16qi:
3805+
case X86::BI__builtin_ia32_vec_ext_v8hi:
3806+
case X86::BI__builtin_ia32_vec_ext_v4si:
3807+
case X86::BI__builtin_ia32_vec_ext_v2di:
3808+
case X86::BI__builtin_ia32_vec_ext_v32qi:
3809+
case X86::BI__builtin_ia32_vec_ext_v16hi:
3810+
case X86::BI__builtin_ia32_vec_ext_v8si:
3811+
case X86::BI__builtin_ia32_vec_ext_v4di:
3812+
case X86::BI__builtin_ia32_vec_ext_v4sf:
3813+
return interp__builtin_vec_ext(S, OpPC, Call, BuiltinID);
3814+
3815+
case X86::BI__builtin_ia32_vec_set_v4hi:
3816+
case X86::BI__builtin_ia32_vec_set_v16qi:
3817+
case X86::BI__builtin_ia32_vec_set_v8hi:
3818+
case X86::BI__builtin_ia32_vec_set_v4si:
3819+
case X86::BI__builtin_ia32_vec_set_v2di:
3820+
case X86::BI__builtin_ia32_vec_set_v32qi:
3821+
case X86::BI__builtin_ia32_vec_set_v16hi:
3822+
case X86::BI__builtin_ia32_vec_set_v8si:
3823+
case X86::BI__builtin_ia32_vec_set_v4di:
3824+
return interp__builtin_vec_set(S, OpPC, Call, BuiltinID);
3825+
36893826
default:
36903827
S.FFDiag(S.Current->getLocation(OpPC),
36913828
diag::note_invalid_subexpr_in_const_expr)

0 commit comments

Comments
 (0)