- May 29, 2024
-
-
David Spickett authored
PR #92245 fixed these tests on Linux. They likely work on FreeBSD too but leaving the xfail for that so it can be confirmed later. Also updated a bugzilla link to one that redirects to Github issues. Relates to issues #43398 and #48751.
-
Yingwei Zheng authored
This patch fold `shl X, cttz(Y)` to `mul (Y & -Y), X` if cttz is unsupported by the target. Alive2: https://alive2.llvm.org/ce/z/AtLN5Y Fixes https://github.com/llvm/llvm-project/issues/84763.
-
Matt Arsenault authored
The operation selection logic here doesn't really work when vector types need to be split. This was also dropping the flags, and losing nnan made the combine from select back to fmin/fmax unrecoverable. Preserve the flags to assist a future commit.
-
Tuan Chuong Goh authored
-
AtariDreams authored
Alive2 Proofs: https://alive2.llvm.org/ce/z/eSinJY https://alive2.llvm.org/ce/z/vyKvde https://alive2.llvm.org/ce/z/dRFsfV I mistakenly reverted this commit as part of a larger set of reverts. Reapplied without changes.
-
Yingwei Zheng authored
See the following case: https://alive2.llvm.org/ce/z/A-fBki ``` define i3 @src(i3 %0) { %2 = mul i3 %0, %0 %3 = mul i3 %2, %0 %4 = mul i3 %3, %0 %5 = mul nsw i3 %4, %0 ret i3 %5 } define i3 @tgt(i3 %0) { %2 = mul i3 %0, %0 %5 = mul nsw i3 %2, %0 ret i3 %5 } ``` https://github.com/llvm/llvm-project/commit/d7aeefebd6b049f017711cd7c6ef5f217a17b673 introduced weight reduction during weights combination of the same operand. As the weight of `%0` changes from 5 to 3, the nsw flag in `%5` should be dropped. However, the nsw flag isn't cleared by `RewriteExprTree` since `%5 = mul nsw i3 %0, %4` is not included in the range of `[ExpressionChangedStart, ExpressionChangedEnd)`. ``` Calculated Rank[] = 3 Combine negations for: %2 = mul i3 %0, %0 Calculated Rank[] = 4 Combine negations for: %3 = mul i3 %0, %2 Calculated Rank[] = 5 Combine negations for: %4 = mul i3 %0, %3 Calculated Rank[] = 6 Combine negations for: %5 = mul nsw i3 %0, %4 LINEARIZE: %5 = mul nsw i3 %0, %4 OPERAND: i3 %0 (1) ADD USES LEAF: i3 %0 (1) OPERAND: %4 = mul i3 %0, %3 (1) DIRECT ADD: %4 = mul i3 %0, %3 (1) OPERAND: i3 %0 (1) OPERAND: %3 = mul i3 %0, %2 (1) DIRECT ADD: %3 = mul i3 %0, %2 (1) OPERAND: i3 %0 (1) OPERAND: %2 = mul i3 %0, %0 (1) DIRECT ADD: %2 = mul i3 %0, %0 (1) OPERAND: i3 %0 (1) OPERAND: i3 %0 (1) RAIn: mul i3 [ %0, #3] [ %0, #3] [ %0, #3] RAOut: mul i3 [ %0, #3] [ %0, #3] [ %0, #3] RAOut after CSE reorder: mul i3 [ %0, #3] [ %0, #3] [ %0, #3] RA: %5 = mul nsw i3 %0, %4 TO: %5 = mul nsw i3 %4, %0 RA: %4 = mul i3 %0, %3 TO: %4 = mul i3 %0, %0 ``` The best way to fix this is to inform `RewriteExprTree` to clear flags of the whole expr tree when weight reduction happens. But I find that weight reduction based on Carmichael number never happens in practice. See the coverage result https://dtcxzyw.github.io/llvm-opt-benchmark/coverage/home/dtcxzyw/llvm-project/llvm/lib/Transforms/Scalar/Reassociate.cpp.html#L323 I think it would be better to drop `IncorporateWeight`. Fixes #91417
-
David Spickett authored
The new tests added in #92014 have been flaky on Linaro's Windows on Arm bot. They appear to be hitting a deadlock trying to clean up the test process. This only happens in async mode and I don't see why this test case needs async mode, so the simple workaround is to stick to sync mode.
-
Andreas Jonson authored
-
Kareem Ergawy authored
Fixes a bug in emiting deacllocation logic when delayed privatization is disabled. I introduced the bug when implementing delayed privatization for allocatables: when delayed privatization is disabled the deacllocation ops are emitted for only one allocatable variables.
-
Lukacma authored
According to the specification in https://github.com/ARM-software/acle/pull/309 this adds the intrinsics ``` svbfloat16x2_t svclamp[_single_bf16_x2](svbfloat16x2_t zd, svbfloat16_t zn, svbfloat16_t zm) __arm_streaming; svbfloat16x4_t svclamp[_single_bf16_x4](svbfloat16x4_t zd, svbfloat16_t zn, svbfloat16_t zm) __arm_streaming; ``` These are available only if __ARM_FEATURE_SME_B16B16 is enabled.
-
Lu Weining authored
- hsa -> amdhsa - Use amdgcn-amd-amd{hsa,pal} for lower-work-group-id-intrinsics-{hsa,pal}.ll respectively -
Simon Camphausen authored
Expressions with the same precedence were not parenthesized and therefore were possibly evaluated in the wrong order depending on the shape of the expression tree. --------- Co-authored-by:
Matthias Gehre <matthias.gehre@amd.com> Co-authored-by:
Corentin Ferry <corentin.ferry@amd.com>
-
Pankaj Dwivedi authored
- Reserved newly selected private memory registers in entry Function Prologue generation. - Added assertion patch in eliminateFrameIndex to ensure register is reserved. Co-authored-by:PankajDwivedi-25 <pankajkumar.divedi@amd.com>
-
Lu Weining authored
The vendor name is mesa but not mesa3d.
-
Simon Pilgrim authored
-
Simon Pilgrim authored
-
Simon Pilgrim authored
-
Simon Pilgrim authored
-
Shengchen Kan authored
This is follow-up for #78901 after validation.
-
Tulio Magno Quites Machado Filho authored
I'd like to nominate myself as another Red Hat representative. I work at the LLVM team at Red Hat contributing to upstream and downstream.
-
Sander de Smalen authored
Unlike `+noneon` we must assume that vector types are available, i.e. it is valid to pass/return vector arguments to and from functions. However, the compiler must make sure to scalarize any vector operations.
-
Daniel Grumberg authored
rdar://128863241
-
David Green authored
This removes the check that both operands of the original shuffle are instructions, which is a relic from a previous version that held more variables as Instructions.
-
AnastasiyaChernikova authored
Fixed some FileChecks in tests. Firstly found in PR89047 (https://github.com/llvm/llvm-project/pull/89047#discussion_r1608909489)
-
Alastair Houghton authored
We don't know the load addresses when this function is called, so it shouldn't be trying to use them to determine whether or not the branch is short. Notably, this will fail in the case where the code is being loaded into a target in such a way that the section offsets differ between the process generating the code and the target process. rdar://127673408
-
jeanPerier authored
hlfir.declare is in charge of ensuring that the lower bounds of its "hlfir entity" output are the ones of the source program. For non-allocatable/non-pointer assumed-ranks where the input descriptor lower bounds may not be ones, the hlfir.declare needs to be lowered to an hlfir.rebox_assumed_rank to set the lower bounds to ones.
-
jeanPerier authored
Enable lowering of assumed-ranks in specification parts under a debug flag. I am using a debug flag because many cryptic TODOs/issues may be hit until more support is added. The development should not take too long, so I want to stay away from the noise of adding an actual experimental flag to flang-new.
-
David Green authored
The test case contains a vpt block with an else predicated instruction. This might not be very unrealistic, but currently crashes due to not being able to handle the else. The instruction would need to be removed. This patch adds some extra checks that none of the instructions in vpt block is else predicated, leaving it using vctp.
-
David Green authored
This is one of the simple additions to shuffleToIdentity that help it look through intermediate zext/sext instructions.
-
Christian Sigg authored
-
Shengchen Kan authored
-
Noah Goldstein authored
We currently do: `(icmp eq/ne (and X, Y), Y)` -> `(icmp eq/ne (and ~X, Y), 0)` if `X` is constant. We can make this more general and do it if `X` is freely invertable (i.e say `X = ~Z`). As well, we can also do: `(icmp eq/ne (and X, Y), Y)` -> `(icmp eq/ne (or X, ~Y), -1)` If `Y` is freely invertible. Proofs: https://alive2.llvm.org/ce/z/yeWH3E Differential Revision: https://reviews.llvm.org/D159059 Closes #84688 -
Noah Goldstein authored
-
Pavel Labath authored
I've found them very useful as a rudimentary form of benchmark.
-
Pavel Labath authored
DebugNamesDWARFIndex was jumping through hoops to construct a DIERef from an index entry only to jump through them back a short while later to construct a DWARFDIE. This used to be necessary as the index lookup was a two stage process, where we first enumerated all matches, and then examined them (so it was important that the enumeration was cheap -- does not trigger unnecessary parsing). However, now that the processing is callback based, we are always immediately examining the DWARFDIE right after finding the entry, and the DIERef just gets in the way.
-
Antonio Frighetto authored
While reassociating expressions, LICM is required to invalidate SCEV results, as otherwise subsequent passes in the pipeline that leverage LICM foldings (e.g. IndVars), may reason on invalid expressions; thus miscompiling. This is achieved by rewriting the reassociable instruction from scratch. Fixes: https://github.com/llvm/llvm-project/issues/91957.
-
Antonio Frighetto authored
-
Guray Ozen authored
Using `for_` is very hand with python bindings. Currently, it doesn't support results, we had to fallback to two lines scf.for. This PR yields results of scf.for in `for_` --------- Co-authored-by:Maksim Levental <maksim.levental@gmail.com>
-
MagentaTreehouse authored
Construct `Twine`s before concatenation.
-
Pengcheng Wang authored
Previously, we just check if the source is a virtual register and this prevents some potential hoists. We can see some improvements in AArch64/RISCV tests.
-