LLVM/project 69c2c65clang/lib/CodeGen CodeGenFunction.h CGExpr.cpp, clang/test/CodeGen attr-sized-by-for-pointers.c attr-counted-by-or-null-for-pointers.c

[CodeGen] Fix -fsanitize=array-bounds for __sized_by / _or_null pointers

`EmitCountedByBoundsChecking()` assumed a CountAttributedType is always
a __counted_by pointer. That isn't true, there are four versions of the
attribute:

* `__counted_by`: Already handled correctly.
* `__counted_by_or_null`: Incorectly handled.
* `__sized_by`: Incorreclty handled.
* `__sized_by_or_null`: Incorreclty handled.

In particular:

* __sized_by / __sized_by_or_null: the loaded bound is a byte count, but the
  element index was compared against it directly, so an access was only
  flagged once the index exceeded the byte count -- missing out-of-bounds
  accesses for a pointee larger than one byte. Scale the index to bytes
  ('index * sizeof(element)') before comparing. counted_by counts elements
  and is unchanged; a void (or otherwise zero-sized) pointee uses the GNU

    [15 lines not shown]
DeltaFile
+396-173clang/test/CodeGen/attr-sized-by-or-null-for-pointers.c
+295-98clang/test/CodeGen/attr-counted-by-or-null-for-pointers.c
+291-81clang/test/CodeGen/attr-sized-by-for-pointers.c
+43-9clang/lib/CodeGen/CGExpr.cpp
+2-1clang/lib/CodeGen/CodeGenFunction.h
+1,027-3625 files

LLVM/project 1572319clang/lib/CodeGen CGBuiltin.cpp, clang/test/CodeGen attr-counted-by-for-pointers.c attr-sized-by-for-pointers.c

[CodeGen] Fix __builtin_dynamic_object_size for __sized_by / _or_null pointers

`emitCountedByPointerSize()` assumed a CountAttributedType is always
a __counted_by pointer. That isn't true, there are four versions of the
attribute:

* `__counted_by`: Already handled correctly.
* `__counted_by_or_null`: Incorectly handled.
* `__sized_by`: Incorreclty handled.
* `__sized_by_or_null`: Incorreclty handled.

In particular:

* __sized_by / __sized_by_or_null: the attribute argument is a byte count,
  but the object size was computed as count * sizeof(*ptr), over-reporting by
  the element size for any pointee larger than one byte. Use the count
  directly for the byte-counting variants.

* __counted_by_or_null / __sized_by_or_null: a null pointer describes no

    [22 lines not shown]
DeltaFile
+655-0clang/test/CodeGen/attr-sized-by-or-null-for-pointers.c
+514-0clang/test/CodeGen/attr-counted-by-or-null-for-pointers.c
+401-2clang/test/CodeGen/attr-sized-by-for-pointers.c
+169-5clang/test/CodeGen/attr-counted-by-for-pointers.c
+98-43clang/lib/CodeGen/CGBuiltin.cpp
+1,837-505 files

LLVM/project 3ece898llvm/lib/Target/AMDGPU AMDGPURegBankLegalizeRules.cpp, llvm/test/CodeGen/AMDGPU llvm.amdgcn.tanh.ll

