LLVM/project 5759a3aclang/test/CodeGenOpenCL builtins-amdgcn-gfx1250.cl, llvm/lib/Target/AMDGPU SIISelLowering.cpp SOPInstructions.td

[AMDGPU] Add s_wakeup_barrier instruction for gfx1250 (#170501)

DeltaFile
+41-0llvm/test/CodeGen/AMDGPU/s-wakeup-barrier.ll
+25-4llvm/lib/Target/AMDGPU/SIISelLowering.cpp
+15-0clang/test/CodeGenOpenCL/builtins-amdgcn-gfx1250.cl
+14-0llvm/lib/Target/AMDGPU/SOPInstructions.td
+14-0llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp
+12-0llvm/test/MC/AMDGPU/gfx1250_asm_sop1.s
+121-412 files not shown
+160-1118 files

LLVM/project 804e768llvm/lib/CodeGen/SelectionDAG DAGCombiner.cpp, llvm/test/CodeGen/X86 avgfloors-scalar.ll avgflooru-scalar.ll

[DAG] Recognise AVGFLOOR (((A >> 1) + (B >> 1)) + (A & B & 1)) patterns (#169644)

Recognise 'LSB' style AVGFLOOR patterns.

Alive2:
[https://alive2.llvm.org/ce/z/nfSSk_](https://alive2.llvm.org/ce/z/nfSSk_)

Fixes #53648
DeltaFile
+36-60llvm/test/CodeGen/X86/avgfloors-scalar.ll
+30-66llvm/test/CodeGen/X86/avgflooru-scalar.ll
+15-4llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+81-1303 files

LLVM/project a108881llvm/lib/Target/LoongArch LoongArchISelLowering.cpp LoongArchLSXInstrInfo.td, llvm/test/CodeGen/LoongArch/lasx issue170976.ll

[LoongArch] Custom lowering for vector logical right shifts of integers (#171097)

After PR #169491, the DAG combiner can still recreate vector UDIV in an
illegal type even after type legalization, which is the root cause of
issue #170976.

The optimization introduced in PR #169491 is still desirable, so this
patch adds custom lowering for vector integer logical right shifts to
prevent the DAG from producing nodes with illegal types.

Fixes #170976
DeltaFile
+74-0llvm/test/CodeGen/LoongArch/lasx/issue170976.ll
+74-0llvm/test/CodeGen/LoongArch/lsx/issue170976.ll
+45-2llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp
+25-11llvm/lib/Target/LoongArch/LoongArchLSXInstrInfo.td
+9-18llvm/test/CodeGen/LoongArch/lasx/ir-instruction/avg.ll
+9-18llvm/test/CodeGen/LoongArch/lsx/ir-instruction/avg.ll
+236-494 files not shown
+251-6010 files

LLVM/project 9039721llvm/test/CodeGen/AMDGPU maximumnum.bf16.ll minimumnum.bf16.ll, llvm/test/CodeGen/X86 wide-scalar-shift-by-byte-multiple-legalization.ll

Merge branch 'main' into users/rovka/alloc-vgpr-intrinsic
DeltaFile
+17,522-20,773llvm/test/CodeGen/X86/wide-scalar-shift-by-byte-multiple-legalization.ll
+8,998-11,093llvm/test/CodeGen/AMDGPU/maximumnum.bf16.ll
+8,981-11,098llvm/test/CodeGen/AMDGPU/minimumnum.bf16.ll
+5,975-8,879llvm/test/CodeGen/AMDGPU/shufflevector.v4i64.v4i64.ll
+5,975-8,879llvm/test/CodeGen/AMDGPU/shufflevector.v4p0.v4p0.ll
+7,387-7,087llvm/test/tools/llvm-dwarfdump/X86/simplified-template-names.s
+54,838-67,8098,748 files not shown
+511,427-454,0598,754 files

LLVM/project f5e6cb0llvm/test/tools/llvm-mca/AArch64/Neoverse V3AE-neon-instructions.s V2-neon-instructions.s

Merge branch 'main' into users/rovka/relax-callers-for-chain-funcs
DeltaFile
+780-1,347llvm/test/tools/llvm-mca/AArch64/Neoverse/V3AE-neon-instructions.s
+780-1,347llvm/test/tools/llvm-mca/AArch64/Neoverse/V2-neon-instructions.s
+780-1,347llvm/test/tools/llvm-mca/AArch64/Neoverse/V3-neon-instructions.s
+1,000-1,084llvm/test/tools/llvm-mca/AArch64/Neoverse/N2-neon-instructions.s
+1,000-1,084llvm/test/tools/llvm-mca/AArch64/Neoverse/N3-neon-instructions.s
+1,000-1,084llvm/test/tools/llvm-mca/AArch64/Neoverse/N1-neon-instructions.s
+5,340-7,2931,433 files not shown
+42,274-31,0041,439 files

LLVM/project 62dbe57compiler-rt/lib/sanitizer_common sanitizer_linux.cpp sanitizer_platform_limits_posix.h

[compiler-rt][sanitizer] fix i386 build for Haiku (#171075)

r13 does not provide the trap err.

Co-authored-by: Jerome Duval <jerome.duval at gmail.com>
DeltaFile
+10-2compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp
+1-1compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h
+11-32 files

LLVM/project 56e092cllvm/lib/Target/RISCV/GISel RISCVLegalizerInfo.cpp, llvm/test/CodeGen/RISCV/GlobalISel fp-fcanonicalize.ll legalizer-info-validation.mir

[RISCV][GISel] Legalize the G_FCANONICALIZE instruction (#166162)

DeltaFile
+66-0llvm/test/CodeGen/RISCV/GlobalISel/fp-fcanonicalize.ll
+5-0llvm/lib/Target/RISCV/GISel/RISCVLegalizerInfo.cpp
+2-2llvm/test/CodeGen/RISCV/GlobalISel/legalizer-info-validation.mir
+73-23 files

LLVM/project 885c344mlir/include/mlir/Dialect/OpenMP OpenMPClauses.td OpenMPOps.td, mlir/lib/Dialect/OpenMP/IR OpenMPDialect.cpp

use dims modifer in main num_teams clause itself instead of creating new clause
DeltaFile
+161-51mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp
+48-80mlir/include/mlir/Dialect/OpenMP/OpenMPClauses.td
+76-1mlir/test/Dialect/OpenMP/invalid.mlir
+2-2mlir/test/Dialect/OpenMP/ops.mlir
+1-2mlir/include/mlir/Dialect/OpenMP/OpenMPOps.td
+288-1365 files

LLVM/project 43f0b69clang/include/clang/Basic Builtins.def, clang/lib/AST ASTContext.cpp

[AMDGPU] Removal of language sensitive option for _Float16 and half('e') handling (#170443)

Removing the 'e' handling for the amdgcn builtins as we decided to use
_Float16 for both HIP/C++ and OpenCL
DeltaFile
+2-6clang/lib/AST/ASTContext.cpp
+0-1clang/include/clang/Basic/Builtins.def
+2-72 files

LLVM/project bd9651bmlir/include/mlir/Bindings/Python NanobindAdaptors.h, mlir/test/python/dialects pdl_types.py

[mlir][py] avoid crashing on None contexts in custom `get`s (#171140)

Following a series of refactorings, MLIR Python bindings would crash if
a
dialect object requiring a context defined using
mlir_attribute/type_subclass
was constructed outside of the `ir.Context` context manager. The type
caster
for `MlirContext` would try using `ir.Context.current` when the default
`None`
value was provided to the `get`, which would also just return `None`.
The
caster would then attempt to obtain the MLIR capsule for that `None`,
fail,
but access it anyway without checking, leading to a C++ assertion
failure or
segfault.

Guard against this case in nanobind adaptors. Also emit a warning to the

    [13 lines not shown]
DeltaFile
+14-6mlir/include/mlir/Bindings/Python/NanobindAdaptors.h
+13-0mlir/test/python/dialects/pdl_types.py
+27-62 files

LLVM/project b939293llvm/lib/Target/LoongArch LoongArchISelLowering.cpp

Address weining's comments
DeltaFile
+6-10llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp
+6-101 files

LLVM/project 857b68fllvm/include/llvm/MC MCInstrDesc.h, llvm/test/TableGen target-specialized-pseudos.td RegClassByHwMode.td

[MC] Reorder TARGETInstrTable to shrink MCInstrDesc::ImplicitOffset (#171199)

Put ImplicitOps[] before OperandInfo[] in the generated
TARGETInstrTable. This means that offsets to entries into the (small)
ImplicitOps table do not need to skip over the (large) OperandInfo
table.

This allows shrinking ImplicitOffset from 32 bits to 16 bits
(effectively reverting #138127) which will allow expanding Opcode
instead without increasing the size of MCInstrDesc.
DeltaFile
+30-16llvm/utils/TableGen/InstrInfoEmitter.cpp
+6-6llvm/test/TableGen/target-specialized-pseudos.td
+1-1llvm/test/TableGen/RegClassByHwMode.td
+1-1llvm/include/llvm/MC/MCInstrDesc.h
+38-244 files

LLVM/project 68db47amlir/include/mlir/Bindings/Python NanobindAdaptors.h, mlir/test/python/dialects pdl_types.py

[mlir][py] avoid crashing on None contexts in custom `get`s

Following a series of refactorings, MLIR Python bindings would crash if a
dialect object requiring a context defined using mlir_attribute/type_subclass
was constructed outside of the `ir.Context` context manager. The type caster
for `MlirContext` would try using `ir.Context.current` when the default `None`
value was provided to the `get`, which would also just return `None`. The
caster would then attempt to obtain the MLIR capsule for that `None`, fail,
but access it anyway without checking, leading to a C++ assertion failure or
segfault.

Guard against this case in nanobind adaptors. Also emit a warning to the user
to clarify expectations, as the default message confusingly says that `None` is
accepted as context and then fails with a type error. Using Python C API is
currently recommended by nanobind in this case since the surrounding function
must be marked `noexcept`.

The corresponding test is in the PDL dialect since it is where I first observed
the behavior. Core types are not using the `mlir_type_subclass` mechanism and
are immune to the problem, so cannot be used for checking.
DeltaFile
+14-6mlir/include/mlir/Bindings/Python/NanobindAdaptors.h
+13-0mlir/test/python/dialects/pdl_types.py
+27-62 files

LLVM/project 1c7126dllvm/lib/Transforms/Vectorize VPlan.h VPlanValue.h

[VPlan] Combine LiveIns fields into MapVector (NFC) (#170220)

Combine Value2VPValue and VPLiveIns into a single MapVector LiveIns
field, simplifying users.
DeltaFile
+7-19llvm/lib/Transforms/Vectorize/VPlan.h
+0-5llvm/lib/Transforms/Vectorize/VPlanValue.h
+7-242 files

LLVM/project 5489010flang-rt/lib/runtime assign.cpp

[Flang-rt] Implement same behavior as -O3 for zero-length arrays (#171480)

DeltaFile
+1-1flang-rt/lib/runtime/assign.cpp
+1-11 files

LLVM/project dc8fde0mlir/lib/Target/LLVMIR ModuleImport.cpp, mlir/test/Target/LLVMIR/Import exception.ll constant.ll

[MLIR][LLVMIR] Fix LLVM IR import of ZeroInitializers to constant zero (#171107)

Constant zero aggregate structures are imported to from llvm IR as
undef.
This includes for example LandingPad Instructions which have zero value
filters, structs.

This fixes the import to use the zeroOp to materialize a
zero-initialized constant.
DeltaFile
+55-3mlir/test/Target/LLVMIR/Import/exception.ll
+41-7mlir/test/Target/LLVMIR/Import/constant.ll
+12-13mlir/lib/Target/LLVMIR/ModuleImport.cpp
+2-4mlir/test/Target/LLVMIR/Import/zeroinitializer.ll
+110-274 files

LLVM/project f40c8e7lld/ELF Target.h

ELF: Remove stray ;. NFC
DeltaFile
+1-1lld/ELF/Target.h
+1-11 files

LLVM/project fde8dc7clang/include/clang/Basic BuiltinsAMDGPU.def, clang/lib/CodeGen/TargetBuiltins AMDGPU.cpp

[AMDGPU] Add builtins for wave reduction intrinsics
DeltaFile
+84-0clang/test/CodeGenOpenCL/builtins-amdgcn.cl
+8-0clang/lib/CodeGen/TargetBuiltins/AMDGPU.cpp
+4-0clang/include/clang/Basic/BuiltinsAMDGPU.def
+96-03 files

LLVM/project d0d9992llvm/lib/Target/AMDGPU SIISelLowering.cpp SIInstructions.td, llvm/test/CodeGen/AMDGPU llvm.amdgcn.reduce.fadd.ll llvm.amdgcn.reduce.fsub.ll

[AMDGPU] Add wave reduce intrinsics for double types - 2

Supported Ops: `add`, `sub`
DeltaFile
+1,115-0llvm/test/CodeGen/AMDGPU/llvm.amdgcn.reduce.fadd.ll
+1,102-0llvm/test/CodeGen/AMDGPU/llvm.amdgcn.reduce.fsub.ll
+80-19llvm/lib/Target/AMDGPU/SIISelLowering.cpp
+2-0llvm/lib/Target/AMDGPU/SIInstructions.td
+2,299-194 files

LLVM/project efda519llvm/test/Transforms/LoopVectorize/AArch64 predicated-costs.ll

[LV] Use branch_weights metadata in getPredBlockCostDivisor test. NFC (#171299)

This is more reliable in the event that the trivial fcmp gets folded
away.
DeltaFile
+13-10llvm/test/Transforms/LoopVectorize/AArch64/predicated-costs.ll
+13-101 files

LLVM/project d18cdc9llvm/include/llvm/TargetParser RISCVTargetParser.h, llvm/lib/Target/RISCV RISCVInsertVSETVLI.cpp

[RISCVInsertVSETVLI] Don't allow getSEW/getLMUL to be called for hasSEWLMULRatioOnly(). NFC (#171554)

Refactor some logic in transferBefore to handle hasSEWLMULRatioOnly()
before calling getSEW/getLMUL.

Update adjustIncoming to use getSEWLMULRatio(). Update the interface of
RISCVVType::getSameRatioLMUL to take the ratio instead of SEW and LMUL.
Update the few other callers to call RISCVVType::getSEWLMULRatio first.
DeltaFile
+21-21llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp
+12-6llvm/unittests/TargetParser/RISCVTargetParserTest.cpp
+2-1llvm/lib/Target/RISCV/MCA/RISCVCustomBehaviour.cpp
+1-2llvm/lib/TargetParser/RISCVTargetParser.cpp
+1-2llvm/include/llvm/TargetParser/RISCVTargetParser.h
+37-325 files

LLVM/project fcdac81llvm/lib/Target/RISCV RISCVInstrInfoF.td

[RISCV] Use frmarg instead of ixlenimm in PseudoFROUND. NFC (#171563)

This is expanded with a custom inserter and this immediate will be
copied to the frm operand of a non-pseudo instruction.
DeltaFile
+1-1llvm/lib/Target/RISCV/RISCVInstrInfoF.td
+1-11 files

LLVM/project 13d99e3llvm/lib/Target/RISCV RISCVSchedSiFiveP600.td

[RISCV] Fix wrong use of SiFiveP400GetVLMAX in RISCVSchedSiFiveP600 (#171562)

There is no difference of functionality and I believe this is a
copy-paste mistake. :-)
DeltaFile
+1-1llvm/lib/Target/RISCV/RISCVSchedSiFiveP600.td
+1-11 files

LLVM/project 7464b86llvm/lib/Target/AArch64 AArch64Features.td AArch64Processors.td, llvm/test/CodeGen/AArch64 sve-st1-addressing-mode-reg-imm.ll sve-ld1-addressing-mode-reg-imm.ll

[AArch64][SVE] Add SubtargetFeature to disable lowering unpredicated loads/stores as LDR/STR (#170256)

PR #127837 changed the lowering for unpredicated loads/stores to use LDR/STR instead of LD1/ST1.
However, on some CPUs, such as A64FX, there is a performance difference between LD1/ST1 and LDR/STR.
As a result, the lowering introduced in #127837 can cause a performance regression on these targets.
This patch adds a SubtargetFeature `disable-unpredicated-ld-st-lower` to disable this lowering.
It is enabled for the A64FX target.
DeltaFile
+102-0llvm/test/CodeGen/AArch64/sve-st1-addressing-mode-reg-imm.ll
+100-0llvm/test/CodeGen/AArch64/sve-ld1-addressing-mode-reg-imm.ll
+4-0llvm/lib/Target/AArch64/AArch64Features.td
+2-1llvm/lib/Target/AArch64/AArch64Processors.td
+2-0llvm/lib/Target/AArch64/AArch64InstrInfo.td
+1-1llvm/lib/Target/AArch64/AArch64SVEInstrInfo.td
+211-26 files

LLVM/project 2ea1bfdllvm/lib/Target/AMDGPU SIShrinkInstructions.cpp

[AMDGPU] Make SIShrinkInstructions pass return valid changed state
DeltaFile
+60-35llvm/lib/Target/AMDGPU/SIShrinkInstructions.cpp
+60-351 files

LLVM/project 2f61427llvm/lib/Target/AMDGPU SIShrinkInstructions.cpp

clang-format
DeltaFile
+5-3llvm/lib/Target/AMDGPU/SIShrinkInstructions.cpp
+5-31 files

LLVM/project aebab05llvm/include/llvm/Passes CodeGenPassBuilder.h, llvm/test/CodeGen/AMDGPU llc-pipeline-npm.ll

[NPM] Schedule PhysicalRegisterUsageAnalysis before RegUsageInfoCollectorPass (#168832)

RegUsageInfoCollectorPass requires PhysicalRegisterUsageAnalysis to be valid. this change is required since its a module analysis.
DeltaFile
+3-3llvm/test/CodeGen/AMDGPU/llc-pipeline-npm.ll
+3-1llvm/include/llvm/Passes/CodeGenPassBuilder.h
+6-42 files

LLVM/project 570bceacompiler-rt/lib/scudo/standalone primary64.h

[scudo] Add last release time info to getStats (#170902)

Knowing when the last page release happened can help us figure out if
the page release is skipped or not.
DeltaFile
+15-1compiler-rt/lib/scudo/standalone/primary64.h
+15-11 files

LLVM/project 21871bbllvm/lib/Target/RISCV RISCVISelLowering.cpp RISCVRegisterInfo.td, llvm/test/CodeGen/RISCV/rvv pr171141.ll subregister-undef-early-clobber.mir

[RISCV] Add fractional LMUL register classes for inline assembly. (#171278)

Inline assembly uses the first type from the register class to
connect to the rest of SelectionDAG. By adding fractional LMUL
register classes, we can ensure that this type is the size of the
types we use for fractional LMUL in the rest of SelectionDAG.

This allows us to remove some of the handling we had in
splitValueIntoRegisterParts/joinRegisterPartsIntoValue. This code
was incorrectly handling v16i4 arguments/returns which should be
any_extend to v16i8 to match type legalization. Instead we widened
v16i4 -> v32i4 then bitcasted to v16i8. This merged pairs of i4
elements into an i8 element instead of keeping them as separate
elements that have been extended to i8.

This is an alternative to #171243.
    
Fixes #171141.
DeltaFile
+27-24llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+18-1llvm/lib/Target/RISCV/RISCVRegisterInfo.td
+12-0llvm/test/CodeGen/RISCV/rvv/pr171141.ll
+2-2llvm/test/CodeGen/RISCV/rvv/subregister-undef-early-clobber.mir
+59-274 files

LLVM/project 84e4a4cclang/include/clang/Basic Builtins.def, clang/lib/AST ASTContext.cpp

[AMDGPU] Removal of language sensitive option for _Float16 and half( 'e') handling
DeltaFile
+2-6clang/lib/AST/ASTContext.cpp
+0-1clang/include/clang/Basic/Builtins.def
+2-72 files