LLVM/project e4722c6llvm/include/llvm/Support KnownFPClass.h, llvm/lib/Analysis ValueTracking.cpp

InstCombine: Handle exp/exp2/exp10 in SimplifyDemandedFPClass (#173432)

I'm working on optimizing out the tail sequences in the
implementations of the 4 different flavors of pow. These
include chains of selects on the various edge cases.

Related to #64870
DeltaFile
+91-0llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
+34-47llvm/test/Transforms/InstCombine/simplify-demanded-fpclass-exp.ll
+5-24llvm/lib/Analysis/ValueTracking.cpp
+21-0llvm/lib/Support/KnownFPClass.cpp
+3-0llvm/include/llvm/Support/KnownFPClass.h
+154-715 files

LLVM/project 75a0347llvm/include/llvm/ADT iterator.h

[ADT] Fix MSVC build after iterator C++20 fix (#173495)

Fixes an MSCV build issue after the C++20 fix in
https://github.com/llvm/llvm-project/pull/169772. See the [failure
log](https://productionresultssa1.blob.core.windows.net/actions-results/604d315e-edbd-401f-9a85-9ec5fcbc4996/workflow-job-run-99b94847-47a4-5b95-9933-44db3e32a2a7/logs/job/job-logs.txt?rsct=text%2Fplain&se=2025-12-24T11%3A16%3A19Z&sig=3leOtxGMlJmAMzOCtakzD8%2FOQCXF2HfflooR%2Bm%2Bt7Ng%3D&ske=2025-12-24T21%3A53%3A06Z&skoid=ca7593d4-ee42-46cd-af88-8b886a2f84eb&sks=b&skt=2025-12-24T09%3A53%3A06Z&sktid=398a6654-997b-47e9-b12b-9515b896b4de&skv=2025-11-05&sp=r&spr=https&sr=b&st=2025-12-24T11%3A06%3A14Z&sv=2025-11-05)
in the IREE downstream project.

Making IsRandomAccess, IsBidirectional public ensures that they are
always accessible, avoiding the access-related SFINAE ambiguity that
causes different compilers to handle this differently.

The build is passing after this change:
https://github.com/iree-org/iree/actions/runs/20485132054/job/58865989220?pr=22979
DeltaFile
+4-1llvm/include/llvm/ADT/iterator.h
+4-11 files

LLVM/project 6e161f1llvm/lib/Support KnownFPClass.cpp

Use propagateNaN
DeltaFile
+1-4llvm/lib/Support/KnownFPClass.cpp
+1-41 files

LLVM/project 9e8a478llvm/lib/Transforms/InstCombine InstCombineSimplifyDemanded.cpp

Use fcPositive
DeltaFile
+1-2llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
+1-21 files

LLVM/project fd553b6llvm/include/llvm/Support KnownFPClass.h, llvm/lib/Analysis ValueTracking.cpp

Make KnownFPClass::exp not side-effecting
DeltaFile
+9-7llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
+5-9llvm/lib/Analysis/ValueTracking.cpp
+5-5llvm/lib/Support/KnownFPClass.cpp
+1-1llvm/include/llvm/Support/KnownFPClass.h
+20-224 files

LLVM/project 0a74f72llvm/include/llvm/Support KnownFPClass.h, llvm/lib/Analysis ValueTracking.cpp

InstCombine: Handle exp/exp2/exp10 in SimplifyDemandedFPClass

I'm working on optimizing out the tail sequences in the
implementations of the 4 different flavors of pow. These
include chains of selects on the various edge cases.

Related to #64870
DeltaFile
+90-0llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
+34-47llvm/test/Transforms/InstCombine/simplify-demanded-fpclass-exp.ll
+24-0llvm/lib/Support/KnownFPClass.cpp
+2-17llvm/lib/Analysis/ValueTracking.cpp
+3-0llvm/include/llvm/Support/KnownFPClass.h
+153-645 files

LLVM/project fc8ec0dllvm/test/Transforms/InstCombine simplify-demanded-fpclass-exp.ll

InstCombine: Add baseline tests for exp SimplifyDemandedFPClass (#173431)

DeltaFile
+502-0llvm/test/Transforms/InstCombine/simplify-demanded-fpclass-exp.ll
+502-01 files

LLVM/project 3b09719llvm/lib/Analysis ValueTracking.cpp, llvm/test/Transforms/Attributor nofpclass-exp.ll

ValueTracking: Improve handling of exp intrinsic for overflow (#173430)

Teach exp handling that positive inputs cannot introduce overflow,
and negative inputs cannot introduce underflow.
DeltaFile
+24-24llvm/test/Transforms/Attributor/nofpclass-exp.ll
+12-0llvm/lib/Analysis/ValueTracking.cpp
+2-2llvm/test/Transforms/Attributor/AMDGPU/nofpclass-amdgcn-exp.ll
+38-263 files

LLVM/project 94ad86ellvm/lib/Target/AMDGPU SIRegisterInfo.td, llvm/test/CodeGen/AMDGPU amdgcn.bitcast.1024bit.ll load-constant-i1.ll

[AMDGPU] Have VCC as a first-class member of the SGPR pool.

Add VCC and tuples using VCC to SGPR register classes.

We already support VCC as an allocatable register for 32-bit SGPR
operands, so it seems most natural to support it for register
tuple operands as well.

s106/s107 are still not allowed as aliases of vcc_lo/hi in
AsmParser.

The names given to the VCC tuples match those produced by SP3,
though it feels like there is room for improvement.

https://github.com/llvm/llvm-project/issues/62651
DeltaFile
+7,883-7,902llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.1024bit.ll
+729-735llvm/test/CodeGen/AMDGPU/load-constant-i1.ll
+259-255llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.512bit.ll
+245-249llvm/test/CodeGen/AMDGPU/scc-clobbered-sgpr-to-vmem-spill.ll
+55-79llvm/test/CodeGen/AMDGPU/spill-scavenge-offset.ll
+48-21llvm/lib/Target/AMDGPU/SIRegisterInfo.td
+9,219-9,2418 files not shown
+9,296-9,26514 files

LLVM/project d49c752flang/include/flang/Parser parse-tree.h, flang/lib/Parser openmp-parsers.cpp

[flang][OpenMP] Allow INIT clause on DEPOBJ, add depinfo-modifier (#173056)

Co-authored-by: Kareem Ergawy <kareem.ergawy at amd.com>
DeltaFile
+86-32flang/lib/Semantics/check-omp-structure.cpp
+25-14flang/include/flang/Parser/parse-tree.h
+24-12flang/lib/Parser/openmp-parsers.cpp
+29-0flang/test/Semantics/OpenMP/init-clause.f90
+21-2flang/test/Parser/OpenMP/depobj-construct.f90
+17-0flang/lib/Semantics/openmp-modifiers.cpp
+202-605 files not shown
+213-6011 files

LLVM/project 9e86920llvm/lib/Support KnownFPClass.cpp

Use propagateNaN
DeltaFile
+1-4llvm/lib/Support/KnownFPClass.cpp
+1-41 files

LLVM/project 16cf82cllvm/lib/Transforms/InstCombine InstCombineSimplifyDemanded.cpp

Use fcPositive
DeltaFile
+1-2llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
+1-21 files

LLVM/project cdf7dc2llvm/include/llvm/Support KnownFPClass.h, llvm/lib/Analysis ValueTracking.cpp

Make KnownFPClass::exp not side-effecting
DeltaFile
+9-7llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
+5-9llvm/lib/Analysis/ValueTracking.cpp
+5-5llvm/lib/Support/KnownFPClass.cpp
+1-1llvm/include/llvm/Support/KnownFPClass.h
+20-224 files

LLVM/project 373b0b5llvm/test/Transforms/InstCombine simplify-demanded-fpclass-exp.ll

InstCombine: Add baseline tests for exp SimplifyDemandedFPClass
DeltaFile
+502-0llvm/test/Transforms/InstCombine/simplify-demanded-fpclass-exp.ll
+502-01 files

LLVM/project 3ab0543llvm/include/llvm/Support KnownFPClass.h, llvm/lib/Analysis ValueTracking.cpp

InstCombine: Handle exp/exp2/exp10 in SimplifyDemandedFPClass

I'm working on optimizing out the tail sequences in the
implementations of the 4 different flavors of pow. These
include chains of selects on the various edge cases.

Related to #64870
DeltaFile
+90-0llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
+34-47llvm/test/Transforms/InstCombine/simplify-demanded-fpclass-exp.ll
+24-0llvm/lib/Support/KnownFPClass.cpp
+2-17llvm/lib/Analysis/ValueTracking.cpp
+3-0llvm/include/llvm/Support/KnownFPClass.h
+153-645 files

LLVM/project d45cd7dllvm/lib/Analysis ValueTracking.cpp

Adjust comment
DeltaFile
+1-1llvm/lib/Analysis/ValueTracking.cpp
+1-11 files

LLVM/project b6087dellvm/lib/Analysis ValueTracking.cpp

Remove redundant check
DeltaFile
+3-6llvm/lib/Analysis/ValueTracking.cpp
+3-61 files

LLVM/project f2fe6efllvm/lib/Analysis ValueTracking.cpp, llvm/test/Transforms/Attributor nofpclass-exp.ll

positive values never denormal
DeltaFile
+8-8llvm/test/Transforms/Attributor/nofpclass-exp.ll
+2-3llvm/lib/Analysis/ValueTracking.cpp
+10-112 files

LLVM/project 8ce0336llvm/lib/Analysis ValueTracking.cpp, llvm/test/Transforms/Attributor nofpclass-exp.ll

ValueTracking: Improve handling of exp intrinsic for overflow

Teach exp handling that positive inputs cannot introduce overflow,
and negative inputs cannot introduce underflow.
DeltaFile
+24-24llvm/test/Transforms/Attributor/nofpclass-exp.ll
+16-0llvm/lib/Analysis/ValueTracking.cpp
+2-2llvm/test/Transforms/Attributor/AMDGPU/nofpclass-amdgcn-exp.ll
+42-263 files

LLVM/project 92e0cd2llvm/test/Transforms/Attributor nofpclass-exp.ll

ValueTracking: Add baseline tests for computeKnownFPClass exp (#173429)

This is already handled, but misses opportunities. Test cases
where the input is known positive or negative.
DeltaFile
+101-0llvm/test/Transforms/Attributor/nofpclass-exp.ll
+101-01 files

LLVM/project 503c762bolt/lib/Passes PAuthGadgetScanner.cpp, llvm/lib/Target/AVR AVRInstrInfo.td

Rebase

Created using spr 1.3.7
DeltaFile
+171-111bolt/lib/Passes/PAuthGadgetScanner.cpp
+129-121llvm/lib/Target/AVR/AVRInstrInfo.td
+189-0llvm/lib/Target/SPIRV/SPIRVCombinerHelper.cpp
+177-0llvm/lib/Target/X86/GISel/X86PreLegalizerCombiner.cpp
+168-0llvm/test/CodeGen/SPIRV/llvm-intrinsics/matrix-multiply.ll
+74-74llvm/test/Transforms/Attributor/nofpclass-log.ll
+908-306175 files not shown
+2,962-1,015181 files

LLVM/project c8d7e53llvm/include/llvm/Support KnownFPClass.h, llvm/lib/Analysis ValueTracking.cpp

InstCombine: Handle canonicalize in SimplifyDemandedFPClass (#173189)

DeltaFile
+22-45llvm/test/Transforms/InstCombine/simplify-demanded-fpclass-canonicalize.ll
+61-0llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
+5-47llvm/lib/Analysis/ValueTracking.cpp
+50-0llvm/lib/Support/KnownFPClass.cpp
+6-0llvm/include/llvm/Support/KnownFPClass.h
+144-925 files

LLVM/project 10e152bllvm/lib/Target/X86 X86AvoidTrailingCall.cpp X86DynAllocaExpander.cpp

[X86][NewPM] Consistently preserve IR analyses in MF passes (#173759)

DeltaFile
+1-3llvm/lib/Target/X86/X86AvoidTrailingCall.cpp
+1-3llvm/lib/Target/X86/X86DynAllocaExpander.cpp
+1-3llvm/lib/Target/X86/X86FloatingPoint.cpp
+3-93 files

LLVM/project 78dd3baclang/lib/Driver Driver.cpp, clang/test/Driver spirv-amd-toolchain.c

[Driver][SPIRV] Fix regular C/C++ compilation to AMD SPIRV.

Commit 4c6f398 introduced a non-working compilation path for regular C/C++ to AMD SPIRV; this commit fixes it.
For example, 4c6f398 was expecting an assembler phase but it was never supported since there is no assembler available for it.
Thus, the compilation starting from source code failed.

The compilation path is fixed by taking into account that we cannot rely on external dependencies such as spirv-link or spirv-as.
Thus, the backend emits bitcode and the SPIRVAMDToolChain's linker takes care of generating the final SPIRV as we already do for HIP.
DeltaFile
+14-3clang/test/Driver/spirv-amd-toolchain.c
+12-0clang/lib/Driver/Driver.cpp
+26-32 files

LLVM/project 97b44d4clang/lib/Driver Driver.cpp, clang/test/Driver spirv-amd-toolchain.c

[Driver][SPIRV] Fix regular C/C++ compilation to AMD SPIRV.

Commit 4c6f398 introduced a non-working compilation path for regular C/C++ to AMD SPIRV; this commit fixes it.
For example, 4c6f398 was expecting an assembler phase but it was never supported since there is no assembler available for it.
Thus, the compilation starting from source code failed.

The compilation path is fixed by taking into account that we cannot rely on external dependencies such as spirv-link or spirv-as.
Thus, the backend emits bitcode and the SPIRVAMDToolChain's linker takes care of generating the final SPIRV as we already do for HIP.
DeltaFile
+15-3clang/test/Driver/spirv-amd-toolchain.c
+12-1clang/lib/Driver/Driver.cpp
+27-42 files

LLVM/project bc65c30llvm/lib/Target/RISCV/GISel RISCVRegisterBankInfo.cpp RISCVRegisterBankInfo.h, llvm/test/CodeGen/RISCV/GlobalISel get-register-noreserve.ll legalizer-info-validation.mir

[RISCV][GISel] Support select G_READ_REGISTER and G_WRITE_REGISTER (#173815)

DeltaFile
+46-0llvm/test/CodeGen/RISCV/GlobalISel/get-register-noreserve.ll
+13-0llvm/lib/Target/RISCV/GISel/RISCVRegisterBankInfo.cpp
+6-4llvm/test/CodeGen/RISCV/GlobalISel/legalizer-info-validation.mir
+3-0llvm/lib/Target/RISCV/GISel/RISCVRegisterBankInfo.h
+2-1llvm/lib/Target/RISCV/GISel/RISCVLegalizerInfo.cpp
+70-55 files

LLVM/project 843ebcbclang-tools-extra/clang-tidy/readability ImplicitBoolConversionCheck.cpp ImplicitBoolConversionCheck.h, clang-tools-extra/docs ReleaseNotes.rst

[clang-tidy] Enable C99 in `implicit-bool-conversion` and avoid FP with `bool` operands in C23 (#171070)

Closes [#170596](https://github.com/llvm/llvm-project/issues/170596)

---------

Co-authored-by: EugeneZelenko <eugene.zelenko at gmail.com>
Co-authored-by: Baranov Victor <bar.victor.2002 at gmail.com>
DeltaFile
+43-0clang-tools-extra/test/clang-tidy/checkers/readability/implicit-bool-conversion-c99.c
+26-12clang-tools-extra/test/clang-tidy/checkers/readability/implicit-bool-conversion.c
+6-3clang-tools-extra/clang-tidy/readability/ImplicitBoolConversionCheck.cpp
+4-2clang-tools-extra/docs/ReleaseNotes.rst
+5-0clang-tools-extra/docs/clang-tidy/checks/readability/implicit-bool-conversion.rst
+1-1clang-tools-extra/clang-tidy/readability/ImplicitBoolConversionCheck.h
+85-186 files

LLVM/project 57927e9llvm/lib/Transforms/InstCombine InstCombineSelect.cpp, llvm/test/Transforms/InstCombine bit_ceil.ll

[InstCombine] Restrict `foldBitCeil` to power-of-two integer widths (#173849)

The masking rewrite in `foldBitCeil` assumes a power-of-two bitwidth.

For non-power-of-two integer types, `(-ctlz) & (BitWidth - 1)` is not
equivalent to `BitWidth - ctlz` and can miscompile.

This patch restricts the transform to power-of-two bitwidths. 

Alive2 proof: https://alive2.llvm.org/ce/z/i2E6zT

Fixes #173787
DeltaFile
+20-0llvm/test/Transforms/InstCombine/bit_ceil.ll
+2-0llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
+22-02 files

LLVM/project 0258aa6clang/lib/Sema SemaHLSL.cpp

[HLSL] Prevent uninitialized on 2 int arguments (#173352)

Unparsed HLSL semantics have 2 int/bool arguments with default values.
Those values are loaded using checkUInt32Argument, and thus this should
never fail.

But if something is wrong in the code above (or the def changed), this
code wouldn't catch it and we'd read uninitialized integers. This
commits checks both return values and assert if one fails. On release
builds, this would early return, causing a bad codegen, but such change
will be caught by tests.
DeltaFile
+5-3clang/lib/Sema/SemaHLSL.cpp
+5-31 files

LLVM/project b6d7d69clang-tools-extra/clang-tidy/modernize UseUsingCheck.cpp, clang-tools-extra/docs ReleaseNotes.rst

[clang-tidy] Correct fix-it range for function pointer-like typedef in `modernize-use-using` (#173751)

Extends the function case to all function pointer-like cases, because
their source range contains name.
see more in https://github.com/llvm/llvm-project/pull/65558


Closes [#173732](https://github.com/llvm/llvm-project/issues/173732)
DeltaFile
+24-0clang-tools-extra/test/clang-tidy/checkers/modernize/use-using.cpp
+5-3clang-tools-extra/clang-tidy/modernize/UseUsingCheck.cpp
+4-0clang-tools-extra/docs/ReleaseNotes.rst
+33-33 files