- May 21, 2024
-
-
Michael Kruse authored
-
Michael Kruse authored
-
Nikita Popov authored
This was one of the last leftovers still using a Create-style instead of Fold-style API. Convert FoldICmp into FoldCmp so it can handle both icmp and fcmp.
-
hev authored
This PR enables interleaved vectorization for LoongArch, with a default interleaving factor of `2`.
-
Nikita Popov authored
Use ConstantFoldCompareInstOperands() instead.
-
Vlad Serebrennikov authored
-
Ramkumar Ramachandra authored
Lift out the long lambdas into static functions, use C++ destructing syntax, and fix other minor things to improve the readability of the function.
-
Cullen Rhodes authored
vector.transpose ops whose inputs come from vector.transfer_read can be eliminated by folding the transpose into the xfer op to enable in-flight transposition when converting xfer read to arm_sme.tile_load.
-
Ramkumar Ramachandra authored
21419071 (InstSimplify: increase shufflevector test coverage) was recently merged as a pre-commit test for some work that was misguided. It turns out that InstSimplify can never work on those tests, but the tests are useful nevertheless; move them to VectorCombine to support the development of VectorCombine::foldShuffleToIdentity.
-
Ramkumar Ramachandra authored
foldIdentityShuffles requires two sets of canceling shuffles. If there are any intervening instructions, they are feeding in the result of the first set of shuffles. To eliminate the two sets of shuffles, you'd have to rewrite the head of the intervening instructions to feed in the operand of the first set of shuffles. Since modifying the IR in any way is disallowed by an analysis, strip this bad TODO.
-
Yuxuan Chen authored
-
Piyou Chen authored
This patch try to get rid of vsetvl implict vl/vtype def-use chain and improve the register allocation quality by moving the vsetvl insertion pass after RVV register allocation It will gain the benefit for the following optimization from 1. unblock scheduler's constraints by removing vl/vtype def-use chain 2. Support RVV re-materialization 3. Support partial spill This patch add a new option `-riscv-vsetvl-after-rvv-regalloc=<1|0>` to control this feature and default set as disable.
-
Nikita Popov authored
The code was essentially already ready to handle multiple indices -- we only need to adjust the non-negative index check to check all indices, instead of only the first one.
-
zhongyunde 00443407 authored
We remove the combine for fmuladd with fast flag on PR90434, and add these tests with reduced flags to show they have identity results.
-
zhongyunde 00443407 authored
We should treat fmuladd like an fma intrinsic, and any regressions need to be addressed by dealing with fma/fmuladd in other contexts.
-
Craig Topper authored
I think the behaviors are the same if this describes their behavior. AVGFLOORS sign extends the inputs by 1 bit, adds them, then does an arithmetic shift right by 1 before truncating to the original bit width. This is vaadd with rdn rounding mode. AVGCEILS sign extends the inputs by 1 bit, adds them, then does an arithmetic shift right by 1. If the bit shifted out is 1, it adds 1 to the shifted value. Then truncates to the original bit width. This is vaadd with rnu rounding mode. I think this wasn't implemented previously because there was some confusion about what average means. Some may expect average to round towards zero, but there is no way to do that in RISC-V or with the SelectionDAG nodes. Related issue https://github.com/riscv/riscv-v-spec/issues/935
-
henke9600 authored
Found this while trying to build a LLVM toolchain reproducibly from both Debian 12 and FreeBSD 14. With these changes they come out bit-by-bit identical. Previously there was a mix of stable and unstable sorts for slices, now only stable sorts are used.
-
Luke Lau authored
We have two rules in needVSETVLI where we can relax the demanded fields for slides and splats when VL=1. However these aren't present in getDemanded which prevents us from coalescing some vsetvlis around slides and splats in the backwards pass. The reasoning as to why they weren't in getDemanded is that these require us to check the value of the AVL operand, which may be stale in the backwards pass: the actual VL or VTYPE value may differ from what was precisely requested in the pseudo's operands. Using the original operands should actually be fine though, as we only care about what was originally demanded by the instruction. The current value of VL or VTYPE shouldn't influence this. This addresses some of the regressions we are seeing in #70549 from splats and slides getting reordered.
-
Matt Arsenault authored
This avoids depending on pre/post link runs. Depends #92595
-
Kazu Hirata authored
-
Adrian Kuegel authored
-
Nikita Popov authored
-
Anchu Rajendran S authored
omp masked directive in OpenMP 5.2 allows to specify code regions which are expected to be executed by thread ids specified by the programmer. Filter clause of the directive allows to specify the thread id. This change adds the parsing support for the directive
-
Cyndy Ishida authored
-
Luke Lau authored
In needVSETVLI used by the forward insertion pass, we have some rules where we can relax the demanded fields for slides and splats when VL=1. However this only works if we don't increase LMUL to anything > M1 otherwise we would end up clobbering random registers. Rather than check the VSETVLIInfo we're transitioning to, store this information in DemandedFields and have isCompatible check it. That way an upcoming patch can share these VL=1 rules with RISCVCoalesceVSETVLI, which uses isCompatible and not needVSETVLI.
-
Brandon Wu authored
The ratified information can be found here: https://wiki.riscv.org/display/HOME/Ratified+Extensions
-
Brandon Wu authored
The NumVectors other than 1 is handled by the code above.
-
Owen Pan authored
-
James Y Knight authored
(Because ptxas-12 no longer supports 32-bit.) Fixes c5b11a71 and 8da3a8f5.
-
Jon Chesterfield authored
-
Kazu Hirata authored
-
Muhammad Omair Javaid authored
This reverts commit 2a97b507. It has broken LLVM testsuite on various bots https://lab.llvm.org/buildbot/#/builders/184/builds/12760 https://lab.llvm.org/buildbot/#/builders/197/builds/14376 https://lab.llvm.org/buildbot/#/builders/179/builds/10176
-
Matheus Izvekov authored
-
Younan Zhang authored
We previously doubled the id-expression expansion, even when the pack was expanded to empty. The previous condition for determining whether we should expand couldn't distinguish between cases where 'the expansion was previously postponed' and 'the expansion occurred but resulted in emptiness.' In the latter scenario, we crash because we have not been examining the current lambda's parent local instantiation scope since [D98068](https://reviews.llvm.org/D98068): Any Decls instantiated in the parent scope are not visible to the generic lambda, and thus any attempt of looking for instantiated Decls in the lambda is capped to the current Lambda's LIS. Fixes https://github.com/llvm/llvm-project/issues/92230
-
Heejin Ahn authored
When using other specific exception options in Clang, such as `-fseh-exceptions` or `-fsjlj-exceptions`, Clang defines a corresponding preprocessor such as `-D__USING_SJLJ_EXCEPTIONS__`. Emscripten does that in our own build system: https://github.com/emscripten-core/emscripten/blob/7dcd7f40749918e141dc33397d2f4311dd80637a/tools/system_libs.py#L1577-L1578 But to make Wasm EH usable in non-Emscripten toolchain, this has to be defined somewhere else. This PR makes Wasm EH consistent with other exception scheme by letting it defined by Clang depending on the exception option. We have been using `__USING_WASM_EXCEPTIONS__` in our current library code, but this changes it to `__WASM_EXCEPTIONS__` for its conciseness, and I will update other parts of LLVM as follow-ups. This does not break anything currently working, because we have not been defining anything in Clang so far.
-
Shilei Tian authored
[AMDGPU] Fix an issue that wrong index is used in calculation of byte provider when the op is extract_vector_elt (#91697) Fixes: SWDEV-460097
-
Fangrui Song authored
Fix #92761 Fix #92762
-
Min-Yih Hsu authored
Some processors might have different latencies and/or rthroughput for slide up and down operations on integer vectors, yet there is only a single SchedWrite for both of them at this moment. This patch splits this SchedWrite into two as well as drop the "I" before "Slide" since such information is redundant. We also do the same renaming on `WriteVISlideI`. Note that we only split the X variant (i.e. using a register value for index offset) for now. This is effectively NFC.
-
Amir Ayupov authored
Exempt special symbols (hot text/data and _end symbol) from normal handling. We only need to set their value and make them absolute. If these symbols are handled as normal symbols and if they alias functions we may create non-sensical symbols, e.g. __hot_start.cold. Test Plan: updated hot-end-symbol.s Reviewers: maksfb, rafaelauler, ayermolo, dcci Reviewed By: dcci, maksfb Pull Request: https://github.com/llvm/llvm-project/pull/92713
-
Craig Topper authored
-