Skip to content

Commit 45a347a

Browse files
author
z1.cciauto
committed
merge main into amd-staging
2 parents b90f641 + e43d64e commit 45a347a

File tree

56 files changed

+792
-413
lines changed

Some content is hidden

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

56 files changed

+792
-413
lines changed

.github/workflows/pr-code-format.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,6 @@ jobs:
7373
START_REV: ${{ github.event.pull_request.base.sha }}
7474
END_REV: ${{ github.event.pull_request.head.sha }}
7575
CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
76-
# TODO(boomanaiden154): Once clang v18 is released, we should be able
77-
# to take advantage of the new --diff_from_common_commit option
78-
# explicitly in code-format-helper.py and not have to diff starting at
79-
# the merge base.
8076
# Create an empty comments file so the pr-write job doesn't fail.
8177
run: |
8278
echo "[]" > comments &&

.github/workflows/premerge.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ jobs:
6565
export CXX=/opt/llvm/bin/clang++
6666
6767
./.ci/monolithic-linux.sh "${projects_to_build}" "${project_check_targets}" "${runtimes_to_build}" "${runtimes_check_targets}"
68-
- name: "Upload artifact"
6968
- name: Upload Artifacts
7069
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
7170
with:

clang/docs/ReleaseNotes.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -666,6 +666,8 @@ RISC-V Support
666666
Qualcomm's `Xqciint` extension to save and restore some GPRs in interrupt
667667
service routines.
668668

669+
- `Zicsr` / `Zifencei` are allowed to be duplicated in the presence of `g` in `-march`.
670+
669671
CUDA/HIP Language Changes
670672
^^^^^^^^^^^^^^^^^^^^^^^^^
671673

clang/lib/AST/ByteCode/InterpBuiltin.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1641,6 +1641,13 @@ static bool interp__builtin_operator_delete(InterpState &S, CodePtr OpPC,
16411641

16421642
Source = Ptr.getDeclDesc()->asExpr();
16431643
BlockToDelete = Ptr.block();
1644+
1645+
if (!BlockToDelete->isDynamic()) {
1646+
S.FFDiag(Call, diag::note_constexpr_delete_not_heap_alloc)
1647+
<< Ptr.toDiagnosticString(S.getASTContext());
1648+
if (const auto *D = Ptr.getFieldDesc()->asDecl())
1649+
S.Note(D->getLocation(), diag::note_declared_at);
1650+
}
16441651
}
16451652
assert(BlockToDelete);
16461653

clang/lib/Headers/avx512fp16intrin.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,8 @@ static __inline__ __m512h __DEFAULT_FN_ATTRS512 _mm512_abs_ph(__m512h __A) {
559559
}
560560

561561
static __inline__ __m512h __DEFAULT_FN_ATTRS512 _mm512_conj_pch(__m512h __A) {
562-
return (__m512h)_mm512_xor_ps((__m512)__A, _mm512_set1_ps(-0.0f));
562+
return (__m512h)_mm512_xor_epi32((__m512i)__A,
563+
_mm512_set1_epi32(-2147483648));
563564
}
564565

565566
static __inline__ __m512h __DEFAULT_FN_ATTRS512

clang/test/AST/ByteCode/new-delete.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -610,7 +610,8 @@ namespace std {
610610
}
611611
constexpr void deallocate(void *p) {
612612
__builtin_operator_delete(p); // both-note 2{{std::allocator<...>::deallocate' used to delete pointer to object allocated with 'new'}} \
613-
// both-note {{used to delete a null pointer}}
613+
// both-note {{used to delete a null pointer}} \
614+
// both-note {{delete of pointer '&no_deallocate_nonalloc' that does not point to a heap-allocated object}}
614615
}
615616
};
616617
template<typename T, typename ...Args>
@@ -1004,6 +1005,10 @@ namespace WrongFrame {
10041005

10051006
}
10061007

