Skip to content

Commit 38cf0ea

Browse files
committed
Merge branch 'main' of https://github.com/llvm/llvm-project
2 parents 4416c22 + 0810505 commit 38cf0ea

File tree

136 files changed

+3532
-1256
lines changed

Some content is hidden

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

136 files changed

+3532
-1256
lines changed

clang/lib/Driver/ToolChains/Clang.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5981,12 +5981,13 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
59815981

59825982
Args.AddLastArg(CmdArgs, options::OPT_fno_knr_functions);
59835983

5984-
// This is a coarse approximation of what llvm-gcc actually does, both
5985-
// -fasynchronous-unwind-tables and -fnon-call-exceptions interact in more
5986-
// complicated ways.
59875984
auto SanitizeArgs = TC.getSanitizerArgs(Args);
59885985
Args.AddLastArg(CmdArgs,
59895986
options::OPT_fallow_runtime_check_skip_hot_cutoff_EQ);
5987+
5988+
// This is a coarse approximation of what llvm-gcc actually does, both
5989+
// -fasynchronous-unwind-tables and -fnon-call-exceptions interact in more
5990+
// complicated ways.
59905991
bool IsAsyncUnwindTablesDefault =
59915992
TC.getDefaultUnwindTableLevel(Args) == ToolChain::UnwindTableLevel::Asynchronous;
59925993
bool IsSyncUnwindTablesDefault =

clang/lib/Sema/SemaTemplate.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -924,7 +924,7 @@ static TemplateArgumentLoc translateTemplateArgument(Sema &SemaRef,
924924
}
925925

926926
case ParsedTemplateArgument::NonType: {
927-
Expr *E = static_cast<Expr *>(Arg.getAsExpr());
927+
Expr *E = Arg.getAsExpr();
928928
return TemplateArgumentLoc(TemplateArgument(E, /*IsCanonical=*/false), E);
929929
}
930930

compiler-rt/test/asan/TestCases/Windows/fuse-lld-globals.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// REQUIRES: lld-available
2+
13
// RUN: %clangxx_asan -fuse-ld=lld -O3 %s -o %t && not %run %t 2>&1 | FileCheck %s
24

35
#include <string.h>

compiler-rt/test/fuzzer/fuzzer-ubsan.test

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// This test currently fails to compile on green.lab.llvm.org (arm)
2+
// XFAIL: system-darwin && target=arm{{.*}}
3+
14
RUN: %cpp_compiler -fsanitize=undefined -fno-sanitize-recover=all %S/SignedIntOverflowTest.cpp -o %t-SignedIntOverflowTest-Ubsan
25
RUN: not %run %t-SignedIntOverflowTest-Ubsan 2>&1 | FileCheck %s
36
CHECK: runtime error: signed integer overflow: 2147483647 + 1 cannot be represented in type 'int'

