- Mar 15, 2022
-
-
Craig Topper authored
[LegalizeTypes][RISCV][WebAssembly] Expand ABS in PromoteIntRes_ABS if it will expand to sra+xor+sub later. If we promote the ABS and then Expand in LegalizeDAG, then both the sra and the xor will have their inputs sign extended. This generates extra code on RISCV which lacks an i8 or i16 sign extend instructon. If we expand during type legalization, then only the sra will get its input sign extended. RISCV is able to combine this with the sra by doing a shift left followed by an sra. Reviewed By: RKSimon Differential Revision: https://reviews.llvm.org/D121664
-
Craig Topper authored
[DAGCombiner][RISCV] Adjust (aext (and (trunc x), cst)) -> (and x, cst) to sext cst based on target preference RISCV strong prefers i32 values be sign extended to i64. This combine was always zero extending the constant using APInt methods. This adjusts the code so that it calls getNode using ISD::ANY_EXTEND instead. getNode will call TLI.isSExtCheaperThanZExt to decide how to handle the constant. Tests were copied from D121598 where I noticed that we were creating constants that were hard to materialize. Reviewed By: RKSimon Differential Revision: https://reviews.llvm.org/D121650
-
Pavel Labath authored
This reverts commit dddf4ce0. It breaks a couple of tests on macos.
-
Craig Topper authored
This code handles fixed vector SPLAT_VECTOR, but is never called in any tests. We only form fixed vector splat vectors for vXi64 on RV32 as part of DAGCombine. This will be type legalized to SPLAT_VECTOR_PARTS. So the Custom handling for SPLAT_VECTOR is never needed. This patch makes SPLAT_VECTOR for vXi64 'Legal' on RV32 so that DAGCombine will create it, but there's no need for Custom handler. It will still be type legalized to SPLAT_VECTOR_PARTS. Reviewed By: frasercrmck Differential Revision: https://reviews.llvm.org/D121673
-
Alex Brachet authored
-
Alex Brachet authored
Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D121656
-
Yitzhak Mandelbaum authored
Terminators are handled specially in the transfer functions so we need an additional check on whether the analysis has disabled built-in transfer functions. Differential Revision: https://reviews.llvm.org/D121694
-
Sanjay Patel authored
This can be viewed as swapping the select arms: https://alive2.llvm.org/ce/z/jUvFMJ ...so we don't have the 'nsz' problem with the more general fold. This unlocks other folds for the motivating fabs example. This was discussed in issue #38828.
-
Sanjay Patel authored
-
Louis Dionne authored
Prior to this patch, there was no distinction between tests that check basic assertions and tests that check full-fledged iterator debugging assertions. Both were disabled when support for the debug mode is not provided in the dylib, which is stronger than it needs to be. Furthermore, all of the tests using "debug_macros.h" that contain more than one assertion in them were broken -- any code after the first assertion would never be executed. This patch refactors all of our assertion-related tests to: 1. Be enabled whenever they can, i.e. basic assertions tests are run even when the debug mode is disabled. 2. Use the superior `check_assertion.h` (previously `debug_mode_helper.h`) instead of `debug_macros.h`, which allows multiple assertions in the same program. 3. Coalesce some tests into the same file to make them more readable. 4. Use consistent naming for test files -- no more db{1,2,3,...,10} tests. This is a large but mostly mechanical patch. Differential Revision: https://reviews.llvm.org/D121462 -
Simon Moll authored
ISel for experimental.vp.strided.load|store for v256.32 types via lowering to vvp_load|store SDNodes. Reviewed By: kaz7 Differential Revision: https://reviews.llvm.org/D121616
-
Sam Carroll authored
When using `--convert-func-to-llvm=emit-c-wrappers` the attribute arguments of the wrapper would not be created correctly in some cases. This patch fixes that and introduces a set of tests for (hopefully) all corner cases. See https://github.com/llvm/llvm-project/issues/53503 Author: Sam Carroll <sam.carroll@lmns.com> Co-Author: Laszlo Kindrat <laszlo.kindrat@lmns.com> Reviewed By: ftynse Differential Revision: https://reviews.llvm.org/D119895
-
Tue Ly authored
Implement expm1f function that is correctly rounded for all rounding modes. This is based on expf implementation. From exhaustive testings, using expf implementation, and subtract 1.0 before rounding the final result to single precision gives correctly rounded results for all |x| > 2^-4 with 1 exception. When |x| < 2^-25, we use x + x^2 (implemented with a single fma). And for 2^-25 <= |x| <= 2^-4, we use a single degree-8 minimax polynomial generated by Sollya. Reviewed By: sivachandra, zimmermann6 Differential Revision: https://reviews.llvm.org/D121574
-
Simon Pilgrim authored
[InstCombine] Add general constant support to eq/ne icmp(add(X,C1),add(Y,C2)) -> icmp(add(X,C1-C2),Y) fold A further extension for Issue #32161 For eq/ne comparisons - the sign mismatch and bounds constraints are redundant, so if the that fold fails, fallback and just fold the constants directly. https://alive2.llvm.org/ce/z/cdodNQ The loop rotation test change looks mostly benign - the backend doesn't seem to suffer? https://gcc.godbolt.org/z/dErMY78To Differential Revision: https://reviews.llvm.org/D121551
-
Simon Pilgrim authored
Perform the mask inside parentheses before applying the offset
-
Ties Stuij authored
Reviewed By: amilendra Differential Revision: https://reviews.llvm.org/D121206
-
Arnamoy Bhattacharyya authored
Patch adds a new operation for the SIMD construct. The op is designed to be very similar to the existing `wsloop` operation, so that the `CanonicalLoopInfo` of `OpenMPIRBuilder` can be used. Reviewed By: shraiysh Differential Revision: https://reviews.llvm.org/D118065
-
Steven Wu authored
Fix darwin interface test after D121464. asan_rtl_x86_64.S is not available on Darwin. Reviewed By: kstoimenov Differential Revision: https://reviews.llvm.org/D121636
-
LLVM GN Syncbot authored
-
Wael Yehia authored
Revert "Load pass plugins during option processing, so that plugin options are registered and live." This reverts commit 5e8700ce.
-
Simon Pilgrim authored
Revert rG9c542a5a "Lower `@llvm.global_dtors` using `__cxa_atexit` on MachO" Mane of the build bots are complaining: Unknown command line argument '-lower-global-dtors'
-
Pavel Labath authored
Avoids polluting the namespace of all files including the header.
-
Wael Yehia authored
-
Pavel Labath authored
The decision which categories are relevant for a particular test run happen very early in the test setup process. They use the SBPlatform object to determine which categories should be skipped. The platform object created for this purpose transcends individual test runs. This setup is not compatible with the direction discussed in <https://discourse.llvm.org/t/multiple-platforms-with-the-same-name/59594> -- when platform objects are tied to a specific (SB)Debugger, they need to be created alongside it, which currently happens in the test setUp method. This patch is the first step in that direction -- it rewrites the category skipping logic to avoid depending on a global SBPlatform object. Fortunately, the skipping logic is fairly simple (and I believe it outght to stay that way) and mainly consists of comparing the platform name against some hardcoded lists. This patch bases this comparison on the platform name instead of the os part of the triple (as reported by the platform). Differential Revision: https://reviews.llvm.org/D121605
-
Florian Hahn authored
@mul_may_overflow_var_nonzero_minabsvarindex_one_index shows BasicAA incorrectly determining noalias for (%gep.917, i8* %gep.idx). If %v == 10581764700698480926, %idx == 917 and the GEPs alias. https://alive2.llvm.org/ce/z/yzDgnn
-
Matthias Springer authored
This improves the modularity of the bufferization. From now on, all ops that do not implement BufferizableOpInterface are considered hoisting barriers. Previously, all ops that do not implement the interface were not considered barriers and such ops had to be marked as barriers explicitly. This was unsafe because we could've hoisted across unknown ops where it was not safe to hoist. As a side effect, this allows for cleaning up AffineBufferizableOpInterfaceImpl. This build unit no longer needed and can be deleted. Differential Revision: https://reviews.llvm.org/D121519
-
Marek Kurdej authored
Fixes https://github.com/llvm/llvm-project/issues/54257. Reviewed By: MyDeveloperDay, HazardyKnusperkeks, owenpan Differential Revision: https://reviews.llvm.org/D121456
-
Simon Pilgrim authored
[X86] combineSelect - canonicalize (vXi1 bitcast(iX Cond)) with combineToExtendBoolVectorInReg before legalization This replaces the attempt in 20af71f8 to use combineToExtendBoolVectorInReg to create X86ISD::BLENDV masks directly, instead we use it to canonicalize the iX bitcast to a sign-extended mask and then truncate it back to vXi1 prior to legalization breaking it apart. Fixes #53760
-
Marek Kurdej authored
Fixes https://github.com/llvm/llvm-project/issues/54374.
-
Florian Hahn authored
Also update test to not use branch on undef.
-
Dmitry Makogon authored
This method just calls LazyValueInfoImpl::clear
-
Marek Kurdej authored
Fixes https://github.com/llvm/llvm-project/issues/54245. Reviewed By: MyDeveloperDay, HazardyKnusperkeks, owenpan Differential Revision: https://reviews.llvm.org/D121584
-
Ivan Butygin authored
Introduce OpenCL-style global_id op and corresponding spirv lowering. Differential Revision: https://reviews.llvm.org/D121548
-
Ivan Butygin authored
Differential Revision: https://reviews.llvm.org/D121601
-
Matthias Springer authored
This makes bufferization more modular. This is in preparation of future refactorings. Differential Revision: https://reviews.llvm.org/D121362
-
Nikita Popov authored
Hardcode the function type as ParallelTask, which is the guaranteed pointee type of this runtime function argument (if pointee types exist). The elimination of the callee bitcast is left for InstCombine. Differential Revision: https://reviews.llvm.org/D120885
-
Matthias Springer authored
Differential Revision: https://reviews.llvm.org/D121361
-
Jean Perier authored
`semantics::IsSaved()` was not applying -Msave/-fno-automatic for main programs. This caused issues since lowering relies on it to allocate static variables. This did not match nvfortran/gfortran behaviors where -fno-automatic/-Msave control the static allocation of scalars in main programs. Some program may rely on main program scalars to be statically allocated in bss (and therefore initialized to zero) with -Msave/-fno-automatic flags. Differential Revision: https://reviews.llvm.org/D121603
-
Matthias Springer authored
Also add a TODO to switch to a custom walk instead of the GreedyPatternRewriter, which should be more efficient. (The bufferization pattern is guaranteed to apply only a single time for every op, so a simple walk should suffice.) We currently specify a top-to-bottom walk order. This is important because other walk orders could introduce additional casts and/or buffer copies. These canonicalize away again, but it is more efficient to never generate them in the first place. Note: A few of these canonicalizations are not yet implemented. Differential Revision: https://reviews.llvm.org/D121518
-
Siva Chandra Reddy authored
-