Skip to content

Commit 28ab529

Browse files
authored
Merge pull request #176 from sx-aurora-dev/feature/merge-upstream-misc
Feature/merge upstream misc
2 parents f2d4ab1 + af04600 commit 28ab529

File tree

20 files changed

+1108
-1108
lines changed

20 files changed

+1108
-1108
lines changed

clang/include/clang/Basic/BuiltinsVE.def

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,11 @@
1111
//
1212
//===----------------------------------------------------------------------===//
1313

14-
// The format of this database matches clang/Basic/Builtins.def.
14+
#if defined(BUILTIN) && !defined(TARGET_BUILTIN)
15+
# define TARGET_BUILTIN(ID, TYPE, ATTRS, FEATURE) BUILTIN(ID, TYPE, ATTRS)
16+
#endif
17+
18+
// The format of this database is decribed in clang/Basic/Builtins.def.
1519

1620
BUILTIN(__builtin_ve_vl_pack_f32p, "ULifC*fC*", "n")
1721
BUILTIN(__builtin_ve_vl_pack_f32a, "ULifC*", "n")
@@ -21,6 +25,8 @@ BUILTIN(__builtin_ve_vl_extract_vm512l, "V256bV512b", "n")
2125
BUILTIN(__builtin_ve_vl_insert_vm512u, "V512bV512bV256b", "n")
2226
BUILTIN(__builtin_ve_vl_insert_vm512l, "V512bV512bV256b", "n")
2327

28+
// Use generated BUILTIN definitions
2429
#include "clang/Basic/BuiltinsVEVL.gen.def"
2530

2631
#undef BUILTIN
32+
#undef TARGET_BUILTIN

