History log of /llvm-project/llvm/lib/Target/AMDGPU/AMDGPUCombinerHelper.cpp (Results 1 – 16 of 16)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: llvmorg-21-init, llvmorg-19.1.7
# bbb53d1a 10-Jan-2025 Paul Bowen-Huggett <paulhuggett@mac.com>

[NFC] Make AMDGPUCombinerHelper methods const (#121903)

(This replaces #121740. Sorry for wasting your time.)

This is a follow-up to a previous commit (ee7ca0d) which eliminated
several "TODO: m

[NFC] Make AMDGPUCombinerHelper methods const (#121903)

(This replaces #121740. Sorry for wasting your time.)

This is a follow-up to a previous commit (ee7ca0d) which eliminated
several "TODO: make CombinerHelper methods const" remarks. As promised
in that ealier commit, this change completes the set by also making the
methods of AMDGPUCombinerHelper const so that the Helper member of
AMDGPUPreLegalizerCombinerImpl can be const rather than explicitly
mutable.

show more ...


# fd6f8b3c 06-Jan-2025 Vikash Gupta <Vikash.Gupta@amd.com>

[AMDGPU] [GlobalIsel] Combine Fmul with Select into ldexp instruction. (#120104)

This combine pattern perform the below transformation.

fmul x, select(y, A, B) -> fldexp (x, select i32 (y, a

[AMDGPU] [GlobalIsel] Combine Fmul with Select into ldexp instruction. (#120104)

This combine pattern perform the below transformation.

fmul x, select(y, A, B) -> fldexp (x, select i32 (y, a, b))
fmul x, select(y, -A, -B) -> fldexp ((fneg x), select i32 (y, a, b))

where, A=2^a & B=2^b ; a and b are integers.

It is a follow-up PR to implement the above combine for globalIsel, as
the corresponding DAG combine has been done for SelectionDAG Isel
(#111109)

show more ...


Revision tags: llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4, llvmorg-19.1.3, llvmorg-19.1.2, llvmorg-19.1.1, llvmorg-19.1.0, llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init, llvmorg-18.1.8, llvmorg-18.1.7
# 08d168c5 30-May-2024 Matt Arsenault <Matthew.Arsenault@amd.com>

AMDGPU/GlobalISel: Use correct type for intrinsic ID


Revision tags: llvmorg-18.1.6
# 99ca4084 03-May-2024 Jay Foad <jay.foad@amd.com>

[AMDGPU] Remove unneeded calls to setInstrAndDebugLoc in matchers. NFC.


Revision tags: llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init
# 6eec8013 13-Dec-2023 Piotr Sobczak <piotr.sobczak@amd.com>

[AMDGPU] Min/max changes for GFX12 (#75214)

Co-authored-by: Stanislav Mekhanoshin <Stanislav.Mekhanoshin@amd.com>


Revision tags: llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0
# 1f15e39d 15-Sep-2023 Matt Arsenault <Matthew.Arsenault@amd.com>

AMDGPU/GlobalISel: Don't pointlessly check for convergent intrinsics

The set of handled intrinsics for fneg combines aren't convergent. The only
case we might want to handle is mov_dpp.


Revision tags: llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2
# d9847cde 31-Jul-2023 Sameer Sahasrabuddhe <sameer.sahasrabuddhe@amd.com>

[GlobalISel] convergent intrinsics

Introduced the convergent equivalent of the existing G_INTRINSIC opcodes:

- G_INTRINSIC_CONVERGENT
- G_INTRINSIC_CONVERGENT_W_SIDE_EFFECTS

Out of the targets tha

[GlobalISel] convergent intrinsics

Introduced the convergent equivalent of the existing G_INTRINSIC opcodes:

- G_INTRINSIC_CONVERGENT
- G_INTRINSIC_CONVERGENT_W_SIDE_EFFECTS

Out of the targets that currently have some support for GlobalISel, the patch
assumes that the convergent intrinsics only relevant to SPIRV and AMDGPU.

Reviewed By: arsenm

Differential Revision: https://reviews.llvm.org/D154766

show more ...


Revision tags: llvmorg-17.0.0-rc1
# 7c760b22 27-Jul-2023 Sameer Sahasrabuddhe <sameer.sahasrabuddhe@amd.com>

Restore "[GlobalISel] GIntrinsic subclass to represent intrinsics in Generic Machine IR"

Some opcodes in generic MIR represent calls to intrinsics, where the intrinsic
ID is the first non-def operan

Restore "[GlobalISel] GIntrinsic subclass to represent intrinsics in Generic Machine IR"

Some opcodes in generic MIR represent calls to intrinsics, where the intrinsic
ID is the first non-def operand to the instruction. These are now represented as
a subclass of GenericMachineInstr, and the method MachineInstr::getIntrinsicID()
is now moved to this subclass GIntrinsic.

Some target-defined instructions behave like GMIR intrinsics, and have an
Intrinsic::ID operand. But they should not be recognized as generic intrinsics,
and should not use GIntrinsic::getIntrinsicID(). Separated these out by
introducing a new AMDGPU::getIntrinsicID().

Reviewed By: arsenm, Pierre-vh

Differential Revision: https://reviews.llvm.org/D155556

This restores commit baa3386edb11a2f9bcadda8cf58d56f3707c39fa.
Originally reverted in d0f7850b01cf17e50a4f4b00e3b84dded94df6b8.

show more ...


# d0f7850b 27-Jul-2023 Sameer Sahasrabuddhe <sameer.sahasrabuddhe@amd.com>

Revert "[GlobalISel] GIntrinsic subclass to represent intrinsics in Generic Machine IR"

This reverts commit baa3386edb11a2f9bcadda8cf58d56f3707c39fa.

The changes did not cover all occurrences of th

Revert "[GlobalISel] GIntrinsic subclass to represent intrinsics in Generic Machine IR"

This reverts commit baa3386edb11a2f9bcadda8cf58d56f3707c39fa.

The changes did not cover all occurrences of the deteleted function
MachineInstr::getIntrinsicID().

show more ...


# baa3386e 27-Jul-2023 Sameer Sahasrabuddhe <sameer.sahasrabuddhe@amd.com>

[GlobalISel] GIntrinsic subclass to represent intrinsics in Generic Machine IR

Some opcodes in generic MIR represent calls to intrinsics, where the intrinsic
ID is the first non-def operand to the i

[GlobalISel] GIntrinsic subclass to represent intrinsics in Generic Machine IR

Some opcodes in generic MIR represent calls to intrinsics, where the intrinsic
ID is the first non-def operand to the instruction. These are now represented as
a subclass of GenericMachineInstr, and the method MachineInstr::getIntrinsicID()
is now moved to this subclass GIntrinsic.

Some target-defined instructions behave like GMIR intrinsics, and have an
Intrinsic::ID operand. But they should not be recognized as generic intrinsics,
and should not use GIntrinsic::getIntrinsicID(). Separated these out by
introducing a new AMDGPU::getIntrinsicID().

Reviewed By: arsenm, Pierre-vh

Differential Revision: https://reviews.llvm.org/D155556

show more ...


Revision tags: llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4
# 2f5a116c 07-May-2023 Matt Arsenault <Matthew.Arsenault@amd.com>

AMDGPU: Expand casted f16 fmed3 pattern to fmin/fmax on gfx8

If we have legal f16 instructions but no f16 med3, we can save
one instruction by expanding out the min/max sequence compared
to casting

AMDGPU: Expand casted f16 fmed3 pattern to fmin/fmax on gfx8

If we have legal f16 instructions but no f16 med3, we can save
one instruction by expanding out the min/max sequence compared
to casting to f32 and casting back.

show more ...


Revision tags: llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7
# 67819a72 13-Dec-2022 Fangrui Song <i@maskray.me>

[CodeGen] llvm::Optional => std::optional


Revision tags: llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, working, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init, llvmorg-14.0.6, llvmorg-14.0.5, llvmorg-14.0.4, llvmorg-14.0.3, llvmorg-14.0.2, llvmorg-14.0.1, llvmorg-14.0.0, llvmorg-14.0.0-rc4, llvmorg-14.0.0-rc3, llvmorg-14.0.0-rc2
# 5ff35ba8 11-Feb-2022 Mirko Brkusanin <Mirko.Brkusanin@amd.com>

[AMDGPU][GlobalISel] Fix insert point in FoldableFneg combine

Newly created fneg was built after some of it's uses in some cases.
Now it will be built immediately after instruction whose dst it nega

[AMDGPU][GlobalISel] Fix insert point in FoldableFneg combine

Newly created fneg was built after some of it's uses in some cases.
Now it will be built immediately after instruction whose dst it negates.

Differential Revision: https://reviews.llvm.org/D119459

show more ...


Revision tags: llvmorg-14.0.0-rc1, llvmorg-15-init, llvmorg-13.0.1, llvmorg-13.0.1-rc3, llvmorg-13.0.1-rc2
# 2d303e67 25-Dec-2021 Kazu Hirata <kazu@google.com>

Remove redundant return and continue statements (NFC)

Identified with readability-redundant-control-flow.


Revision tags: llvmorg-13.0.1-rc1
# 3020608b 17-Nov-2021 Simon Pilgrim <llvm-dev@redking.me.uk>

Fix MSVC signed/unsigned mismatch warning. NFC.


# db6bc2ab 17-Nov-2021 Mirko Brkusanin <Mirko.Brkusanin@amd.com>

[AMDGPU][GlobalISel] Fold G_FNEG above when users cannot fold mods

If possible fold fneg into instruction above if users cannot fold mods and we
know it will decrease instruction count.
Follows same

[AMDGPU][GlobalISel] Fold G_FNEG above when users cannot fold mods

If possible fold fneg into instruction above if users cannot fold mods and we
know it will decrease instruction count.
Follows same logic as SDAG combiner in choosing opportunities to combine.

Differential Revision: https://reviews.llvm.org/D112827

show more ...