flang/lib/Optimizer/OpenACC/Support/FIROpenACCTypeInterfaces.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -591,7 +591,8 @@ mlir::Value OpenACCMappableModel<Ty>::generatePrivateInit(
591591
hlfir::AssignOp::create(firBuilder, loc, initVal,
592592
declareOp.getBase());
593593
} else {
594-
for (auto ext : seqTy.getShape()) {
594+
// Generate loop nest from slowest to fastest running dimension
595+
for (auto ext : llvm::reverse(seqTy.getShape())) {
595596
auto lb = firBuilder.createIntegerConstant(loc, idxTy, 0);
596597
auto ub = firBuilder.createIntegerConstant(loc, idxTy, ext - 1);
597598
auto step = firBuilder.createIntegerConstant(loc, idxTy, 1);

flang/test/Lower/OpenACC/acc-reduction.f90

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,14 @@
189189
! CHECK: acc.yield %arg0 : !fir.box<!fir.array<?xi32>>
190190
! CHECK: }
191191

192+
! CHECK-LABEL: acc.reduction.recipe @reduction_add_section_lb0.ub9xlb0.ub19_ref_10x20xi32 : !fir.ref<!fir.array<10x20xi32>> reduction_operator <add> init {
193+
! CHECK: fir.do_loop %arg1 = %c0 to %c19 step %c1 {
194+
! CHECK: fir.do_loop %arg2 = %c0_0 to %c9 step %c1_1 {
195+
! CHECK: } combiner {
196+
! CHECK: fir.do_loop %arg2 = %c0 to %c19 step %c1 {
197+
! CHECK: fir.do_loop %arg3 = %c0_0 to %c9 step %c1_1 {
198+
! CHECK: }
199+
192200
! CHECK-LABEL: acc.reduction.recipe @reduction_mul_ref_z32 : !fir.ref<complex<f32>> reduction_operator <mul> init {
193201
! CHECK: ^bb0(%{{.*}}: !fir.ref<complex<f32>>):
194202
! CHECK: %[[REAL:.*]] = arith.constant 1.000000e+00 : f32
@@ -1167,6 +1175,29 @@ subroutine acc_reduction_add_static_slice(a)
11671175
! CHECK: %[[RED:.*]] = acc.reduction varPtr(%[[DECLARG0]]#0 : !fir.ref<!fir.array<100xi32>>) bounds(%[[BOUND]]) -> !fir.ref<!fir.array<100xi32>> {name = "a(11:20)"}
11681176
! CHECK: acc.parallel reduction(@reduction_add_section_lb10.ub19_ref_100xi32 -> %[[RED]] : !fir.ref<!fir.array<100xi32>>)
11691177

1178+
subroutine acc_reduction_add_static_slice_2d(a)
1179+
integer :: a(10,20)
1180+
!$acc parallel reduction(+:a(:10,:20))
1181+
!$acc end parallel
1182+
end subroutine
1183+
1184+
! CHECK-LABEL: func.func @_QPacc_reduction_add_static_slice_2d(
1185+
! CHECK-SAME: %[[ARG0:.*]]: !fir.ref<!fir.array<10x20xi32>> {fir.bindc_name = "a"})
1186+
! CHECK: %[[C10:.*]] = arith.constant 10 : index
1187+
! CHECK: %[[C20:.*]] = arith.constant 20 : index
1188+
! CHECK: %[[DECLARG0:.*]]:2 = hlfir.declare %[[ARG0]]
1189+
! CHECK: %[[LB:.*]] = arith.constant 0 : index
1190+
! CHECK: %[[C1:.*]] = arith.constant 1 : index
1191+
! CHECK: %[[UB9:.*]] = arith.constant 9 : index
1192+
! CHECK: %[[STRIDE1:.*]] = arith.constant 10 : index
1193+
! CHECK: %[[BOUND0:.*]] = acc.bounds lowerbound(%[[LB]] : index) upperbound(%[[UB9]] : index) extent(%[[C10]] : index) stride(%[[C1]] : index) startIdx(%[[C1]] : index)
1194+
! CHECK: %[[UB19:.*]] = arith.constant 19 : index
1195+
! CHECK: %[[BOUND1:.*]] = acc.bounds lowerbound(%[[LB]] : index) upperbound(%[[UB19]] : index) extent(%[[C20]] : index)
1196+
! stride(%[[STRIDE1]] : index) startIdx(%[[C1]] : index)
1197+
! CHECK: %[[RED:.*]] = acc.reduction varPtr(%[[DECLARG0]]#0 : !fir.ref<!fir.array<10x20xi32>>) bounds(%[[BOUND0]], %[[BOUND1]]) ->
1198+
! !fir.ref<!fir.array<10x20xi32>> {name = "a(:10,:20)"}
1199+
! CHECK: acc.parallel reduction(@reduction_add_section_lb0.ub9xlb0.ub19_ref_10x20xi32 -> %[[RED]] : !fir.ref<!fir.array<10x20xi32>>)
1200+
11701201
subroutine acc_reduction_add_dynamic_extent_add(a)
11711202
integer :: a(:)
11721203
!$acc parallel reduction(+:a)

libc/config/baremetal/aarch64/entrypoints.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -787,12 +787,15 @@ list(APPEND TARGET_LIBM_ENTRYPOINTS
787787
libc.src.math.fminimum_numbf16
788788
libc.src.math.fromfpbf16
789789
libc.src.math.fromfpxbf16
790+
libc.src.math.getpayloadbf16
790791
libc.src.math.nextafterbf16
791792
libc.src.math.nextdownbf16
792793
libc.src.math.nexttowardbf16
793794
libc.src.math.nextupbf16
794795
libc.src.math.roundbf16
795796
libc.src.math.roundevenbf16
797+
libc.src.math.setpayloadbf16
798+
libc.src.math.setpayloadsigbf16
796799
libc.src.math.truncbf16
797800
libc.src.math.ufromfpbf16
798801
libc.src.math.ufromfpxbf16

libc/config/baremetal/arm/entrypoints.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -790,12 +790,15 @@ list(APPEND TARGET_LIBM_ENTRYPOINTS
790790
libc.src.math.fminimum_numbf16
791791
libc.src.math.fromfpbf16
792792
libc.src.math.fromfpxbf16
793+
libc.src.math.getpayloadbf16
793794
libc.src.math.nextafterbf16
794795
libc.src.math.nextdownbf16
795796
libc.src.math.nexttowardbf16
796797
libc.src.math.nextupbf16
797798
libc.src.math.roundbf16
798799
libc.src.math.roundevenbf16
800+
libc.src.math.setpayloadbf16
801+
libc.src.math.setpayloadsigbf16
799802
libc.src.math.truncbf16
800803
libc.src.math.ufromfpbf16
801804
libc.src.math.ufromfpxbf16

libc/config/baremetal/riscv/entrypoints.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -790,12 +790,15 @@ list(APPEND TARGET_LIBM_ENTRYPOINTS
790790
libc.src.math.fminimum_numbf16
791791
libc.src.math.fromfpbf16
792792
libc.src.math.fromfpxbf16
793+
libc.src.math.getpayloadbf16
793794
libc.src.math.nextafterbf16
794795
libc.src.math.nextdownbf16
795796
libc.src.math.nexttowardbf16
796797
libc.src.math.nextupbf16
797798
libc.src.math.roundbf16
798799
libc.src.math.roundevenbf16
800+
libc.src.math.setpayloadbf16
801+
libc.src.math.setpayloadsigbf16
799802
libc.src.math.truncbf16
800803
libc.src.math.ufromfpbf16
801804
libc.src.math.ufromfpxbf16

libc/config/darwin/aarch64/entrypoints.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -620,12 +620,15 @@ list(APPEND TARGET_LIBM_ENTRYPOINTS
620620
libc.src.math.fminimum_numbf16
621621
libc.src.math.fromfpbf16
622622
libc.src.math.fromfpxbf16
623+
libc.src.math.getpayloadbf16
623624
libc.src.math.nextafterbf16
624625
libc.src.math.nextdownbf16
625626
libc.src.math.nexttowardbf16
626627
libc.src.math.nextupbf16
627628
libc.src.math.roundbf16
628629
libc.src.math.roundevenbf16
630+
libc.src.math.setpayloadbf16
631+
libc.src.math.setpayloadsigbf16
629632
libc.src.math.truncbf16
630633
libc.src.math.ufromfpbf16
631634
libc.src.math.ufromfpxbf16

0 commit comments

Comments
 (0)