1008+
constexpr int no_deallocate_nonalloc = (std::allocator<int>().deallocate((int*)&no_deallocate_nonalloc), 1); // both-error {{constant expression}} \
1009+
// both-note {{in call}} \
1010+
// both-note {{declared here}}
1011+
10071012
#else
10081013
/// Make sure we reject this prior to C++20
10091014
constexpr int a() { // both-error {{never produces a constant expression}}

clang/test/CodeGen/X86/avx512fp16-builtins-constrained-cmp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +avx512fp16 -emit-llvm -ffp-exception-behavior=strict -o - -Wall -Werror | FileCheck %s
1+
// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +avx512fp16 -target-feature +avx512vl -emit-llvm -ffp-exception-behavior=strict -o - -Wall -Werror | FileCheck %s
22

33
#include <immintrin.h>
44

clang/test/CodeGen/X86/avx512fp16-builtins.c

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -689,24 +689,24 @@ __m512h test_mm512_abs_ph(__m512h a) {
689689

690690
__m512h test_mm512_conj_pch(__m512h __A) {
691691
// CHECK-LABEL: @test_mm512_conj_pch
692-
// CHECK: %{{.*}} = bitcast <32 x half> %{{.*}} to <16 x float>
693-
// CHECK: %{{.*}} = bitcast <16 x float> %{{.*}} to <16 x i32>
694-
// CHECK: %{{.*}} = bitcast <16 x float> %{{.*}} to <16 x i32>
692+
// CHECK: %{{.*}} = bitcast <32 x half> %{{.*}} to <8 x i64>
693+
// CHECK: %{{.*}} = bitcast <8 x i64> %{{.*}} to <16 x i32>
694+
// CHECK: %{{.*}} = bitcast <8 x i64> %{{.*}} to <16 x i32>
695695
// CHECK: %{{.*}} = xor <16 x i32> %{{.*}}, %{{.*}}
696-
// CHECK: %{{.*}} = bitcast <16 x i32> %{{.*}} to <16 x float>
697-
// CHECK: %{{.*}} = bitcast <16 x float> %{{.*}} to <32 x half>
696+
// CHECK: %{{.*}} = bitcast <16 x i32> %{{.*}} to <8 x i64>
697+
// CHECK: %{{.*}} = bitcast <8 x i64> %{{.*}} to <32 x half>
698698
return _mm512_conj_pch(__A);
699699
}
700700

701701
__m512h test_mm512_mask_conj_pch(__m512h __W, __mmask32 __U, __m512h __A) {
702702
// CHECK-LABEL: @test_mm512_mask_conj_pch
703703
// CHECK: %{{.*}} = trunc i32 %{{.*}} to i16
704-
// CHECK: %{{.*}} = bitcast <32 x half> %{{.*}} to <16 x float>
705-
// CHECK: %{{.*}} = bitcast <16 x float> %{{.*}} to <16 x i32>
706-
// CHECK: %{{.*}} = bitcast <16 x float> %{{.*}} to <16 x i32>
704+
// CHECK: %{{.*}} = bitcast <32 x half> %{{.*}} to <8 x i64>
705+
// CHECK: %{{.*}} = bitcast <8 x i64> %{{.*}} to <16 x i32>
706+
// CHECK: %{{.*}} = bitcast <8 x i64> %{{.*}} to <16 x i32>
707707
// CHECK: %{{.*}} = xor <16 x i32> %{{.*}}, %{{.*}}
708-
// CHECK: %{{.*}} = bitcast <16 x i32> %{{.*}} to <16 x float>
709-
// CHECK: %{{.*}} = bitcast <16 x float> %{{.*}} to <32 x half>
708+
// CHECK: %{{.*}} = bitcast <16 x i32> %{{.*}} to <8 x i64>
709+
// CHECK: %{{.*}} = bitcast <8 x i64> %{{.*}} to <32 x half>
710710
// CHECK: %{{.*}} = bitcast <32 x half> %{{.*}} to <16 x float>
711711
// CHECK: %{{.*}} = bitcast i16 %{{.*}} to <16 x i1>
712712
// CHECK: %{{.*}} = select <16 x i1> %{{.*}}, <16 x float> %{{.*}}, <16 x float> %{{.*}}
@@ -717,12 +717,12 @@ __m512h test_mm512_mask_conj_pch(__m512h __W, __mmask32 __U, __m512h __A) {
717717
__m512h test_mm512_maskz_conj_pch(__mmask32 __U, __m512h __A) {
718718
// CHECK-LABEL: @test_mm512_maskz_conj_pch
719719
// CHECK: %{{.*}} = trunc i32 %{{.*}} to i16
720-
// CHECK: %{{.*}} = bitcast <32 x half> %{{.*}} to <16 x float>
721-
// CHECK: %{{.*}} = bitcast <16 x float> %{{.*}} to <16 x i32>
722-
// CHECK: %{{.*}} = bitcast <16 x float> %{{.*}} to <16 x i32>
720+
// CHECK: %{{.*}} = bitcast <32 x half> %{{.*}} to <8 x i64>
721+
// CHECK: %{{.*}} = bitcast <8 x i64> %{{.*}} to <16 x i32>
722+
// CHECK: %{{.*}} = bitcast <8 x i64> %{{.*}} to <16 x i32>
723723
// CHECK: %{{.*}} = xor <16 x i32> %{{.*}}, %{{.*}}
724-
// CHECK: %{{.*}} = bitcast <16 x i32> %{{.*}} to <16 x float>
725-
// CHECK: %{{.*}} = bitcast <16 x float> %{{.*}} to <32 x half>
724+
// CHECK: %{{.*}} = bitcast <16 x i32> %{{.*}} to <8 x i64>
725+
// CHECK: %{{.*}} = bitcast <8 x i64> %{{.*}} to <32 x half>
726726
// CHECK: %{{.*}} = bitcast i16 %{{.*}} to <16 x i1>
727727
// CHECK: %{{.*}} = select <16 x i1> %{{.*}}, <16 x float> %{{.*}}, <16 x float> %{{.*}}
728728
// CHECK: %{{.*}} = bitcast <16 x float> %{{.*}} to <32 x half>

clang/test/Preprocessor/x86_target_features.c

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -596,31 +596,24 @@
596596
// RUN: %clang -target i386-unknown-unknown -march=atom -mavx512fp16 -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=AVX512FP16 %s
597597

598598
// AVX512FP16: #define __AVX512BW__ 1
599-
// AVX512FP16: #define __AVX512DQ__ 1
600599
// AVX512FP16: #define __AVX512FP16__ 1
601-
// AVX512FP16: #define __AVX512VL__ 1
602-
// AVX512FP16: #define __EVEX256__ 1
603600
// AVX512FP16: #define __EVEX512__ 1
604601

605602
// RUN: %clang -target i386-unknown-unknown -march=atom -mavx512fp16 -mno-avx512vl -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=AVX512FP16NOAVX512VL %s
606603

607-
// AVX512FP16NOAVX512VL-NOT: #define __AVX512FP16__ 1
608-
// AVX512FP16NOAVX512VL-NOT: #define __AVX512VL__ 1
609-
// AVX512FP16NOAVX512VL-NOT: #define __EVEX256__ 1
604+
// AVX512FP16NOAVX512VL: #define __AVX512FP16__ 1
610605
// AVX512FP16NOAVX512VL: #define __EVEX512__ 1
611606

612607
// RUN: %clang -target i386-unknown-unknown -march=atom -mavx512fp16 -mno-avx512bw -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=AVX512FP16NOAVX512BW %s
613608

614609
// AVX512FP16NOAVX512BW-NOT: #define __AVX512BW__ 1
615610
// AVX512FP16NOAVX512BW-NOT: #define __AVX512FP16__ 1
616-
// AVX512FP16NOAVX512BW: #define __EVEX256__ 1
617611
// AVX512FP16NOAVX512BW: #define __EVEX512__ 1
618612

619613
// RUN: %clang -target i386-unknown-unknown -march=atom -mavx512fp16 -mno-avx512dq -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=AVX512FP16NOAVX512DQ %s
620614

621615
// AVX512FP16NOAVX512DQ-NOT: #define __AVX512DQ__ 1
622-
// AVX512FP16NOAVX512DQ-NOT: #define __AVX512FP16__ 1
623-
// AVX512FP16NOAVX512DQ: #define __EVEX256__ 1
616+
// AVX512FP16NOAVX512DQ: #define __AVX512FP16__ 1
624617
// AVX512FP16NOAVX512DQ: #define __EVEX512__ 1
625618

626619
// RUN: %clang -target i386-unknown-unknown -march=atom -mavx512f -mno-avx512f -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=NOEVEX512 %s

llvm/include/llvm/ADT/AddressRanges.h

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,8 @@ template <typename T> class AddressRangesBase {
9797
if (Start >= End)
9898
return Ranges.end();
9999

100-
auto It =
101-
std::partition_point(Ranges.begin(), Ranges.end(), [=](const T &R) {
102-
return AddressRange(R).start() <= Start;
103-
});
100+
auto It = llvm::partition_point(
101+
Ranges, [=](const T &R) { return AddressRange(R).start() <= Start; });
104102

105103
if (It == Ranges.begin())
106104
return Ranges.end();
@@ -169,10 +167,10 @@ class AddressRangesMap : public AddressRangesBase<AddressRangeValuePair> {
169167
return;
170168

171169
// Search for range which is less than or equal incoming Range.
172-
auto It = std::partition_point(Ranges.begin(), Ranges.end(),
173-
[=](const AddressRangeValuePair &R) {
174-
return R.Range.start() <= Range.start();
175-
});
170+
auto It =
171+
llvm::partition_point(Ranges, [=](const AddressRangeValuePair &R) {
172+
return R.Range.start() <= Range.start();
173+
});
176174

177175
if (It != Ranges.begin())
178176
It--;

0 commit comments

Comments
 (0)