Skip to content

Commit b499bf0

Browse files
committed
Merge from 'main' to 'sycl-web' (26 commits)
CONFLICT (content): Merge conflict in libclc/clc/include/clc/clcfunc.h
2 parents bcf8e23 + 7f36611 commit b499bf0

File tree

107 files changed

+1252
-820
lines changed

Some content is hidden

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

107 files changed

+1252
-820
lines changed

clang/include/clang/Basic/DiagnosticFrontendKinds.td

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,8 @@ def err_fe_unable_to_load_plugin : Error<
115115
"unable to load plugin '%0': '%1'">;
116116
def err_fe_unable_to_create_target : Error<
117117
"unable to create target: '%0'">;
118+
def err_fe_unable_to_create_subtarget : Error<
119+
"unable to create subtarget: '%0'%select{ with features '%2'|}1">;
118120
def err_fe_unable_to_interface_with_target : Error<
119121
"unable to interface with target machine">;
120122
def err_fe_unable_to_open_output : Error<
@@ -132,6 +134,8 @@ def err_fe_no_pch_in_dir : Error<
132134
"no suitable precompiled header file found in directory '%0'">;
133135
def err_fe_action_not_available : Error<
134136
"action %0 not compiled in">;
137+
def err_fe_cir_not_built : Error<"clang IR support not available, rebuild "
138+
"clang with -DCLANG_ENABLE_CIR=ON">;
135139
def err_fe_invalid_multiple_actions : Error<
136140
"'%0' action ignored; '%1' action specified previously">;
137141
def err_fe_invalid_alignment : Error<

