284178 Commits

Author SHA1 Message Date
Evgenii Kudriashov
5b9e1a5758
[X86][AsmParser] Improve rel8 validation (#126073)
* Check the size of immediate operand of rel8
* Rename AbsMem16 related names to AbsMemMode16 to disambiguate mem size
and mode checks.
2025-03-06 21:45:16 +01:00
Marcus Boay
50219c8af2
[PowerPC] [NFC] Refine PowerPC GISel files according to clang-tidy checks (#129780)
Code cleanup for PowerPC GISel files such as renaming header guards and
removing unused includes.
2025-03-06 15:38:12 -05:00
Paige Lewis
1073a23ca0
Updating variable names (#130136)
Updating variable names within the SystemZAsmParser to comply with
naming conventions.

Co-authored-by: Paige Lewis <paige.lewis@ibm.com>
2025-03-06 15:31:32 -05:00
Florian Hahn
72376e19df
[VPlan] Remove unused VPWidenIntrinsicRecipe constructor (NFC) 2025-03-06 20:24:30 +00:00
Ramkumar Ramachandra
c9e250af8e
[LoopUtils] Rename a var in addDiffRuntimeChecks (NFC) (#130128) 2025-03-06 19:31:18 +00:00
Ramkumar Ramachandra
ddffb74afd
[LV] Strip unreachable SCEV-check blocks (#130079)
emitSCEVChecks checks if SCEVCheckCond matches zero, and returns
nullptr. However, it sets SCEVCheckCond as used before it does this,
which prevents it from being removed during cleanup, resulting in
unreachable blocks being emitted. Fix this.
2025-03-06 19:30:25 +00:00
Ramkumar Ramachandra
00f3089c2e
[LV] Use PatternMatch in emitTransformedIndex (NFC) (#130081) 2025-03-06 19:23:31 +00:00
Mircea Trofin
5f70ed5bda
[nfc] Small fixups (coding style) post- PR #129626 (#129935) 2025-03-06 10:58:14 -08:00
Dmitry Sidorov
7a44ff13d9
[SPIR-V] Add SPV_INTEL_memory_access_aliasing extension (#129800)
Spec can be found here https://github.com/intel/llvm/pull/15225
 TODO for future patches:
- During spec review need to decide whether only FunctionCall or Atomic
instructions can be decorated and if not - move the code around adding
handling for other instructions;
- Handle optional string metadata;
- Handle LLVM atomic instructions;
- Handle SPIR-V friendly atomic calls returning via sret argument.

Signed-off-by: Sidorov, Dmitry <dmitry.sidorov@intel.com>
2025-03-06 19:44:21 +01:00
Alexey Bataev
4959025bbc [SLP]Fix non-determinism in reused elements analysis
Need to use consistent storages for unique elements, when going to
iterate over them to avoid non-determinism in reused elements analysis.

Fixes #130082
2025-03-06 10:12:49 -08:00
Janek van Oirschot
37aad2c119
[AMDGPU][NFC] Update premerged test from #129703 to reflect upstream (#130154) 2025-03-06 17:58:23 +00:00
Daniel Paoliello
16e051f0b9
[win] NFC: Rename EHCatchret to EHCont to allow for EH Continuation targets that aren't catchret instructions (#129953)
This change splits out the renaming and comment updates from #129612 as a non-functional change.
2025-03-06 09:28:44 -08:00
Craig Topper
6e2fd4b269 [ScheduleDAGInstrs] Use Register. NFC 2025-03-06 09:18:26 -08:00
Craig Topper
81089f0fd1 [CodeGen] Use Register::id(). NFC 2025-03-06 09:08:21 -08:00
Craig Topper
bdf50f0292 [CodeGen] Use Register or MCRegister. NFC 2025-03-06 09:08:21 -08:00
Craig Topper
d0b8f5d8b3 [RegisterBankInfo] Use MCRegister instead of Register for getMinimalPhysRegClass. NFC 2025-03-06 09:07:53 -08:00
Craig Topper
68b1fe8628 [LivePhysRegs] Use MCRegister instead of MCPhysReg in interface. NFC 2025-03-06 09:07:53 -08:00
Luke Lau
6d89c042e3
[VPlan] Remove dead AnyOf reduction case in VPReductionRecipe. NFCI (#130048)
From what I understand, we only create VPReductionRecipes for in-loop
reductions, and we don't currently support in-loop AnyOf reductions.

We only create VPReductionRecipes in the !PhiR->isInLoop() section of
adjustRecipesForReductions, and this comment from the initial patch
seems to confirm this
https://reviews.llvm.org/D108136#anchor-inline-1038338, so I think we
can remove this check in the condition logic.

I checked compiling SPEC 2017 with -prefer-inloop-predicates and the
added assertion doesn't trigger.
2025-03-07 01:05:53 +08:00
Janek van Oirschot
cc98b35d0d
[AMDGPU] Masked load vectortype test (#129703) 2025-03-06 17:02:07 +00:00
Alexey Bataev
31845cf06c Revert "[SLP]Fix non-determinism in reused elements analysis"
This reverts commit 3158525afdc3677457712963ef45c83f4f8f900f to fix
a bug revealed in https://lab.llvm.org/buildbot/#/builders/123/builds/14930
2025-03-06 08:59:08 -08:00
Alexey Bataev
3158525afd [SLP]Fix non-determinism in reused elements analysis
Need to use consistent storages for unique elements, when going to
iterate over them to avoid non-determinism in reused elements analysis.

Fixes #130082
2025-03-06 08:51:31 -08:00
Kazu Hirata
92dfc0ffc3
[llvm-jitlink] Avoid repeated hash lookups (NFC) (#129993) 2025-03-06 08:50:21 -08:00
Kazu Hirata
abcab4f7ba
[llvm-dwarfdump] Avoid repeated hash lookups (NFC) (#129991) 2025-03-06 08:50:00 -08:00
Kazu Hirata
afe14bb0e4
[Utils] Avoid repeated hash lookups (NFC) (#129990) 2025-03-06 08:49:36 -08:00
Kazu Hirata
0222b5544e
[IPO] Avoid repeated hash lookups (NFC) (#129987) 2025-03-06 08:49:11 -08:00
Matt Arsenault
15ba2ce7ac
InferAddressSpaces: Replace undef with poison in tests (#130083) 2025-03-06 23:20:46 +07:00
Simon Pilgrim
ea59d17a2a
[X86] getFauxShuffleMask - always match insert_subvector(insert_subvector(undef,sub,0),sub,c) 'subvector splat' patterns (#130115)
The plan is to remove the vXi64 cross lane shuffle constraint entirely, but this special 'splat' case was easy to handle while I fight the remaining regressions.
2025-03-06 16:06:21 +00:00
Vitaly Buka
3ccacc4e44
Revert "[LTO][Pipelines][Coro] De-duplicate Coro passes" (#129977)
Reverts llvm/llvm-project#128654

Breaks FatLTO
https://github.com/llvm/llvm-project/pull/128654#issuecomment-2700053700
2025-03-06 07:57:30 -08:00
Alexey Bataev
1182be503d [SLP]Fix a crash for buildvector nodes with parent phi nodes with same incoming blocks
If trying to find matching buildvector node for another nodes, and both
nodes are used by vectorized phi nodes and are coming from the same
parent block, this nodes should be considered matched to avoid a crash.
2025-03-06 07:42:43 -08:00
Jay Foad
78281fd12c Revert "[AMDGPU] InstCombine llvm.amdgcn.ds.bpermute with uniform arguments (#129895)"
This reverts commit be5149a3158cbce3051629e450950ccb96926365.

It caused build failures in the openmp-offload-amdgpu-runtime buildbot
and others.
2025-03-06 15:05:19 +00:00
Jay Foad
be5149a315
[AMDGPU] InstCombine llvm.amdgcn.ds.bpermute with uniform arguments (#129895) 2025-03-06 14:31:59 +00:00
Jay Foad
757554ee26 Regenerate checks in test/Transforms/InstCombine/AMDGPU/. NFC. 2025-03-06 14:29:34 +00:00
Simon Pilgrim
8eeeddb5ed
[X86] lowerV8I16GeneralSingleInputShuffle - for splat PSHUFW+PSHUFD patterns, widen the splats to encourage combines (#129854)
For vXi16 patterns that lower to splats, ensure that PSHUFW mask splats to the entire LW/HW i64 half and then create a wide PSHUFD mask that splats the whole i64 element - this encourages further combines without depending on any unused elements from undef shuffle mask elements.

Fixes #129276
2025-03-06 14:25:57 +00:00
Jay Foad
d6c0839c9c
[AMDGPU] Reduce size of SGPR arrays in SIInsertWaitcnts. NFC. (#130097) 2025-03-06 13:44:16 +00:00
Dmitri Gribenko
4e6721b70d [llvm] Fix an unused variable warning 2025-03-06 14:43:13 +01:00
Mariusz Sikora
bbabf4e2b8
[AMDGPU][NFC] Update name for BVH Intersect Ray (#130036)
Co-authored-by: Ivan Kosarev <ivan.kosarev@amd.com>
2025-03-06 14:26:11 +01:00
Matt Arsenault
b21663cb5b
SplitKit: Take register class directly from instruction definition (#129727)
This fixes an expensive chesk failure after 8476a5d480304. The issue
was essentially that getRegClassConstraintEffectForVReg was not doing
anything useful, sometimes. If the register passed to it is not present
in the instruction, it is a no-op and returns the original classe. The
Edit->getReg() register may not be the register as it appears in either
the use or def instruction. It may be some split register, so take
the register directly from the instruction being rematerialized.

Also directly query the constraint from the def instruction, with a
hardcoded operand index. This isn't ideal, but all the other
rematerialize
code makes the same assumption.

So far I've been unable to reproduce this with a standalone MIR test. In
the
original case, stop-before=greedy and running the one pass is not
working.
2025-03-06 20:06:35 +07:00
Paul Walker
9ea2da5758 [NFC][LLVM] Refactor llvm/test/CodeGen/AArch64/sve{2}-fcopysign.ll 2025-03-06 12:53:40 +00:00
Jay Foad
59e0704a52
[AMDGPU] Remove RegisterEncoding from SIInsertWaitcnts. NFC. (#130056)
The information in this struct seemed useless. VGPR0 and SGPR0 were
always 0. VGPRL and SGPRL were only used in assertions.
2025-03-06 12:50:00 +00:00
Simon Pilgrim
512ef4c7e3
[X86] Fold VPERMV(MASK,CONCAT(LO,HI)) -> VPERMV3(WIDEN(LO),MASK',WIDEN(HI)) (#129708)
If the VPERMV node is shuffling a source that is concatenated from separate subvectors, attempt to shuffle from the separate subvectors directly using an equivalent VPERMV3 node
2025-03-06 12:44:46 +00:00
hanbeom
5d1029b4a8
[VectorCombine] Handle shuffle of selects (#128032)
(shuffle(select(c1,t1,f1)), (select(c2,t2,f2)), m)
-> (select (shuffle c1,c2,m), (shuffle t1,t2,m), (shuffle f1,f2,m))

The behaviour of SelectInst on vectors is the same as for
`V'select[i] = Condition[i] ? V'True[i] : V'False[i]`.

If a ShuffleVector is performed on two selects, it will be like:
`V'[mask] = (V'select[i] = Condition[i] ? V'True[i] : V'False[i])`

That's why a ShuffleVector with two SelectInst is equivalent to
first ShuffleVector Condition/True/False and then SelectInst that
result.

This patch implements the transforming described above.

Proof: https://alive2.llvm.org/ce/z/97wfHp
Fixes #120775
2025-03-06 12:43:47 +00:00
Andrzej Warzyński
29ff168363
[llvm][docs] Extend docs on GitHub's "squash and merge" (#129497)
From what I’ve observed, some contributors are still unaware that in LLVM, the
PR summary - not the commit messages - is used as the final commit message when
merging. This is especially unclear to those without commit access, as only
users with commit access can edit the commit message before merging.

This PR clarifies that policy and consolidates all relevant information into
`GitHub.rst`, ensuring it is no longer split between `GitHub.rst` and
`Contributing.rst`.

Note, a big part of this change is merely moving text between the docs.
2025-03-06 12:24:41 +00:00
Trevor Gross
5ee1c0b714
[windows] Always pass fp128 arguments indirectly (#128848)
LLVM currently expects `__float128` to be both passed and returned in
xmm registers on Windows. However, this disagrees with the Windows
x86-64 calling convention [1], which indicates values larger than 64
bits should be passed indirectly.

Update LLVM's default Windows calling convention to pass `fp128`
directly.  Returning in xmm0 is unchanged since this seems like a
reasonable extrapolation of the ABI. With this patch, the calling
convention for `i128` and `f128` is the same.

GCC passes `__float128` indirectly, which this also matches. However, it
also returns indirectly, which is not done here. I intend to attempt a
GCC change to also return in `xmm0` rather than making that change here,
given the consistency with `i128`.

This corresponds to the frontend change in [2], see more details there.

[1]:
https://learn.microsoft.com/en-us/cpp/build/x64-calling-convention?view=msvc-170
[2]: https://github.com/llvm/llvm-project/pull/115052
2025-03-06 20:14:11 +08:00
Pedro Lobo
156cdcf2ff
[Assignment Tracking] Replace undef debug info with poison (#129755)
`undef` debug info can be replaced with `poison` debug info.
2025-03-06 12:30:05 +01:00
Sjoerd Meijer
dc9d217f0c
[llvm-exegesis] Follow up of #127564: fix test. NFC. (#130072)
We don't need to run llvm-exegesis for the regression tests, just dump
the object code, so this adds option
--benchmark-phase=assemble-measured-code to achieve that.
2025-03-06 11:02:05 +00:00
Nikita Popov
d9af34f499 [Kaleidoscope] Adjust after Module Triple change
Adjust for #129868.
2025-03-06 11:52:51 +01:00
Matt Arsenault
5faa4130b9
AMDGPU: Add gfx950 cost model tests for minimum and maximum (#130029) 2025-03-06 17:27:36 +07:00
Madhur Amilkanthwar
9deed7d2ef
[GVN][NFC] Fix some more coding standard violations (#130046) 2025-03-06 15:33:02 +05:30
Nikita Popov
f7c0f33d6f [lto] Add TargetParser dependency
To fix the shared libs build after #129868.
2025-03-06 11:01:17 +01:00
Nikita Popov
a685045b9f [AsmParser] Add dependency on TargetParser
Try to fix share libs build after #129868.
2025-03-06 10:43:36 +01:00