- Jul 05, 2022
-
-
Sanjay Patel authored
x - max(x - y, 0) --> min(x, y) x - min(x - y, 0) --> max(x, y) https://alive2.llvm.org/ce/z/2YkqFe issue #55470
-
Sanjay Patel authored
issue #55470
-
Sanjay Patel authored
The test diffs are cosmetic -- but improvements -- because we let instcombine handle replacement. Instead of dropping the old value name, it propagates to the new instruction.
-
Joseph Huber authored
Summary: Currently we just check the extension to set the image kind. This incorrectly labels the `.o` files created during LTO as object files. This patch simply adds a check for the bitcode magic bytes instead.
-
Jonas Hahnfeld authored
RuntimeDyld does not support RISC-V, so it makes sense to enable JITLink by default. This also makes relocations work without support for a large code model. Differential Revision: https://reviews.llvm.org/D129092
-
Simon Pilgrim authored
-
Florian Hahn authored
This fixes an UBSan failure after 644a965c. When using user-provided VFs/ICs (via the force-vector-width / force-vector-interleave options) the scalar cost is zero, which would cause divide-by-zero. When forcing vectorization using the options, the cost of the runtime checks should not block vectorization.
-
Nico Weber authored
- Update `clang-format --help` output after b1f0efc0. - Update `clang-format-diff.py` help text, which apparently hasn't been updated in a while. Since git and svn examples are now part of the help text, remove them in the text following the help text. Differential Revision: https://reviews.llvm.org/D129050
-
owenca authored
Break after a constructor initializer colon only if it's not followed by a comment on the same line. Fixes #41128. Fixes #43246. Differential Revision: https://reviews.llvm.org/D129057
-
Valentin Clement authored
This patch just make the code more similar in each conversion. This patch is part of the upstreaming effort from fir-dev branch. Reviewed By: jeanPerier Differential Revision: https://reviews.llvm.org/D129071
-
Sam McCall authored
The actions table is very compact but the binary search to find the correct action is relatively expensive. A hashtable is faster but pretty large (64 bits per value, plus empty slots, and lookup is constant time but not trivial due to collisions). The structure in this patch uses 1.25 bits per entry (whether present or absent) plus the size of the values, and lookup is trivial. The Shift table is 119KB = 27KB values + 92KB keys. The Goto table is 86KB = 30KB values + 57KB keys. (Goto has a smaller keyspace as #nonterminals < #terminals, and more entries). This patch improves glrParse speed by 28%: 4.69 => 5.99 MB/s Overall the table grows by 60%: 142 => 228KB. By comparison, DenseMap<unsigned, StateID> is "only" 16% faster (5.43 MB/s), and results in a 285% larger table (547 KB) vs the baseline. Differential Revision: https://reviews.llvm.org/D128485
-
Jeff Bailey authored
Using the LLVM rules for install ensures that DESTDIR and other expected variables for an LLVM install work correctly. Tested: Manually with DESTDIR=/tmp/testinstall/ ninja install-llvmlibc Reviewed By: lntue Differential Revision: https://reviews.llvm.org/D129041
-
Benoit Jacob authored
Differential Revision: https://reviews.llvm.org/D129087
-
Florian Hahn authored
Add back remark unintentionally dropped by 644a965c. I will add a LV test separately, so we do not have to rely on a Clang test to catch this.
-
Nicolas Vasilache authored
-
- Jul 04, 2022
-
-
Sander de Smalen authored
This patch adds patterns and tests for subvector insert/extract intrinsics to/from all legal predicate types. Reviewed By: david-arm, kmclaughlin Differential Revision: https://reviews.llvm.org/D128975
-
Craig Topper authored
The vector types aren't legal with soft float. Also disable under NoImplicitFloat for good measure. Fixes PR56351. Differential Revision: https://reviews.llvm.org/D129060
-
Shraiysh Vaishay authored
This patch adds translation for omp.task from OpenMPDialect to LLVM IR Dialect and adds tests for the same. Depends on D71989 Reviewed By: ftynse, kiranchandramohan, peixin, Meinersbur Differential Revision: https://reviews.llvm.org/D123919
-
Sanjay Patel authored
issue #38821
-
Nikita Popov authored
Use ConstantFoldBinaryOpOperands() instead, in preparation for not all binops having a supported constant expression.
-
Nikita Popov authored
The constant expression used in the test will become invalid in the future. Convert the input into bitcode, so we test that auto- upgrade happens gracefully once this is the case.
-
Florian Hahn authored
-
Peter Waller authored
Fixes #56374.
-
luxufan authored
RVV doesn't have immediate field for memory addressing. Currently we build MachineInstructions in PEI to computing stack offset for RVV load store instructions. These instructions were added too late to can be optimized by CSE, LICM... passes. This patch makes FrameIndex SDNodes can't be matched in RVV Load Store instruction selection patterns. So that the FrameIndex SDNodes would be selected as `ADDI GPR, targetframeindex`. There are 2 advantages for such change: 1. Stack objects address computing can be optimized by machine function passes. 2. Since the ADDI instruction's destination register can be used as a temp register, we can save an emergency spill slot. Differential Revision: https://reviews.llvm.org/D128187
-
Florian Hahn authored
This patch replaces the tight hard cut-off for the number of runtime checks with a more accurate cost-driven approach. The new approach allows vectorization with a larger number of runtime checks in general, but only executes the vector loop (and runtime checks) if considered profitable at runtime. Profitable here means that the cost-model indicates that the runtime check cost + vector loop cost < scalar loop cost. To do that, LV computes the minimum trip count for which runtime check cost + vector-loop-cost < scalar loop cost. Note that there is still a hard cut-off to avoid excessive compile-time/code-size increases, but it is much larger than the original limit. The performance impact on standard test-suites like SPEC2006/SPEC2006/MultiSource is mostly neutral, but the new approach can give substantial gains in cases where we failed to vectorize before due to the over-aggressive cut-offs. On AArch64 with -O3, I didn't observe any regressions outside the noise level (<0.4%) and there are the following execution time improvements. Both `IRSmk` and `srad` are relatively short running, but the changes are far above the noise level for them on my benchmark system. ``` CFP2006/447.dealII/447.dealII -1.9% CINT2017rate/525.x264_r/525.x264_r -2.2% ASC_Sequoia/IRSmk/IRSmk -9.2% Rodinia/srad/srad -36.1% ``` `size` regressions on AArch64 with -O3 are ``` MultiSource/Applications/hbd/hbd 90256.00 106768.00 18.3% MultiSourc...ks/ASCI_Purple/SMG2000/smg2000 240676.00 257268.00 6.9% MultiSourc...enchmarks/mafft/pairlocalalign 472603.00 489131.00 3.5% External/S...2017rate/525.x264_r/525.x264_r 613831.00 630343.00 2.7% External/S...NT2006/464.h264ref/464.h264ref 818920.00 835448.00 2.0% External/S...te/538.imagick_r/538.imagick_r 1994730.00 2027754.00 1.7% MultiSourc...nchmarks/tramp3d-v4/tramp3d-v4 1236471.00 1253015.00 1.3% MultiSource/Applications/oggenc/oggenc 2108147.00 2124675.00 0.8% External/S.../CFP2006/447.dealII/447.dealII 4742999.00 4759559.00 0.3% External/S...rate/510.parest_r/510.parest_r 14206377.00 14239433.00 0.2% ``` Reviewed By: lebedev.ri, ebrevnov, dmgreen Differential Revision: https://reviews.llvm.org/D109368
-
Stella Laurenzo authored
The refactor in https://reviews.llvm.org/D128230 introduced a new target and the name is not scoped properly, leading to name collisions on larger projects. It is done properly on the target just below, so applying the same pattern here fixes the issue.
-
Nikita Popov authored
Use ConstantFoldBinaryOpOperands() instead, to prepare for the case where not all binary operators have a constant expression form. I believe this code actually intended to set OnlyIfReduced=true, however ConstantExpr::get() actually accepts a Flags argument at that position (and OnlyIfReducedTy as the next argument), so this ended up creating a constant expression with some random flag (probably exact or nuw depending on which).
-
Valentin Clement authored
The previous code made the assumption that the defining operation is a fir::ConvertOp without checking. This results in segmentation fault in code like the added test. Reviewed By: jeanPerier Differential Revision: https://reviews.llvm.org/D129077
-
Tue Ly authored
Differential Revision: https://reviews.llvm.org/D128994
-
gbreynoo authored
This commit adds: - Additional test coverage of the DELETE and END commands. - File names to be read in the line endings test. - A use of ADDLIB in the nonascii test. Differential Revision: https://reviews.llvm.org/D128838
-
David Green authored
This patch slightly extends the limit on the RecursionMaxDepth inside the SLP vectorizer. It does it only when it hits a load (or zext/sext of a load), which allows it to peek through in the places where it will be the most valuable, without ballooning out the O(..) by any 2^n factors. Differential Revision: https://reviews.llvm.org/D122148
-
Nikita Popov authored
Use ConstantFoldBinaryOpOperands() instead, to handle the case where not all binary ops have a constant expression variant. This is a bit awkward because we only want to pop the element from Ops once we're sure that it has folded.
-
Nikita Popov authored
Use ConstantFoldBinaryOpOperands() instead. This will be important when not all binops have constant expression variants.
-
LLVM GN Syncbot authored
-
Hui Xie authored
Implement `std::ranges::merge`. added unit tests Differential Revision: https://reviews.llvm.org/D128611
-
David Green authored
This in an extension to the code added in D123911 which added vector combine folding of shuffle-select patterns, attempting to reduce the total amount of shuffling required in patterns like: %x = shuffle %i1, %i2 %y = shuffle %i1, %i2 %a = binop %x, %y %b = binop %x, %y shuffle %a, %b, selectmask This patch extends the handing of shuffles that are dependent on one another, which can arise from the SLP vectorizer, as-in: %x = shuffle %i1, %i2 %y = shuffle %x The input shuffles can also be emitted, in which case they are treated like identity shuffles. This patch also attempts to calculate a better ordering of input shuffles, which can help getting lower cost input shuffles, pushing complex shuffles further down the tree. Differential Revision: https://reviews.llvm.org/D128732
-
Nikita Popov authored
This function will become fallible once we don't support constant expressions for all binops, so make sure to check the result.
-
Nikita Popov authored
This operation is fallible, but ConstantFoldConstantImpl() is not. If we fail to fold, we should simply return the original expression. I don't think this can cause any issues right now, but it becomes a problem if once make ConstantFoldInstOperandsImpl() not create a constant expression for everything it possibly could.
-
Valentin Clement authored
Finalization is F2003 and although the runtime supports it already, lowering is not ensuring all the derived type are finalized properly when they should. This will require surveying the places where lowering needs to call it. Add a hard TODO for now. This patch is part of the upstreaming effort from fir-dev branch. Reviewed By: jeanPerier Differential Revision: https://reviews.llvm.org/D129069 Co-authored-by:
Jean Perier <jperier@nvidia.com>
-
Sander de Smalen authored
This patch puts the code to safely bitcast a predicate, and possibly zero any undefined lanes when doing a widening cast, into one place and merges the functionality with lowerConvertToSVBool. This is some cleanup inspired by D128665. Reviewed By: paulwalker-arm Differential Revision: https://reviews.llvm.org/D128926
-