Skip to content

Commit 2042a43

Browse files
committed
Merge remote-tracking branch 'origin/main' into vplan-branch-on-multi-cond-in-middle
2 parents 552bd91 + e2519b6 commit 2042a43

File tree

121 files changed

+6008
-1887
lines changed

Some content is hidden

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

121 files changed

+6008
-1887
lines changed

.github/workflows/libcxx-build-and-test.yaml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -33,18 +33,6 @@ concurrency:
3333
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
3434
cancel-in-progress: true
3535

36-
37-
env:
38-
# LLVM POST-BRANCH bump version
39-
# LLVM POST-BRANCH add compiler test for ToT - 1, e.g. "Clang 17"
40-
# LLVM RELEASE bump remove compiler ToT - 3, e.g. "Clang 15"
41-
LLVM_HEAD_VERSION: "19" # Used compiler, update POST-BRANCH.
42-
LLVM_PREVIOUS_VERSION: "18"
43-
LLVM_OLDEST_VERSION: "17"
44-
GCC_STABLE_VERSION: "13"
45-
LLVM_SYMBOLIZER_PATH: "/usr/bin/llvm-symbolizer-19"
46-
CLANG_CRASH_DIAGNOSTICS_DIR: "crash_diagnostics"
47-
4836
jobs:
4937
stage1:
5038
if: github.repository_owner == 'llvm'

clang/include/clang/Basic/Builtins.td

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4882,7 +4882,6 @@ def HLSLSaturate : LangBuiltin<"HLSL_LANG"> {
48824882
let Prototype = "void(...)";
48834883
}
48844884

4885-
48864885
def HLSLSelect : LangBuiltin<"HLSL_LANG"> {
48874886
let Spellings = ["__builtin_hlsl_select"];
48884887
let Attributes = [NoThrow, Const];
@@ -4907,6 +4906,12 @@ def HLSLRadians : LangBuiltin<"HLSL_LANG"> {
49074906
let Prototype = "void(...)";
49084907
}
49094908

4909+
def HLSLBufferUpdateCounter : LangBuiltin<"HLSL_LANG"> {
4910+
let Spellings = ["__builtin_hlsl_buffer_update_counter"];
4911+
let Attributes = [NoThrow];
4912+
let Prototype = "uint32_t(...)";
4913+
}
4914+
49104915
def HLSLSplitDouble: LangBuiltin<"HLSL_LANG"> {
49114916
let Spellings = ["__builtin_hlsl_elementwise_splitdouble"];
49124917
let Attributes = [NoThrow, Const];

clang/include/clang/Basic/DiagnosticSemaKinds.td

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7287,6 +7287,8 @@ def err_typecheck_illegal_increment_decrement : Error<
72877287
"cannot %select{decrement|increment}1 value of type %0">;
72887288
def err_typecheck_expect_int : Error<
72897289
"used type %0 where integer is required">;
7290+
def err_typecheck_expect_hlsl_resource : Error<
7291+
"used type %0 where __hlsl_resource_t is required">;
72907292
def err_typecheck_arithmetic_incomplete_or_sizeless_type : Error<
72917293
"arithmetic on a pointer to %select{an incomplete|sizeless}0 type %1">;
72927294
def err_typecheck_pointer_arith_function_type : Error<
@@ -12528,6 +12530,10 @@ def warn_attr_min_eq_max: Warning<
1252812530

1252912531
def err_hlsl_attribute_number_arguments_insufficient_shader_model: Error<
1253012532
"attribute %0 with %1 arguments requires shader model %2 or greater">;
12533+
def err_hlsl_expect_arg_const_int_one_or_neg_one: Error<
12534+
"argument %0 must be constant integer 1 or -1">;
12535+
def err_invalid_hlsl_resource_type: Error<
12536+
"invalid __hlsl_resource_t type attributes">;
1253112537

1253212538
// Layout randomization diagnostics.
1253312539
def err_non_designated_init_used : Error<

clang/lib/CodeGen/CGBuiltin.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19409,6 +19409,15 @@ case Builtin::BI__builtin_hlsl_elementwise_isinf: {
1940919409
CGM.getHLSLRuntime().getRadiansIntrinsic(), ArrayRef<Value *>{Op0},
1941019410
nullptr, "hlsl.radians");
1941119411
}
19412+
case Builtin::BI__builtin_hlsl_buffer_update_counter: {
19413+
Value *ResHandle = EmitScalarExpr(E->getArg(0));
19414+
Value *Offset = EmitScalarExpr(E->getArg(1));
19415+
Value *OffsetI8 = Builder.CreateIntCast(Offset, Int8Ty, true);
19416+
return Builder.CreateIntrinsic(
19417+
/*ReturnType=*/Offset->getType(),
19418+
CGM.getHLSLRuntime().getBufferUpdateCounterIntrinsic(),
19419+
ArrayRef<Value *>{ResHandle, OffsetI8}, nullptr);
19420+
}
1941219421
case Builtin::BI__builtin_hlsl_elementwise_splitdouble: {
1941319422

1941419423
assert((E->getArg(0)->getType()->hasFloatingRepresentation() &&

clang/lib/CodeGen/CGHLSLRuntime.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ class CGHLSLRuntime {
102102
GENERATE_HLSL_INTRINSIC_FUNCTION(UClamp, uclamp)
103103

104104
GENERATE_HLSL_INTRINSIC_FUNCTION(CreateHandleFromBinding, handle_fromBinding)
105+
GENERATE_HLSL_INTRINSIC_FUNCTION(BufferUpdateCounter, bufferUpdateCounter)
105106

106107
//===----------------------------------------------------------------------===//
107108
// End of reserved area for HLSL intrinsic getters.

0 commit comments

Comments
 (0)