LLVM/project f0159c3clang/lib/Sema SemaDecl.cpp

[SYCL] Correct emission status reporting for function templates declared with SYCL attributes. (#185522)

Commit cf6cc662eeee2b1416430f517850be9032788e39 ([OpenMP][SYCL] Improve
diagnosing of unsupported types usage) customized
`Sema::getEmissionStatus()` to return `Emitted` for a function declared
with the `sycl_kernel` attribute during device compilation. That change
is appropriate, but was inserted before a check for a dependent context
and resulted in `Emitted` being returned instead of `TemplateDiscarded`
for templated functions declared with the attribute. That appears to be
incorrect; templated functions are still discarded.

The customization was extended to include the `sycl_kernel_entry_point`
and `sycl_external` attributes in commit
23e4fe040b67e2dd419652830a87093a93ea1a97 ([SYCL] SYCL host kernel launch
support for the sycl_kernel_entry_point attribute). Those additions are
appropriate, but the effect on templated functions (as opposed to their
instantiations) resulted in the incorrect status being observed in a
downstream fork of Clang.

This change corrects `Sema::getEmissionStatus()` to once again
unconditionally return `TemplateDiscarded` for templated functions.
DeltaFile
+4-6clang/lib/Sema/SemaDecl.cpp
+4-61 files

LLVM/project 375357elibc/include wctype.yaml, libc/src/wctype iswcntrl.h iswcntrl.cpp

[libc] implement iswcntrl entrypoint (#185273)

Implement iswcntrl entrypoint and test for #185136
DeltaFile
+31-0libc/test/src/wctype/iswcntrl_test.cpp
+21-0libc/src/wctype/iswcntrl.h
+21-0libc/src/wctype/iswcntrl.cpp
+11-0libc/src/wctype/CMakeLists.txt
+10-0libc/test/src/wctype/CMakeLists.txt
+6-0libc/include/wctype.yaml
+100-08 files not shown
+108-014 files

LLVM/project 1383dd8lldb/test/API/functionalities/longjmp main.c TestLongjmp.py

[lldb][test] Fix TestLongjmp on Linux (#185464)

Patch fixes llvm.org/pr20231.
The original test was expecting clock() to return 0 when stepping in
debugger which in reality can never happen.
DeltaFile
+11-13lldb/test/API/functionalities/longjmp/main.c
+0-3lldb/test/API/functionalities/longjmp/TestLongjmp.py
+11-162 files

LLVM/project 38a3de6llvm/test/Transforms/SLPVectorizer/RISCV strided-loads-based-reduction.ll

[SLP][NFC]Add RISC_V test with a regression in reduction vectorization, NFC
DeltaFile
+376-0llvm/test/Transforms/SLPVectorizer/RISCV/strided-loads-based-reduction.ll
+376-01 files

LLVM/project af8d418clang/lib/Basic/Targets PPC.cpp, clang/lib/CodeGen CodeGenModule.cpp CodeGenFunction.cpp

debugging
DeltaFile
+44-3clang/lib/CodeGen/CodeGenModule.cpp
+4-0clang/lib/CodeGen/CodeGenFunction.cpp
+1-0clang/lib/Basic/Targets/PPC.cpp
+49-33 files

LLVM/project 5c91dfcclang/include/clang/Basic TargetInfo.h, clang/lib/CodeGen/TargetBuiltins PPC.cpp

code review
DeltaFile
+29-28clang/lib/CodeGen/TargetBuiltins/PPC.cpp
+1-1clang/include/clang/Basic/TargetInfo.h
+30-292 files

LLVM/project 63082ceclang/lib/AST CMakeLists.txt, clang/lib/Basic CMakeLists.txt

debugging, CMakelists changes
DeltaFile
+74-0clang/lib/CodeGen/CMakeLists.txt
+4-0llvm/lib/MC/CMakeLists.txt
+4-0clang/lib/AST/CMakeLists.txt
+4-0clang/lib/Basic/CMakeLists.txt
+4-0llvm/lib/TargetParser/CMakeLists.txt
+1-0clang/lib/Sema/CMakeLists.txt
+91-06 files

LLVM/project cc38e42llvm/lib/Target/SPIRV SPIRVAsmPrinter.cpp SPIRVModuleAnalysis.cpp

[SPIR-V] Make SPIRVModuleAnalysis::MAI a non static member (#160956)

Otherwise multiple translation units in the same process could run into
ID reuse collisions cause invalid SPIR-Vs to be generated due to having
multiple definition for the same SPIR-V SSA value.

Closes: https://github.com/llvm/llvm-project/issues/160613
DeltaFile
+1-1llvm/lib/Target/SPIRV/SPIRVAsmPrinter.cpp
+0-2llvm/lib/Target/SPIRV/SPIRVModuleAnalysis.cpp
+1-1llvm/lib/Target/SPIRV/SPIRVModuleAnalysis.h
+2-43 files

LLVM/project dff05acllvm/lib/Target/AArch64 AArch64AdvSIMDScalarPass.cpp AArch64.h

[NewPM] Add port for aarch64-simd-scalar (#185256)
DeltaFile
+38-17llvm/lib/Target/AArch64/AArch64AdvSIMDScalarPass.cpp
+8-1llvm/lib/Target/AArch64/AArch64.h
+1-1llvm/lib/Target/AArch64/AArch64TargetMachine.cpp
+1-0llvm/lib/Target/AArch64/AArch64PassRegistry.def
+48-194 files

LLVM/project 673a71fllvm/include/llvm/CodeGen ScheduleHazardRecognizer.h, llvm/lib/CodeGen MultiHazardRecognizer.cpp

[CodeGen] Make ShouldPreferAnother const. NFC. (#185606)
DeltaFile
+3-2llvm/lib/Target/PowerPC/PPCHazardRecognizers.h
+2-2llvm/lib/CodeGen/MultiHazardRecognizer.cpp
+2-2llvm/lib/Target/PowerPC/PPCHazardRecognizers.cpp
+1-3llvm/include/llvm/CodeGen/ScheduleHazardRecognizer.h
+1-1llvm/lib/Target/Hexagon/HexagonHazardRecognizer.cpp
+1-1llvm/lib/Target/Hexagon/HexagonHazardRecognizer.h
+10-113 files not shown
+13-149 files

LLVM/project b99970dllvm/lib/Target/AArch64 AArch64PointerAuth.cpp

[AArch64] Remove dangling function declaration in AArch64PointerAuth (#185439)

Function `checkAuthenticatedLR` was declared but not defined anywhere.

This patch removes the dangling declaration.
DeltaFile
+0-2llvm/lib/Target/AArch64/AArch64PointerAuth.cpp
+0-21 files

LLVM/project de2f0abclang/test/CodeGen attr-target-clones-ppc.c

add IR codegen test
DeltaFile
+18-3clang/test/CodeGen/attr-target-clones-ppc.c
+18-31 files

LLVM/project 725be0bflang/test/Lower/Intrinsics eoshift.f90 dshiftr.f90

[flang][NFC] Converted five tests from old lowering to new lowering (part 28) (#185549)

Tests converted from test/Lower/Intrinsics: dreal.f90, dshiftl.f90,
dshiftr.f90, eoshift.f90, erfc_scaled.f90
DeltaFile
+64-86flang/test/Lower/Intrinsics/eoshift.f90
+51-22flang/test/Lower/Intrinsics/dshiftr.f90
+51-22flang/test/Lower/Intrinsics/dshiftl.f90
+25-11flang/test/Lower/Intrinsics/erfc_scaled.f90
+7-4flang/test/Lower/Intrinsics/dreal.f90
+198-1455 files

LLVM/project 4f70b7eutils/bazel/llvm-project-overlay/libc BUILD.bazel

[Bazel] Fixes 05d96d5 (#185660)

This fixes 05d96d53559e0b2876dd6608152805f07ebcc195.
DeltaFile
+64-2utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+64-21 files

LLVM/project 084aa5allvm/test/CodeGen/AArch64 sve-streaming-mode-fixed-length-fp-minmax.ll sve-fixed-length-fp-minmax.ll

[LLVM][CodeGen][SVE] Implement isel for maximumnum/minimumnum. (#185074)

Patch to add custom lowering for FCANONICALIZE, FMAXNUM_IEEE, and
FMINNUM_IEEE, all of which are required when relying on default
expansion of FMAXIMUMNUM and FMINIMUMNUM.
    
The lowering is very simple because AArch64's FMAXNM and FMINNM
instructions are IEEE754-2008 compliant, with the implementation
effectively follow the same path take for NEON.

NOTE: Bfloat support will be provided separately.
DeltaFile
+1,066-36llvm/test/CodeGen/AArch64/sve-streaming-mode-fixed-length-fp-minmax.ll
+692-76llvm/test/CodeGen/AArch64/sve-fixed-length-fp-minmax.ll
+407-133llvm/test/CodeGen/AArch64/sve-streaming-mode-fixed-length-fp-rounding.ll
+268-133llvm/test/CodeGen/AArch64/sve-fixed-length-fp-rounding.ll
+214-70llvm/test/CodeGen/AArch64/sve-fp.ll
+48-0llvm/test/CodeGen/AArch64/fp-fcanonicalize.ll
+2,695-4483 files not shown
+2,730-4499 files

LLVM/project 1b2b5eflldb/unittests/Platform PlatformDarwinTest.cpp

[lldb][test] PlatformDarwinTest.cpp: add full error message to expected assertion

I'm about to reword the error message. Having test coverage for the
message will make that change easier to review/reason about.
DeltaFile
+49-10lldb/unittests/Platform/PlatformDarwinTest.cpp
+49-101 files

LLVM/project 2a37eb8clang/test/CodeGen builtins-image-load.c builtins-image-store.c, clang/test/SemaOpenCL builtins-extended-image-param-gfx1100-err.cl builtins-image-load-param-gfx1100-err.cl

[Clang] Restrict AMDGCN image built-ins (#180949)

Introduced validation for the `dmask` argument of the aforementioned
built-ins to match LLVM IR verifier behavior that is being changed in
llvm/llvm-project#179511.
DeltaFile
+227-16clang/test/SemaOpenCL/builtins-extended-image-param-gfx1100-err.cl
+84-84clang/test/CodeGen/builtins-image-load.c
+105-28clang/test/SemaOpenCL/builtins-image-load-param-gfx1100-err.cl
+54-54clang/test/CodeGen/builtins-image-store.c
+46-46clang/test/CodeGen/builtins-extended-image.c
+63-15clang/test/SemaOpenCL/builtins-image-store-param-gfx1100-err.cl
+579-2433 files not shown
+624-2499 files

LLVM/project 56a4315llvm/lib/Target/SystemZ SystemZMachineScheduler.cpp, llvm/test/CodeGen/SystemZ vec-cmpsel.ll vec-cmpsel-01.ll

[SystemZ] Add a SystemZ specific pre-RA scheduling strategy. (#135076)

This is a relatively simple strategy as it is omitting any heuristics for
liveness and register pressure reduction. This works well as the SystemZ ISel
scheduler is using Sched::RegPressure which gives a good input order to begin
with.

It is trying harder with biasing phys regs than GenericScheduler as it also
considers other instructions such as immediate loads directly into phys-regs
produced by the register coalescer. This can hopefully be refactored into 
MachineScheduler.cpp.

It has a latency heuristic that is slightly different from the one in
GenericScheduler: It is activated for a specific type of region that have
many "data sequences" consisting of SUs connected only with a single
data-edge that are next to each other in the input order. This is only 3% of
all the scheduling regions, but when activated it is applied on all the
candidates (not just once per cycle). At the same time it is a bit more
careful by checking not only the SU Height against the scheduled latency but

    [22 lines not shown]
DeltaFile
+0-509llvm/test/CodeGen/SystemZ/vec-cmpsel.ll
+498-0llvm/test/CodeGen/SystemZ/vec-cmpsel-01.ll
+134-131llvm/test/CodeGen/SystemZ/vector-constrained-fp-intrinsics.ll
+212-0llvm/test/CodeGen/SystemZ/misched-prera-latencies.mir
+182-8llvm/lib/Target/SystemZ/SystemZMachineScheduler.cpp
+94-0llvm/test/CodeGen/SystemZ/misched-prera-biaspregs.mir
+1,120-64832 files not shown
+1,495-82038 files

LLVM/project 2133002llvm/lib/Target/AMDGPU AMDGPULowerBufferFatPointers.cpp, llvm/test/CodeGen/AMDGPU buffer-fat-pointer-unsupported-errors.ll

[AMDGPU] Poison invalid globals after emitting error in LowerBufferFatPointers pass (#184662)

After the change from `report_fatal_error` to `Ctx.emitError` in #142014
there is a necessity to remove unsupported globals. Otherwise there is a
secondary crash during ISel when processing them

Fixes SWDEV-511241
DeltaFile
+12-0llvm/test/CodeGen/AMDGPU/buffer-fat-pointer-unsupported-errors.ll
+7-1llvm/lib/Target/AMDGPU/AMDGPULowerBufferFatPointers.cpp
+19-12 files

LLVM/project 97bffddllvm/utils/TableGen/Common CodeGenRegisters.cpp CodeGenRegisters.h

[TableGen] Do not order register classes based on heap addresses (#185644)

Compare registers using their enum values instead, which I suspect was
the intention in the first place, since we already have lexicographical
ordering defined for CodeGenRegisters.

This does not cause any changes in .inc files and is likely NFC, but
it's still best to have it be deterministic.
DeltaFile
+5-8llvm/utils/TableGen/Common/CodeGenRegisters.cpp
+4-0llvm/utils/TableGen/Common/CodeGenRegisters.h
+9-82 files

LLVM/project c79034alibc/include wctype.yaml, libc/src/wctype iswlower.h iswlower.cpp

[libc] 185136 - added iswlower entry point (#185221)

Changes include:
- Added iswlower entrypoint in wctype.yaml to expose the function
- Created iswlower.h header and iswlower.cpp implementation
- Added CMake entrypoint object for iswlower
- Created unit test in iswlower_test.cpp
- Added test entry to wctype CMakeLists.txt

this PR helps in exposing iswlower which internally calls islower on
wide character

built using :  ninja -C build libc 
tested using : ninja libc_wctype_unittests and all the 3 tests passed 

resolves issue #185136
DeltaFile
+21-0libc/src/wctype/iswlower.h
+21-0libc/src/wctype/iswlower.cpp
+20-0libc/test/src/wctype/iswlower_test.cpp
+11-0libc/src/wctype/CMakeLists.txt
+10-0libc/test/src/wctype/CMakeLists.txt
+6-0libc/include/wctype.yaml
+89-08 files not shown
+97-014 files

LLVM/project f0c7f0flldb/source/Plugins/Platform/MacOSX PlatformDarwin.cpp

[lldb][PlatformDarwin][NFC] Use formatv-style format string in Locate ExecutableScriptingResourcesFromDSYM warning message (#185640)

About to make changes in this area and using `formatv` instead of
`printf` style format specifiers makes those easier to follow.
DeltaFile
+13-13lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
+13-131 files

LLVM/project 4fffee0llvm/lib/Target/Hexagon HexagonPatterns.td, llvm/test/CodeGen/Hexagon funnel-shift.ll rotate.ll

[Hexagon] Fix 64-bit funnel shift miscompilation with register shift amounts (#183669)

64-bit regpair shift amounts are treated as signed 7-bits, so a
complement
shift amount of 64 (when the primary amount is 0) is sign-extended to
-64,
reversing the shift direction and producing incorrect results. This
affected
any 64-bit rotate or funnel shift where the runtime shift amount could
be 0
(making the complement 64) or >= 64.
    
Fix by masking the shift amount to [0, 63] and computing the complement
as
(m - 64), which is always in [-64, -1]. Using lsl/lsr (logical shift)
instructions with this negative amount causes the hardware to reverse
the
shift direction while zero-filling vacated positions:
    

    [12 lines not shown]
DeltaFile
+16-12llvm/test/CodeGen/Hexagon/funnel-shift.ll
+12-8llvm/test/CodeGen/Hexagon/rotate.ll
+6-2llvm/lib/Target/Hexagon/HexagonPatterns.td
+34-223 files

LLVM/project 525e484llvm/lib/Target/X86 X86ISelLowering.cpp

[X86] Fix -Wunused-variable

Inline a variable in an assertion given it only has a single use.
DeltaFile
+1-2llvm/lib/Target/X86/X86ISelLowering.cpp
+1-21 files

LLVM/project 05d96d5libc/src/__support frac128.h, libc/src/__support/FPUtil PolyEval.h

[libc][math] Implement an integer-only version of double precision sin and cos with 1 ULP errors. (#184752)

Size of `sin` for armv8m:

Before the patch:
```
$ ls -l libc/src/math/generic/CMakeFiles/libc.src.math.generic.sin.dir/
total 16
-rw-r----- 1 lntue primarygroup 13408 Mar  5 07:38 sin.cpp.obj

$ llvm-nm-19 --radix=d --print-size --size-sort --reverse-sort libc/src/math/generic/CMakeFiles/libc.src.math.generic.sin.dir/sin.cpp.obj 
00000000 00002048 V _ZN22__llvm_libc_23_0_0_git4math31range_reduction_double_internal24ONE_TWENTY_EIGHT_OVER_PIE
00000000 00001632 W _ZN22__llvm_libc_23_0_0_git4math31range_reduction_double_internal19LargeRangeReduction4fastEdRNS_10NumberPairIdEE
00000000 00001412 W _ZN22__llvm_libc_23_0_0_git4math3sinEd
00000000 00001048 W _ZN22__llvm_libc_23_0_0_git4math20sincos_eval_internal11sincos_evalERKNS_10NumberPairIdEERS3_S6_
00000000 00001040 V _ZN22__llvm_libc_23_0_0_git4math31range_reduction_double_internal17SIN_K_PI_OVER_128E
00000000 00000528 W _ZN22__llvm_libc_23_0_0_git4math31range_reduction_double_internal21range_reduction_smallEdRNS_10NumberPairIdEE
00000000 00000004 T sin
00000000 00000004 V _ZZN22__llvm_libc_23_0_0_git6fputil7generic15quick_get_roundEvE1x

    [26 lines not shown]
DeltaFile
+271-0libc/src/__support/math/sincos_integer_utils.h
+87-0libc/src/__support/math/cos_integer_eval.h
+86-0libc/src/__support/math/sin_integer_eval.h
+60-0libc/src/__support/frac128.h
+44-0libc/src/__support/math/CMakeLists.txt
+28-0libc/src/__support/FPUtil/PolyEval.h
+576-04 files not shown
+611-210 files

LLVM/project e9aa580llvm/include/llvm/Frontend/OpenMP OMP.td

[OpenMP] Add definitions of FLATTEN and SPLIT to OMP.td (#185642)

Add the definitions of the "flatten" and the "split" constructs to the
OMP.td file. This will allow the implementation efforts in clang and
flang to proceed independently.

There is no other functionality added in this patch.

The "flatten" construct is defined in the OpenMP Technical Report 14:
https://www.openmp.org/wp-content/uploads/openmp-TR14.pdf
DeltaFile
+20-0llvm/include/llvm/Frontend/OpenMP/OMP.td
+20-01 files

LLVM/project 7484eb7clang/lib/CIR/CodeGen CIRGenBuilder.h, clang/test/CIR/CodeGen predefined-expr.c string-literals.cpp

[CIR] Ensure strings are null-terminated, better deal with trailing null (#185513)

Our current implementation of string lowering did some work to remove
extra trailing zeros, plus do a 'zero' constant. That is unchanged by
this patch. However, this patch ALSO ensures that we do the 'remove
extra trailing zeros' to remove ALL trailing zeros, which likely has
canonicalization benefits later on.

However, the real benefit of this patch is to make string emission by
default emit a null-terminator, which fixes the virtual table 'name'
field get lowered correctly. We do this by making the builder::getString
function take an argument (true by default) that will ensure we add a
null terminator if necessary.

This reflects the llvm::ConstantDataArray::getString function, which has
the same functionality. However, doing this during lowering seems
incorrect, since the FE is the one that knows whether these null
terminators are necessary. There is not currently an 'opt out' use of
the behavior, but the functionality is left in place to better reflect

    [3 lines not shown]
DeltaFile
+17-10clang/lib/CIR/CodeGen/CIRGenBuilder.h
+9-9clang/test/CIR/CodeGen/predefined-expr.c
+6-6clang/test/CIR/CodeGen/string-literals.cpp
+3-3clang/test/CIR/CodeGen/string-literals.c
+2-2clang/test/CIR/CodeGenBuiltins/builtin-printf.cpp
+2-2clang/test/CIR/CodeGen/vtt.cpp
+39-321 files not shown
+40-337 files

LLVM/project 94f50edclang/include/clang/CIR MissingFeatures.h, clang/lib/CIR/CodeGen CIRGenBuiltinAArch64.cpp

[CIR][AArch64] Add lowering for remaining `vabd_*` builtins (#185478)

Implement the missing CIR lowerings for the AdvSIMD (Neon) `vabd_*`
(absolute difference) intrinsic group.

Most `vabd` variants were already supported (see
https://github.com/llvm/llvm-project/pull/183595); this patch
completes the remaining cases listed in [1].

Move the corresponding tests from:
  * clang/test/CodeGen/AArch64/neon_intrinsics.c

to:
  * clang/test/CodeGen/AArch64/neon/intrinsics.c

The implementation mirrors the existing lowering in
CodeGen/TargetBuiltins/ARM.cpp. To support this, add the
`emitCommonNeonSISDBuiltinExpr` helper.

Reference:
[1] https://arm-software.github.io/acle/neon_intrinsics/advsimd.html#absolute-difference
DeltaFile
+350-2clang/lib/CIR/CodeGen/CIRGenBuiltinAArch64.cpp
+21-3clang/test/CodeGen/AArch64/neon/intrinsics.c
+0-20clang/test/CodeGen/AArch64/neon-intrinsics.c
+0-1clang/include/clang/CIR/MissingFeatures.h
+371-264 files

LLVM/project 859af27mlir/test CMakeLists.txt

[mlir] Fix tests not to depend `llvm-strings` in standalone build (#185187)

Move the `llvm-strings` test dependency into the non-standalone test
dependency block, to fix standalone builds after #182846. While at it,
reformat the block to make it more visible.

Signed-off-by: Michał Górny <mgorny at gentoo.org>
DeltaFile
+8-2mlir/test/CMakeLists.txt
+8-21 files

LLVM/project 5e03cd7clang/lib/Sema HLSLBuiltinTypeDeclBuilder.cpp HLSLExternalSemaSource.cpp, clang/test/AST/HLSL Texture2D-vector-AST.hlsl

[HLSL] Implement Texture2D::operator[]
DeltaFile
+52-1clang/test/AST/HLSL/Texture2D-vector-AST.hlsl
+32-0clang/test/CodeGenHLSL/resources/Texture2D-Subscript.hlsl
+10-10clang/test/CodeGenHLSL/resources/StructuredBuffers-subscripts.hlsl
+15-3clang/lib/Sema/HLSLBuiltinTypeDeclBuilder.cpp
+8-8clang/test/CodeGenHLSL/resources/TypedBuffers-subscript.hlsl
+7-6clang/lib/Sema/HLSLExternalSemaSource.cpp
+124-281 files not shown
+125-297 files