LLVM/project f842c96clang/include/clang/Basic HLSLIntrinsics.td, clang/lib/Headers/hlsl hlsl_intrinsic_helpers.h

[HLSL][LongVector] Implement fmod (#224123)

resolves https://github.com/llvm/llvm-project/issues/220649

This is as much a refactor as it is adding long vector support.

I noticed the fmod helper had many issues. THe SPIR-V implementatiion
wasn't properly put into a SPIR-V macro

fmod had a scalar \ vector version that was unecessary.

The tests seemed to be raw register defines so
source code changes caused the names to all change.

Fixing this meant we could simplify the tablegen
and helpers.

Also the tests are much more clean with no -D defines
DeltaFile
+99-102clang/test/CodeGenHLSL/builtins/fmod.hlsl
+4-17clang/lib/Headers/hlsl/hlsl_intrinsic_helpers.h
+2-11clang/include/clang/Basic/HLSLIntrinsics.td
+2-10clang/test/SemaHLSL/BuiltIns/fmod-errors.hlsl
+107-1404 files

LLVM/project 5a24d15libc/src/grp getgrgid.cpp getgrnam.cpp, libc/test/src/grp CMakeLists.txt getgrgid_test.cpp

[libc] Add getgrnam and getgrgid entrypoints (#224858)

Add the non-reentrant group database lookup entrypoints getgrnam and
getgrgid.

Both entrypoints delegate to grp::find_by_name and grp::find_by_gid,
sharing the single static DynamicBuffer and struct group with getgrent
as permitted by POSIX. Because endgrent closes the file stream without
freeing the shared buffer, calling endgrent does not invalidate pointers
returned by getgrnam or getgrgid.

* Add getgrnam and getgrgid entrypoints
* Add non-reentrant find_by_name and find_by_gid overloads in grp_utils
* Define getgrnam and getgrgid in include/grp.yaml
* Add hermetic unit tests for getgrnam and getgrgid

Assisted-by: Automated tooling, human reviewed.
DeltaFile
+199-0libc/test/src/grp/getgrnam_test.cpp
+180-0libc/test/src/grp/getgrgid_test.cpp
+50-17libc/src/grp/grp_utils.cpp
+57-0libc/test/src/grp/CMakeLists.txt
+36-0libc/src/grp/getgrnam.cpp
+33-0libc/src/grp/getgrgid.cpp
+555-1710 files not shown
+666-1716 files

LLVM/project 63d3506compiler-rt/test/hwasan/TestCases/Linux decorate-proc-maps.c

[compiler-rt][hwasan] Fix decorate-proc-maps.c test (#225496)

Avoid returning the heap pointer address from main, which causes the
process to exit with a non-zero exit status whenever the lowest byte of
the allocated address is non-zero.

Previously, `malloc(100)` (size class 112) was the first allocation in
its size class, returning page-aligned chunk 0 (`offset 0x00`, exit
code 0). Commit 5a50c15fa686 (#224953) removed `SinkOpts` (48 bytes)
from `llvm::cl::SubCommand`, shrinking `sizeof(SubCommand)` from 160 to
112 bytes. With the internal symbolizer enabled, two pre-main
`ManagedStatic<SubCommand>` allocations now take chunks 0 and 1 in the
112-byte size class, pushing `malloc(100)` to chunk 2 (`offset 0xe0`,
exit code 224).

Assisted-by: Gemini
DeltaFile
+1-2compiler-rt/test/hwasan/TestCases/Linux/decorate-proc-maps.c
+1-21 files

LLVM/project 2bb58d1llvm/lib/Target/AMDGPU SIInstrInfo.cpp GCNDPPCombine.cpp, llvm/lib/Target/AMDGPU/AsmParser AMDGPUAsmParser.cpp

[NFC][AMDGPU] Refactor isDPALU_DPP to only check if the instruction requires the feature (#224373)

Previously the helper function was a combination of checking if the
instruction required the feature and if the feature is available. This
behavior diverges from similar isDPALU_DPP32BitOpc and can cause
confusion. This refactor aligns the two for consistency, and users
should also check if the feature is available if needed.
DeltaFile
+11-12llvm/lib/Target/AMDGPU/GCNDPPCombine.cpp
+4-6llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp
+0-4llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h
+1-0llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
+1-0llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUInstPrinter.cpp
+1-0llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
+18-226 files

LLVM/project 1d471b2libc/include fcntl.yaml, libc/src/fcntl posix_fallocate.h

[libc] Implement posix_fallocate in fcntl (#225475)

Implement the standard POSIX.1-2008 / POSIX.1-2024 function
`posix_fallocate` in `<fcntl.h>`.

Fixes #225469
DeltaFile
+106-0libc/test/src/fcntl/posix_fallocate_test.cpp
+34-0libc/src/fcntl/linux/posix_fallocate.cpp
+26-0libc/src/fcntl/posix_fallocate.h
+23-0libc/test/src/fcntl/CMakeLists.txt
+14-0libc/src/fcntl/linux/CMakeLists.txt
+8-0libc/include/fcntl.yaml
+211-04 files not shown
+221-010 files

LLVM/project cdaed31llvm/test/CodeGen/AMDGPU llvm.amdgcn.wqm.vote.ll

[AMDGPU][NFC] Auto-generate llvm.amdgcn.wqm.vote test checks (#224772)
DeltaFile
+118-31llvm/test/CodeGen/AMDGPU/llvm.amdgcn.wqm.vote.ll
+118-311 files

LLVM/project cf82cfamlir/docs/Tutorials/Toy Ch-6.md

[mlir][docs] Regenerate Toy Ch6 sample output against current main (#225457)

The Ch6 tutorial tells you to run toyc-ch6 with `-emit=mlir-llvm` and
compare against the chapter, but the listings still show typed pointers
like `!llvm<"double*">` and a four-field memref descriptor, and some
lines don't parse at all. #224908 is a beginner hitting exactly that.

This replaces the three listings (LLVM dialect, LLVM IR, optimized LLVM
IR) with what the tool prints today on
`test/Examples/Toy/Ch6/llvm-lowering.mlir`. The LLVM IR listings leave
out the target triple, data layout and `!dbg` metadata since those
depend on the host machine, and the text now says so.

The C++ snippets in the same chapter quoted the old typed-pointer API
for the printf declaration and a pattern list without the memref
patterns, so I updated those to match what's in `examples/toy/Ch6` now,
along with the `dumpLLVMIR` and `runJit` listings. If you'd prefer this
PR stick to the IR output, I can drop those hunks.


    [6 lines not shown]
DeltaFile
+143-98mlir/docs/Tutorials/Toy/Ch-6.md
+143-981 files

LLVM/project b2ccb92.github/workflows ids-check.yml

workflows/ids-check: Don't enable clang project (#225215)

We are only checking the llvm attributes right now, so there is no
reason to enable clang.
DeltaFile
+0-2.github/workflows/ids-check.yml
+0-21 files

LLVM/project b30377ccompiler-rt/test/hwasan/TestCases/Linux decorate-proc-maps.c

[𝘀𝗽𝗿] initial version

Created using spr 1.3.7
DeltaFile
+2-3compiler-rt/test/hwasan/TestCases/Linux/decorate-proc-maps.c
+2-31 files

LLVM/project 892b0a9compiler-rt/test/hwasan/TestCases/Linux decorate-proc-maps.c

split

Created using spr 1.3.7
DeltaFile
+3-2compiler-rt/test/hwasan/TestCases/Linux/decorate-proc-maps.c
+3-21 files

LLVM/project 55ee392compiler-rt/test/hwasan/TestCases/Linux decorate-proc-maps.c

[𝘀𝗽𝗿] initial version

Created using spr 1.3.7
DeltaFile
+3-5compiler-rt/test/hwasan/TestCases/Linux/decorate-proc-maps.c
+3-51 files

LLVM/project 5c90e20.github/workflows libc-overlay-tests.yml libc-fullbuild-tests.yml

[libc] Bump containter to ubuntu 26.04 (#225298)

To pull in the latest CMake.
DeltaFile
+5-5.github/workflows/libc-shared-tests.yml
+2-2.github/workflows/libc-overlay-tests.yml
+2-2.github/workflows/libc-fullbuild-tests.yml
+9-93 files

LLVM/project 623fbcbllvm/test/CodeGen/PISA asm-printer-unsupported-vector-hint-fp128.ll

Add asm-printer-unsupported-vector-hint-fp128.ll test
DeltaFile
+11-0llvm/test/CodeGen/PISA/asm-printer-unsupported-vector-hint-fp128.ll
+11-01 files

LLVM/project d9a1cfallvm/test/CodeGen/PISA asm-printer-special-globals.ll

Add asm-printer-special-globals.ll to test isIgnoredIntrinsicGlobal
DeltaFile
+48-0llvm/test/CodeGen/PISA/asm-printer-special-globals.ll
+48-01 files

LLVM/project b44e203llvm/lib/Target/PISA PISAAsmPrinter.cpp, llvm/test/CodeGen/PISA asm-printer-annotation-globals.ll

Remove the user scan and add a test
DeltaFile
+19-0llvm/test/CodeGen/PISA/asm-printer-annotation-globals.ll
+0-18llvm/lib/Target/PISA/PISAAsmPrinter.cpp
+19-182 files

LLVM/project a126dc0llvm/lib/Target/PISA PISAAsmPrinter.cpp

Document why AsmPrinter::emitGlobalConstant is not used
DeltaFile
+4-0llvm/lib/Target/PISA/PISAAsmPrinter.cpp
+4-01 files

LLVM/project adaa302llvm/lib/Analysis ScalarEvolution.cpp, llvm/test/Transforms/IndVarSimplify exit-value-nowrap-flags.ll

[SCEV] Use SCEVUse to access MulOpLists. (#225450)

After https://github.com/llvm/llvm-project/pull/224974, we can reach
this patch with SCEV Mul expressions with operands that have use-flags.

Update loop to access map with SCEVUse instead of const SCEV *.

Fixes a crash in the added test case.
DeltaFile
+58-0llvm/test/Transforms/IndVarSimplify/exit-value-nowrap-flags.ll
+1-1llvm/lib/Analysis/ScalarEvolution.cpp
+59-12 files

LLVM/project da9d653llvm/lib/Target/PISA PISAAsmPrinter.cpp, llvm/test/CodeGen/PISA asm-printer-unusual-vector-global.ll

Add a test for reportFatalUsageError
DeltaFile
+8-0llvm/test/CodeGen/PISA/asm-printer-unusual-vector-global.ll
+2-3llvm/lib/Target/PISA/PISAAsmPrinter.cpp
+10-32 files

LLVM/project 7fcee06llvm/test/CodeGen/PISA load.ll

Remove -verify-machineinstr
DeltaFile
+2-3llvm/test/CodeGen/PISA/load.ll
+2-31 files

LLVM/project b798e15llvm/lib/Target/PISA PISAAsmPrinter.cpp, llvm/test/CodeGen/PISA asm-printer-fp-inline-asm.mir

Fix printing FP immediates
DeltaFile
+23-0llvm/test/CodeGen/PISA/asm-printer-fp-inline-asm.mir
+9-2llvm/lib/Target/PISA/PISAAsmPrinter.cpp
+32-22 files

LLVM/project 3e921a3llvm/lib/Target/PISA PISAAsmPrinter.cpp

Inline comparison into the assertion
DeltaFile
+3-3llvm/lib/Target/PISA/PISAAsmPrinter.cpp
+3-31 files

LLVM/project 51e8fa6llvm/lib/Target/PISA PISAAsmPrinter.cpp, llvm/test/CodeGen/PISA unreachable.ll store.ll

Fix issues raised in earlier PRs
DeltaFile
+111-93llvm/lib/Target/PISA/PISAAsmPrinter.cpp
+11-0llvm/test/CodeGen/PISA/asm-printer-unsupported-vector-hint.ll
+3-3llvm/test/CodeGen/PISA/load.ll
+2-2llvm/test/CodeGen/PISA/unreachable.ll
+2-2llvm/test/CodeGen/PISA/store.ll
+2-2llvm/test/CodeGen/PISA/return.ll
+131-1026 files

LLVM/project 602fcd6llvm/lib/Target/PISA PISAAsmPrinter.cpp

Formatting fix
DeltaFile
+2-1llvm/lib/Target/PISA/PISAAsmPrinter.cpp
+2-11 files

LLVM/project 3c307ballvm/lib/Target/PISA CMakeLists.txt PISAAsmPrinter.cpp, llvm/test/CodeGen/PISA unreachable.ll return.ll

Add PISA AsmPrinter

Add PISAAsmPrinter to complete the codegen pipeline with end-to-end code
emission.
DeltaFile
+933-0llvm/lib/Target/PISA/PISAAsmPrinter.cpp
+352-0llvm/test/CodeGen/PISA/store.ll
+350-0llvm/test/CodeGen/PISA/load.ll
+37-0llvm/test/CodeGen/PISA/return.ll
+14-0llvm/test/CodeGen/PISA/unreachable.ll
+1-0llvm/lib/Target/PISA/CMakeLists.txt
+1,687-06 files

LLVM/project 6150c06llvm/lib/Target/M68k M68kInstrInfo.cpp

[TableGen][AMDGPU][RFC] Write M68k register names too

M68k is an experimental target, so a build of all targets leaves it
out and the previous commit missed its six callers of getName() and
getRegAsmName(). Write the names instead, as everywhere else.

Co-Authored-By: Claude Opus 5 <noreply at anthropic.com>
DeltaFile
+30-11llvm/lib/Target/M68k/M68kInstrInfo.cpp
+30-111 files

LLVM/project 941601ellvm/include/llvm/CodeGen FunctionLoweringInfo.h, llvm/lib/CodeGen/SelectionDAG StatepointLowering.cpp

DAG: Fix cross-block gc.relocate of constants and allocas (#222894)

This fixes latent "Register not marked live out of predecessor" verifier errors in 
existing statepoint tests when LiveIntervals is run earlier in the pass pipeline. This 
is observable today when using -verify-coalescing in  statepoint tests. The verifier 
check only runs with LiveIntervals, which is first computed as a dependency for the 
RegisterCoalescer, but the coalescer happens to hide the problem before the first 
verifier run with computed LiveIntervals in the existing testcases.

When constants and static allocas are relocated in an invoke statepoint's landing pad, 
LowerAsSTATEPOINT places the virtual register definition after the STATEPOINT call:

  bb.0.entry:
    STATEPOINT ...          ; unwinds to bb.2 before %0 is defined
    %0:gr64 = MOV64ri 1

  bb.2.lpad (landing-pad):
    $rax = COPY %0:gr64     ; reads uninitialized %0 (folded to undef)


    [9 lines not shown]
DeltaFile
+127-0llvm/test/CodeGen/X86/statepoint-relocate-eh.ll
+50-10llvm/lib/CodeGen/SelectionDAG/StatepointLowering.cpp
+25-0llvm/include/llvm/CodeGen/FunctionLoweringInfo.h
+202-103 files

LLVM/project bceecc3clang/lib/StaticAnalyzer/Checkers MallocChecker.cpp

Commit the formatted changes in MallocChecker.
DeltaFile
+1-1clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp
+1-11 files

LLVM/project 124a0d5clang/unittests/Basic FileManagerTest.cpp

[clang][test] Remove unnecessary `FileManager` arguments (#225467)

This test was introduced in commit
dfffaf579f2b4bc9184c23f271a57e1fa1ed6f01 and wrongly passed the file
size and modification time to a lookup function that takes two bools.
This PR fixes that by removing the superfluous arguments.
DeltaFile
+1-1clang/unittests/Basic/FileManagerTest.cpp
+1-11 files

LLVM/project f542556llvm/lib/Analysis ConstraintSystem.cpp, llvm/lib/Transforms/Scalar ConstraintElimination.cpp

[ConstraintElim] Link values to decompositions during queries if needed. (#224623)

Decomposition is context sensitive and uses information at the query
point to determine if operations have the required wrap flags.

This can lead to situation where at the time facts are added, we fail to
decompose an operation (like `%y = add %x, 1`), and only add it as
variable `%y`.

If at query time, we can decompose `%y`, the query will contains `%x`
and `1`
as variable/constant, with no connection to the fact added earlier.

This can pessimize results in some cases. To avoid this, add additional
rows connecting the variable and the decomposition (e.g.` %y ==
decompose
(add %x, 1))` and re-try the query.

For now, only check top-level operands. This helps with a few cases in

    [13 lines not shown]
DeltaFile
+124-0llvm/test/Transforms/ConstraintElimination/decompose-at-use.ll
+55-1llvm/lib/Transforms/Scalar/ConstraintElimination.cpp
+2-0llvm/lib/Analysis/ConstraintSystem.cpp
+181-13 files

LLVM/project 4c6b186llvm/include/llvm/MC MCRegisterInfo.h, llvm/lib/DebugInfo/DWARF DWARFExpressionPrinter.cpp

[TableGen][AMDGPU][RFC] Write register names rather than return them

MCRegisterInfo::getName() and TargetRegisterInfo::getRegAsmName()
return a std::string, which every caller pays for whether or not it
needs one. Replace them with printName() and printRegAsmName(), which
take the stream to write to.

Most callers print the name and are done, and they now write it where
it goes. Where a name goes in the middle of a message, the statement
that built the message becomes several. The callers that do need the
name as a string keep one in a local variable and write into that;
those that look a name up, among them the MIR parser building its map
of every register, reuse one SmallString across the lookups and
allocate less than they did.

DIDumpOptions::GetNameForDWARFReg takes a stream too and says whether
it wrote a name, which its callers used to ask by testing the returned
StringRef for emptiness. The three that fill it in kept a std::string
alive for the StringRef to point at, and no longer need one.

    [2 lines not shown]
DeltaFile
+39-51llvm/lib/DebugInfo/DWARF/DWARFExpressionPrinter.cpp
+25-23llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp
+16-14llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp
+17-13llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
+15-13llvm/include/llvm/MC/MCRegisterInfo.h
+16-11llvm/lib/MCA/HardwareUnits/RegisterFile.cpp
+128-12548 files not shown
+400-28554 files