clang/include/clang/module.modulemap

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ module Clang_Basic {
5656
textual header "Basic/BuiltinsX86.def"
5757
textual header "Basic/BuiltinsX86_64.def"
5858
textual header "Basic/BuiltinsXCore.def"
59-
textual header "Basic/BuiltinsVE.def"
6059
textual header "Basic/CodeGenOptions.def"
6160
textual header "Basic/DiagnosticOptions.def"
6261
textual header "Basic/Features.def"

clang/lib/Basic/Targets/VE.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ using namespace clang::targets;
2121
const Builtin::Info VETargetInfo::BuiltinInfo[] = {
2222
#define BUILTIN(ID, TYPE, ATTRS) \
2323
{#ID, TYPE, ATTRS, nullptr, ALL_LANGUAGES, nullptr},
24-
#define LIBBUILTIN(ID, TYPE, ATTRS, HEADER) \
25-
{#ID, TYPE, ATTRS, HEADER, ALL_LANGUAGES, nullptr},
2624
#include "clang/Basic/BuiltinsVE.def"
2725
};
2826

clang/lib/Basic/Targets/VE.h

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -76,25 +76,25 @@ class LLVM_LIBRARY_VISIBILITY VETargetInfo : public TargetInfo {
7676

7777
ArrayRef<const char *> getGCCRegNames() const override {
7878
static const char *const GCCRegNames[] = {
79-
// Regular registers
79+
// Regular registers
8080
"sx0", "sx1", "sx2", "sx3", "sx4", "sx5", "sx6", "sx7",
81-
"sx8", "sx9", "sx10", "sx11", "sx12", "sx13", "sx14", "sx15",
82-
"sx16", "sx17", "sx18", "sx19", "sx20", "sx21", "sx22", "sx23",
83-
"sx24", "sx25", "sx26", "sx27", "sx28", "sx29", "sx30", "sx31",
84-
"sx32", "sx33", "sx34", "sx35", "sx36", "sx37", "sx38", "sx39",
85-
"sx40", "sx41", "sx42", "sx43", "sx44", "sx45", "sx46", "sx47",
86-
"sx48", "sx49", "sx50", "sx51", "sx52", "sx53", "sx54", "sx55",
87-
"sx56", "sx57", "sx58", "sx59", "sx60", "sx61", "sx62", "sx63",
88-
// Vector registers
81+
"sx8", "sx9", "sx10", "sx11", "sx12", "sx13", "sx14", "sx15",
82+
"sx16", "sx17", "sx18", "sx19", "sx20", "sx21", "sx22", "sx23",
83+
"sx24", "sx25", "sx26", "sx27", "sx28", "sx29", "sx30", "sx31",
84+
"sx32", "sx33", "sx34", "sx35", "sx36", "sx37", "sx38", "sx39",
85+
"sx40", "sx41", "sx42", "sx43", "sx44", "sx45", "sx46", "sx47",
86+
"sx48", "sx49", "sx50", "sx51", "sx52", "sx53", "sx54", "sx55",
87+
"sx56", "sx57", "sx58", "sx59", "sx60", "sx61", "sx62", "sx63",
88+
// Vector registers
8989
"v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7",
9090
"v8", "v9", "v10", "v11", "v12", "v13", "v14", "v15",
91-
"v16", "v17", "v18", "v19", "v20", "v21", "v22", "v23",
92-
"v24", "v25", "v26", "v27", "v28", "v29", "v30", "v31",
93-
"v32", "v33", "v34", "v35", "v36", "v37", "v38", "v39",
94-
"v40", "v41", "v42", "v43", "v44", "v45", "v46", "v47",
95-
"v48", "v49", "v50", "v51", "v52", "v53", "v54", "v55",
96-
"v56", "v57", "v58", "v59", "v60", "v61", "v62", "v63",
97-
// Special registers
91+
"v16", "v17", "v18", "v19", "v20", "v21", "v22", "v23",
92+
"v24", "v25", "v26", "v27", "v28", "v29", "v30", "v31",
93+
"v32", "v33", "v34", "v35", "v36", "v37", "v38", "v39",
94+
"v40", "v41", "v42", "v43", "v44", "v45", "v46", "v47",
95+
"v48", "v49", "v50", "v51", "v52", "v53", "v54", "v55",
96+
"v56", "v57", "v58", "v59", "v60", "v61", "v62", "v63",
97+
// Special registers
9898
"vl", "vixr", "ucc", "psw", "sar", "pmmr",
9999
"pmcr0", "pmcr1", "pmcr2", "pmcr3",
100100
"pmc0", "pmc1", "pmc2", "pmc3", "pmc4", "pmc5", "pmc6", "pmc7",

clang/lib/Driver/ToolChains/Clang.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1465,8 +1465,6 @@ void Clang::AddPreprocessingOptions(Compilation &C, const JobAction &JA,
14651465
#endif
14661466
}
14671467

1468-
1469-
14701468
// Add system include arguments for all targets but IAMCU.
14711469
if (!IsIAMCU)
14721470
forAllAssociatedToolChains(C, JA, getToolChain(),

clang/lib/Sema/SemaExpr.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12591,8 +12591,6 @@ QualType Sema::GetSignedVectorType(QualType V) {
1259112591
return Context.getExtVectorType(Context.LongLongTy, VTy->getNumElements());
1259212592
}
1259312593

12594-
if (VTy->isExtVectorBoolType())
12595-
return Context.getExtVectorType(Context.BoolTy, VTy->getNumElements());
1259612594
if (TypeSize == Context.getTypeSize(Context.Int128Ty))
1259712595
return Context.getVectorType(Context.Int128Ty, VTy->getNumElements(),
1259812596
VectorType::GenericVector);

clang/lib/Sema/SemaExprCXX.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6111,6 +6111,7 @@ QualType Sema::CheckVectorConditionalTypes(ExprResult &Cond, ExprResult &LHS,
61116111

61126112
QualType ResultType;
61136113

6114+
61146115
if (LHSVT && RHSVT) {
61156116
if (isa<ExtVectorType>(CondVT) != isa<ExtVectorType>(LHSVT)) {
61166117
Diag(QuestionLoc, diag::err_conditional_vector_cond_result_mismatch)

llvm/include/llvm/IR/Intrinsics.td

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1409,7 +1409,6 @@ def int_vp_scatter: DefaultAttrsIntrinsic<[],
14091409
LLVMScalarOrSameVectorWidth<0, llvm_i1_ty>,
14101410
llvm_i32_ty],
14111411
[ IntrArgMemOnly, IntrNoSync, IntrWillReturn ]>; // TODO allow IntrNoCapture for vectors of pointers
1412-
// TODO allow IntrNoCapture for vectors of pointers
14131412

14141413
// Experimental strided memory accesses
14151414
def int_experimental_vp_strided_store : DefaultAttrsIntrinsic<[],
@@ -2140,6 +2139,6 @@ include "llvm/IR/IntrinsicsMips.td"
21402139
include "llvm/IR/IntrinsicsAMDGPU.td"
21412140
include "llvm/IR/IntrinsicsBPF.td"
21422141
include "llvm/IR/IntrinsicsSystemZ.td"
2143-
include "llvm/IR/IntrinsicsVE.td"
21442142
include "llvm/IR/IntrinsicsWebAssembly.td"
21452143
include "llvm/IR/IntrinsicsRISCV.td"
2144+
include "llvm/IR/IntrinsicsVE.td"

llvm/include/llvm/InitializePasses.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ void initializeEntryExitInstrumenterPass(PassRegistry&);
157157
void initializeExpandMemCmpPassPass(PassRegistry&);
158158
void initializeExpandPostRAPass(PassRegistry&);
159159
void initializeExpandReductionsPass(PassRegistry&);
160-
void initializeExpandVectorPredicationPass(PassRegistry&);
160+
void initializeExpandVectorPredicationPass(PassRegistry &);
161161
void initializeMakeGuardsExplicitLegacyPassPass(PassRegistry&);
162162
void initializeExternalAAWrapperPassPass(PassRegistry&);
163163
void initializeFEntryInserterPass(PassRegistry&);

llvm/lib/Target/VE/VE.h

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,6 @@ void LowerVEMachineInstrToMCInst(const MachineInstr *MI, MCInst &OutMI,
3535
} // namespace llvm
3636

3737
namespace llvm {
38-
39-
/// Target Constants {
40-
const unsigned StandardVectorWidth = 256;
41-
const unsigned PackedVectorWidth = 512;
42-
/// } Target Constants
43-
4438
// Enums corresponding to VE condition codes, both icc's and fcc's. These
4539
// values must be kept in sync with the ones in the .td file.
4640
namespace VECC {
@@ -418,5 +412,8 @@ inline static uint64_t mimm2Val(uint64_t Val) {
418412
inline unsigned M0(unsigned Val) { return Val + 64; }
419413
inline unsigned M1(unsigned Val) { return Val; }
420414

415+
static const unsigned StandardVectorWidth = 256;
416+
static const unsigned PackedVectorWidth = 512;
417+
421418
} // namespace llvm
422419
#endif

0 commit comments

Comments
 (0)