clang/include/clang/Basic/OffloadArch.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ enum class OffloadArch {
104104
GFX1200,
105105
GFX1201,
106106
GFX1250,
107+
GFX1251,
107108
AMDGCNSPIRV,
108109
Generic, // A processor model named 'generic' if the target backend defines a
109110
// public one.

clang/lib/Basic/OffloadArch.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ static const OffloadArchToStringMap ArchNames[] = {
9191
GFX(1200), // gfx1200
9292
GFX(1201), // gfx1201
9393
GFX(1250), // gfx1250
94+
GFX(1251), // gfx1251
9495
{OffloadArch::AMDGCNSPIRV, "amdgcnspirv", "compute_amdgcn"},
9596
// Intel CPUs
9697
{OffloadArch::SKYLAKEAVX512, "skylake-avx512", ""},

clang/lib/Basic/Targets/NVPTX.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,7 @@ void NVPTXTargetInfo::getTargetDefines(const LangOptions &Opts,
246246
case OffloadArch::GFX1200:
247247
case OffloadArch::GFX1201:
248248
case OffloadArch::GFX1250:
249+
case OffloadArch::GFX1251:
249250
case OffloadArch::AMDGCNSPIRV:
250251
case OffloadArch::Generic:
251252
case OffloadArch::GRANITERAPIDS:

clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2336,6 +2336,7 @@ void CGOpenMPRuntimeGPU::processRequiresDirective(const OMPRequiresDecl *D) {
23362336
case OffloadArch::GFX1200:
23372337
case OffloadArch::GFX1201:
23382338
case OffloadArch::GFX1250:
2339+
case OffloadArch::GFX1251:
23392340
case OffloadArch::AMDGCNSPIRV:
23402341
case OffloadArch::Generic:
23412342
case OffloadArch::GRANITERAPIDS:

clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,8 @@ CreateFrontendBaseAction(CompilerInstance &CI) {
8181
#if CLANG_ENABLE_CIR
8282
return std::make_unique<cir::EmitCIRAction>();
8383
#else
84-
llvm_unreachable("CIR suppport not built into clang");
84+
CI.getDiagnostics().Report(diag::err_fe_cir_not_built);
85+
return nullptr;
8586
#endif
8687
case EmitHTML: return std::make_unique<HTMLPrintAction>();
8788
case EmitLLVM: {

clang/test/CodeGenOpenCL/amdgpu-features.cl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
// RUN: %clang_cc1 -triple amdgcn -target-cpu gfx1200 -emit-llvm -o - %s | FileCheck --check-prefix=GFX1200 %s
5454
// RUN: %clang_cc1 -triple amdgcn -target-cpu gfx1201 -emit-llvm -o - %s | FileCheck --check-prefix=GFX1201 %s
5555
// RUN: %clang_cc1 -triple amdgcn -target-cpu gfx1250 -emit-llvm -o - %s | FileCheck --check-prefix=GFX1250 %s
56+
// RUN: %clang_cc1 -triple amdgcn -target-cpu gfx1251 -emit-llvm -o - %s | FileCheck --check-prefix=GFX1251 %s
5657

5758
// RUN: %clang_cc1 -triple amdgcn -target-cpu gfx1103 -target-feature +wavefrontsize64 -emit-llvm -o - %s | FileCheck --check-prefix=GFX1103-W64 %s
5859

@@ -109,6 +110,7 @@
109110
// GFX1200: "target-features"="+16-bit-insts,+atomic-buffer-global-pk-add-f16-insts,+atomic-buffer-pk-add-bf16-inst,+atomic-ds-pk-add-16-insts,+atomic-fadd-rtn-insts,+atomic-flat-pk-add-16-insts,+atomic-fmin-fmax-global-f32,+atomic-global-pk-add-bf16-inst,+ci-insts,+dl-insts,+dot10-insts,+dot11-insts,+dot12-insts,+dot7-insts,+dot8-insts,+dot9-insts,+dpp,+fp8-conversion-insts,+gfx10-3-insts,+gfx10-insts,+gfx11-insts,+gfx12-insts,+gfx8-insts,+gfx9-insts,+wavefrontsize32"
110111
// GFX1201: "target-features"="+16-bit-insts,+atomic-buffer-global-pk-add-f16-insts,+atomic-buffer-pk-add-bf16-inst,+atomic-ds-pk-add-16-insts,+atomic-fadd-rtn-insts,+atomic-flat-pk-add-16-insts,+atomic-fmin-fmax-global-f32,+atomic-global-pk-add-bf16-inst,+ci-insts,+dl-insts,+dot10-insts,+dot11-insts,+dot12-insts,+dot7-insts,+dot8-insts,+dot9-insts,+dpp,+fp8-conversion-insts,+gfx10-3-insts,+gfx10-insts,+gfx11-insts,+gfx12-insts,+gfx8-insts,+gfx9-insts,+wavefrontsize32"
111112
// GFX1250: "target-features"="+16-bit-insts,+ashr-pk-insts,+atomic-buffer-global-pk-add-f16-insts,+atomic-buffer-pk-add-bf16-inst,+atomic-ds-pk-add-16-insts,+atomic-fadd-rtn-insts,+atomic-flat-pk-add-16-insts,+atomic-fmin-fmax-global-f32,+atomic-fmin-fmax-global-f64,+atomic-global-pk-add-bf16-inst,+bf16-cvt-insts,+bf16-pk-insts,+bf16-trans-insts,+bitop3-insts,+ci-insts,+dl-insts,+dot7-insts,+dot8-insts,+dpp,+fp8-conversion-insts,+fp8e5m3-insts,+gfx10-3-insts,+gfx10-insts,+gfx11-insts,+gfx12-insts,+gfx1250-insts,+gfx8-insts,+gfx9-insts,+permlane16-swap,+prng-inst,+setprio-inc-wg-inst,+tanh-insts,+tensor-cvt-lut-insts,+transpose-load-f4f6-insts,+vmem-pref-insts,+wavefrontsize32"
113+
// GFX1251: "target-features"="+16-bit-insts,+ashr-pk-insts,+atomic-buffer-global-pk-add-f16-insts,+atomic-buffer-pk-add-bf16-inst,+atomic-ds-pk-add-16-insts,+atomic-fadd-rtn-insts,+atomic-flat-pk-add-16-insts,+atomic-fmin-fmax-global-f32,+atomic-fmin-fmax-global-f64,+atomic-global-pk-add-bf16-inst,+bf16-cvt-insts,+bf16-pk-insts,+bf16-trans-insts,+bitop3-insts,+ci-insts,+dl-insts,+dot7-insts,+dot8-insts,+dpp,+fp8-conversion-insts,+fp8e5m3-insts,+gfx10-3-insts,+gfx10-insts,+gfx11-insts,+gfx12-insts,+gfx1250-insts,+gfx8-insts,+gfx9-insts,+permlane16-swap,+prng-inst,+setprio-inc-wg-inst,+tanh-insts,+tensor-cvt-lut-insts,+transpose-load-f4f6-insts,+vmem-pref-insts,+wavefrontsize32"
112114

113115
// GFX1103-W64: "target-features"="+16-bit-insts,+atomic-fadd-rtn-insts,+atomic-fmin-fmax-global-f32,+ci-insts,+dl-insts,+dot10-insts,+dot12-insts,+dot5-insts,+dot7-insts,+dot8-insts,+dot9-insts,+dpp,+gfx10-3-insts,+gfx10-insts,+gfx11-insts,+gfx8-insts,+gfx9-insts,+wavefrontsize64"
114116

clang/test/CodeGenOpenCL/builtins-amdgcn-gfx1250-cooperative-atomics.cl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
// REQUIRES: amdgpu-registered-target
44
// RUN: %clang_cc1 -cl-std=CL2.0 -triple amdgcn-unknown-unknown -target-cpu gfx1250 -emit-llvm -o - %s | FileCheck %s
5+
// RUN: %clang_cc1 -cl-std=CL2.0 -triple amdgcn-unknown-unknown -target-cpu gfx1251 -emit-llvm -o - %s | FileCheck %s
56

67
typedef int v2i __attribute__((ext_vector_type(2)));
78
typedef int v4i __attribute__((ext_vector_type(4)));

clang/test/Driver/amdgpu-macros.cl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@
131131
// RUN: %clang -E -dM -target amdgcn -mcpu=gfx1200 %s 2>&1 | FileCheck --check-prefixes=ARCH-GCN,FAST_FMAF %s -DWAVEFRONT_SIZE=32 -DCPU=gfx1200 -DFAMILY=GFX12
132132
// RUN: %clang -E -dM -target amdgcn -mcpu=gfx1201 %s 2>&1 | FileCheck --check-prefixes=ARCH-GCN,FAST_FMAF %s -DWAVEFRONT_SIZE=32 -DCPU=gfx1201 -DFAMILY=GFX12
133133
// RUN: %clang -E -dM -target amdgcn -mcpu=gfx1250 %s 2>&1 | FileCheck --check-prefixes=ARCH-GCN,FAST_FMAF %s -DWAVEFRONT_SIZE=32 -DCPU=gfx1250 -DFAMILY=GFX12
134+
// RUN: %clang -E -dM -target amdgcn -mcpu=gfx1251 %s 2>&1 | FileCheck --check-prefixes=ARCH-GCN,FAST_FMAF %s -DWAVEFRONT_SIZE=32 -DCPU=gfx1251 -DFAMILY=GFX12
134135

135136
// RUN: %clang -E -dM -target amdgcn -mcpu=gfx9-generic %s 2>&1 | FileCheck --check-prefixes=ARCH-GCN,FAST_FMAF %s -DWAVEFRONT_SIZE=64 -DCPU=gfx9_generic -DFAMILY=GFX9
136137
// RUN: %clang -E -dM -target amdgcn -mcpu=gfx9-4-generic %s 2>&1 | FileCheck --check-prefixes=ARCH-GCN,FAST_FMAF %s -DWAVEFRONT_SIZE=64 -DCPU=gfx9_4_generic -DFAMILY=GFX9
@@ -191,6 +192,12 @@
191192
// RUN: %s 2>&1 | FileCheck --check-prefix=CUMODE-ON %s
192193
// RUN: %clang -E -dM -target amdgcn -mcpu=gfx1250 -mno-cumode \
193194
// RUN: %s 2>&1 | FileCheck -DMCPU=gfx1250 --check-prefixes=CUMODE-ON,WARN-CUMODE %s
195+
// RUN: %clang -E -dM -target amdgcn -mcpu=gfx1251 \
196+
// RUN: %s 2>&1 | FileCheck --check-prefix=CUMODE-ON %s
197+
// RUN: %clang -E -dM -target amdgcn -mcpu=gfx1251 -mcumode \
198+
// RUN: %s 2>&1 | FileCheck --check-prefix=CUMODE-ON %s
199+
// RUN: %clang -E -dM -target amdgcn -mcpu=gfx1251 -mno-cumode \
200+
// RUN: %s 2>&1 | FileCheck -DMCPU=gfx1251 --check-prefixes=CUMODE-ON,WARN-CUMODE %s
194201
// WARN-CUMODE-DAG: warning: ignoring '-mno-cumode' option as it is not currently supported for processor '[[MCPU]]' [-Woption-ignored]
195202
// CUMODE-ON-DAG: #define __AMDGCN_CUMODE__ 1
196203
// CUMODE-OFF-DAG: #define __AMDGCN_CUMODE__ 0

clang/test/Driver/amdgpu-mcpu.cl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@
116116
// RUN: %clang -### -target amdgcn -mcpu=gfx1200 %s 2>&1 | FileCheck --check-prefix=GFX1200 %s
117117
// RUN: %clang -### -target amdgcn -mcpu=gfx1201 %s 2>&1 | FileCheck --check-prefix=GFX1201 %s
118118
// RUN: %clang -### -target amdgcn -mcpu=gfx1250 %s 2>&1 | FileCheck --check-prefix=GFX1250 %s
119+
// RUN: %clang -### -target amdgcn -mcpu=gfx1251 %s 2>&1 | FileCheck --check-prefix=GFX1251 %s
119120

120121
// RUN: %clang -### -target amdgcn -mcpu=gfx9-generic %s 2>&1 | FileCheck --check-prefix=GFX9_GENERIC %s
121122
// RUN: %clang -### -target amdgcn -mcpu=gfx9-4-generic %s 2>&1 | FileCheck --check-prefix=GFX9_4_GENERIC %s
@@ -171,6 +172,7 @@
171172
// GFX1200: "-target-cpu" "gfx1200"
172173
// GFX1201: "-target-cpu" "gfx1201"
173174
// GFX1250: "-target-cpu" "gfx1250"
175+
// GFX1251: "-target-cpu" "gfx1251"
174176

175177
// GFX9_GENERIC: "-target-cpu" "gfx9-generic"
176178
// GFX9_4_GENERIC: "-target-cpu" "gfx9-4-generic"

0 commit comments

Comments
 (0)