[AMDGPU][GISel] Add RegBankLegalize rules for amdgcn_tanh (#214051)

Enable the existing gfx1250 and gfx13 GlobalISel coverage now that tanh
operands are assigned to VGPRs.
DeltaFile
+570-31llvm/test/CodeGen/AMDGPU/llvm.amdgcn.tanh.ll
+1-1llvm/lib/Target/AMDGPU/AMDGPURegBankLegalizeRules.cpp
+571-322 files

LLVM/project fb559f5clang/lib/Sema SemaAMDGPU.cpp, clang/test/SemaHIP amdgpu-builtin-fence.hip

[AMDGPU][Clang] Handle instantiation-dependent fence arguments (#214294)

Refactor atomic builtin checks into their switch case and defer constant
evaluation of dependent arguments until instantiation, avoiding a
potential crash during template definition.

Fixes ROCM-29058.
DeltaFile
+47-50clang/lib/Sema/SemaAMDGPU.cpp
+33-0clang/test/SemaHIP/amdgpu-builtin-fence.hip
+80-502 files

LLVM/project 1a8e057clang/cmake/caches Fuchsia-stage2.cmake

[Fuchsia] Disable per-target runtime directories for Darwin (#214307)

This avoids the breakage introduced by #213748.
DeltaFile
+1-1clang/cmake/caches/Fuchsia-stage2.cmake
+1-11 files

LLVM/project 2afad89llvm/lib/Target/DirectX DXILShaderFlags.cpp, llvm/test/CodeGen/DirectX/ShaderFlags atomic64-groupshared.ll atomic64-typed-resource.ll

Add atomic shader flags for resources (#212869)

This PR adds shader flag analysis for atomics on resources.
Fixes https://github.com/llvm/llvm-project/issues/116150 and
https://github.com/llvm/llvm-project/issues/116148

https://github.com/llvm/llvm-project/issues/116152 can't be done yet as
heap resources aren't yet supported.

Assisted by: Github Copilot
DeltaFile
+37-0llvm/test/CodeGen/DirectX/ShaderFlags/atomic64-typed-resource.ll
+34-0llvm/test/CodeGen/DirectX/ShaderFlags/atomic64-groupshared.ll
+21-0llvm/lib/Target/DirectX/DXILShaderFlags.cpp
+92-03 files

LLVM/project 59d697ellvm/lib/Target/AMDGPU AMDGPURegBankLegalizeRules.cpp, llvm/test/CodeGen/AMDGPU/GlobalISel minimumnum-maximumnum-salu-float.ll

[AMDGPU][GlobalISel] RegBankLegalize rules for G_FMINIMUMNUM, G_FMAXIMUMNUM
DeltaFile
+63-0llvm/test/CodeGen/AMDGPU/GlobalISel/minimumnum-maximumnum-salu-float.ll
+12-2llvm/lib/Target/AMDGPU/AMDGPURegBankLegalizeRules.cpp
+75-22 files

LLVM/project 8bbc280.github/workflows release-documentation.yml

Debug
DeltaFile
+1-0.github/workflows/release-documentation.yml
+1-01 files

LLVM/project 71193bd.github/workflows release-documentation.yml

Fix
DeltaFile
+1-1.github/workflows/release-documentation.yml
+1-11 files

LLVM/project e555d37.github/workflows release-documentation.yml

Fixes
DeltaFile
+3-3.github/workflows/release-documentation.yml
+3-31 files

LLVM/project afa7571.github/workflows release-documentation.yml

Fix matrix
DeltaFile
+9-8.github/workflows/release-documentation.yml
+9-81 files

LLVM/project 7bd0ad1.github/workflows release-documentation.yml

ebug
DeltaFile
+0-5.github/workflows/release-documentation.yml
+0-51 files

LLVM/project e73f8d8.github/workflows release-documentation.yml

workflows: Merge release-doxygen into release-documenation

These two workflows use the same script and have the same structure,
so it's easier just to have one job that builds both.
DeltaFile
+35-10.github/workflows/release-documentation.yml
+35-101 files

LLVM/project 92ec120.github/workflows release-documentation.yml

Remove permissions
DeltaFile
+0-4.github/workflows/release-documentation.yml
+0-41 files

LLVM/project 36d34c5.github/workflows release-documentation.yml

Revert "XXX: Debug"

This reverts commit ef443b1bebd360a4aad44d46b2a63621ccaba589.
DeltaFile
+7-0.github/workflows/release-documentation.yml
+7-01 files

LLVM/project 32782ca.github/workflows release-documentation.yml

Remove debug
DeltaFile
+0-2.github/workflows/release-documentation.yml
+0-21 files

LLVM/project c431746.github/workflows release-documentation.yml

Debug
DeltaFile
+2-1.github/workflows/release-documentation.yml
+2-11 files

LLVM/project 0f481a0.github/workflows release-documentation.yml

XXX: Debug
DeltaFile
+0-7.github/workflows/release-documentation.yml
+0-71 files

LLVM/project 9b0d19f.github/workflows release-documentation.yml

Fix
DeltaFile
+5-0.github/workflows/release-documentation.yml
+5-01 files

LLVM/project e5cfe95.github/workflows release-documentation.yml, llvm/utils/release build-docs.sh

Fixes and cleanups
DeltaFile
+5-5.github/workflows/release-documentation.yml
+1-1llvm/utils/release/build-docs.sh
+6-62 files

LLVM/project 08a563ellvm/lib/Transforms/InstCombine InstCombineSelect.cpp, llvm/test/Transforms/InstCombine minmax-fp-loop-carried.ll

[InstCombine] Allow detection of nsz on phi in fcmp+select to min/max (#214156)

The nsz could be coming from the phi, so check for
canIgnoreSignBitOfZero first. Fixes a regression from #213133.
DeltaFile
+40-1llvm/test/Transforms/InstCombine/minmax-fp-loop-carried.ll
+3-2llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
+43-32 files

LLVM/project d81e053llvm/utils/release build-docs.sh

debug
DeltaFile
+1-1llvm/utils/release/build-docs.sh
+1-11 files

LLVM/project f1741b4llvm/utils/release build-docs.sh

Revert "Fix typo"

This reverts commit f90c6dd3e5c5855b327b059982eb94d0ab3a0f73.
DeltaFile
+1-1llvm/utils/release/build-docs.sh
+1-11 files

LLVM/project dcee91ellvm/utils/release build-docs.sh

Revert "Fix build of libcxx docs"

This reverts commit 179432674685f1eb5a7546f1fa1434ab75fee36f.
DeltaFile
+11-3llvm/utils/release/build-docs.sh
+11-31 files

LLVM/project fadc6acllvm/utils/release build-docs.sh

Revert "Fix typo"

This reverts commit a5d98fb1210839d7b0fe58b0be77ed6d379226b4.
DeltaFile
+1-1llvm/utils/release/build-docs.sh
+1-11 files

LLVM/project cd58790llvm/utils/release build-docs.sh

Fix typo
DeltaFile
+1-1llvm/utils/release/build-docs.sh
+1-11 files

LLVM/project ec32274llvm/utils/release build-docs.sh

Fix typo
DeltaFile
+1-1llvm/utils/release/build-docs.sh
+1-11 files

LLVM/project 9194138llvm/utils/release build-docs.sh

Fix build of libcxx docs
DeltaFile
+3-11llvm/utils/release/build-docs.sh
+3-111 files

LLVM/project 8406eaf.github/workflows release-documentation.yml

Cleanups
DeltaFile
+0-18.github/workflows/release-documentation.yml
+0-181 files

LLVM/project 96bd0a6.github/workflows release-documentation.yml

More fixes
DeltaFile
+21-6.github/workflows/release-documentation.yml
+21-61 files