- Sep 22, 2021
-
-
Dan F-M authored
In attempting to build JAX on Apple Silicon, we discovered an issue with the bazel configuration in llvm-project-overlay. This patch fixes the logic, at least when building JAX. More context is included on the following GitHub issue: https://github.com/google/jax/issues/5501 Differential Revision: https://reviews.llvm.org/D109839
-
Nikita Popov authored
MergeICmps will currently sort (by offset) all comparisons in a chain, including those that do not get merged. This is problematic in two ways: * We may end up moving the original first block into the middle of the chain, in which case the "extra work" instructions will also be in the middle of the chain, resulting in invalid IR (reported in https://reviews.llvm.org/D108782#3005583). * Reordering branches is generally not legal, because it may introduce branch on poison, which is UB (PR51845). The merging done by MergeICmps is legal as long as we assume that memcmp() works on frozen memory, but the reordering of unmerged comparisons is definitely incorrect (without inserting freeze instructions), so we should avoid it. There are easier ways to fix the first issue, but I figured it was worthwhile to do this properly to also fix the second one. What we now do is to restore the original relative order of (potentially merged) comparisons. I took the liberty of dropping the MERGEICMPS_DOT_ON functionality, because it would be more awkward to implement now (as the before and after representation is different) and it doesn't seem terribly useful nowadays. Differential Revision: https://reviews.llvm.org/D110024
-
David Blaikie authored
-
Christian Sigg authored
Add a PointerProxy similar to the existing iterator_facade_base::ReferenceProxy and return it from the arrow operator. This prevents iterator facades with a reference type that is not a true reference to take the address of a temporary. Forward the reference type of the mapped_iterator to the iterator adaptor which in turn forwards it to the iterator facade. This fixes mlir::op_iterator::operator->() to take the address of a temporary. Make some polishing changes to op_iterator and op_filter_iterator. Reviewed By: rriddle Differential Revision: https://reviews.llvm.org/D109490
-
David Blaikie authored
Now that Clang's been changed to render nullptr types/template parameters as 'std::nullptr_t' do the same thing down here. (Clang commit: 131e8786 )
-
Michael Liao authored
-
David Blaikie authored
This improves diagnostic (& important to me, DWARF) accuracy - otherwise there could be ambiguities between "std::nullptr_t" and some user-defined type that's /actually/ "nullptr_t" defined in the global namespace. Differential Revision: https://reviews.llvm.org/D110044
-
alex-t authored
Normally, given that the DA results are kept consistent over the selection DAG, uniform comparisons get selected to S_CMP_* but divergent to V_CMP_*. Sometimes, for the sake of efficiency, SSA subgraphs may be converted to VALU to avoid repeatedly copying data back and forth. Hence we have to be able to sustain the correctness passing the i1 from VALU to SALU context and vice versa. VALU operations only process the active lanes of the VGPR and ignore inactive ones. Active lanes correspond to 1 bit in the EXEC mask register. SALU represents i1 as just one bit but VALU as 64bits: 0/1 and 0/(0xffffffffffffffff & EXEC) respectively. SALU uses one-bit conditional flag SCC but VALU - VCC that is a pair of 32-bit SGPRs To expose SCC to the VALU context we need to convert the one-bit boolean value to the appropriate 64bit. To return back to the SALU context we need to do the opposite. To correctly convert 64bit VALU boolean to either 0 or 1 we need to filter out the bits corresponding to the inactive lanes. Reviewed By: piotr Differential Revision: https://reviews.llvm.org/D109900
-
Owen Anderson authored
Reviewed By: majnemer Differential Revision: https://reviews.llvm.org/D109988
-
Brendon Cahoon authored
When adding alias.scope and noalias metadata to a memcpy function, the alias.scope and noalias metadata from the operands are merged. The rule for merging alias.scope is to take the intersection of the domains and the union of the scopes within those domains. The rule for merging noalias is to take the intersection. The bug is that AMDGPULowerModuleLDS was using concatenation for both alias.scope and noalias. For example, when f1 and f2 are added to the LDS structure and there is a memcpy(f2, f1, sizeof(f1)). Then, concatenation creates noalias metadata for the memcpy that includes both {f1, f2}. That means that the memcpy is assumed not to alias a prior load of f2, which enables the optimizer to remove a load of f2 that occurs after mempcy. The function MDNode::getmostGenericAliasScope defines the semantics for alias.scope. There is a function, combineMetadata in Local.cpp, that uses intersect for noalias. Differential Revision: https://reviews.llvm.org/D110049 -
Craig Topper authored
This helps the compiler generate better code.
-
Danila Malyutin authored
Fixes pr42770 Differential Revision: https://reviews.llvm.org/D108772
-
Giorgis Georgakoudis authored
Parallel regions are outlined as functions with capture variables explicitly generated as distinct parameters in the function's argument list. That complicates the fork_call interface in the OpenMP runtime: (1) the fork_call is variadic since there is a variable number of arguments to forward to the outlined function, (2) wrapping/unwrapping arguments happens in the OpenMP runtime, which is sub-optimal, has been a source of ABI bugs, and has a hardcoded limit (16) in the number of arguments, (3) forwarded arguments must cast to pointer types, which complicates debugging. This patch avoids those issues by aggregating captured arguments in a struct to pass to the fork_call. Reviewed By: jdoerfert, jhuber6 Differential Revision: https://reviews.llvm.org/D102107
-
Amy Kwan authored
This patch adds a prefixed load pattern involving v2f32 fpext v2f64, where we are dealing with a value with an offset that fits into a 34-bit signed immediate. A reduced test case is also added to patch that tests the pattern, in which the pattern is tested in the big endian CHECKs of the newly added test. Differential Revision: https://reviews.llvm.org/D109887
-
Ayal Zaks authored
This patch fixes the crash found by PR51614: whenever doing tail folding, interleave groups must be considered under mask. Another fix D108900 follows for targets that support masked loads and stores: when *deciding* to vectorize with masked interleave groups, check if the access is reverse - which is currently not supported; rather than (only) asserting when computing cost and generating code. Differential Revision: https://reviews.llvm.org/D108891
-
Craig Topper authored
This requires a minor change to CodeGenPrepare to ensure that shouldSinkOperands will be called for And. Reviewed By: frasercrmck Differential Revision: https://reviews.llvm.org/D110106
-
Nico Weber authored
Trying to use the DIA SDK reader only to fail with "DIA SDK wasn't enabled" isn't very useful. The native PDB reader is missing some stuff, but it's still better than nothing. Reduces number of lldb-check-shell test failures with LLVM_ENABLE_DIA_SDK=NO from 27 to 15. Differential Revision: https://reviews.llvm.org/D110172
-
LLVM GN Syncbot authored
-
Mark de Wever authored
This implements the generic std.format.spec framework for all types. The Unicode support will be added in a separate patch. Implements parts of: - P0645 Text Formatting Completes: - LWG-3242 std::format: missing rules for arg-id in width and precision - P1892 Extended locale-specific presentation specifiers for std::format Reviewed By: #libc, ldionne, vitaut Differential Revision: https://reviews.llvm.org/D103368
-
cchen authored
-
Aaron Ballman authored
This reverts commit 63e0d038. It causes test failures: http://lab.llvm.org:8011/#/builders/119/builds/5612 https://logs.chromium.org/logs/fuchsia/buildbucket/cr-buildbucket/8835548361443044001/+/u/clang/test/stdout
-
Dávid Bolvanský authored
We already have pow(x, y) * pow(x, z) -> pow(x, y + z) transformation, but we are missing same transformation for powi (power is integer). Requires reassoc. Reviewed By: spatel Differential Revision: https://reviews.llvm.org/D109954
-
Quinn Pham authored
This patch changes the signature of the load and store vector pair builtins to match their documentation. The type of the `signed long long` argument is changed to `signed long`. This patch also changes existing testcases to match the signature change. Reviewed By: lei, Conanap Differential Revision: https://reviews.llvm.org/D109996
-
Kazu Hirata authored
-
Sanjay Patel authored
Planning to reframe a proposed transform in terms of demanded bits as suggested in D110170. The new tests end with an 'or'.
-
Kostya Serebryany authored
The current code writes the pc-table at the process startup, which may happen before the common_flags() are initialized. Move writing to the process end. This is consistent with how we write the counters and avoids the problem with the uninitalized flags. Add prints if verbosity>=1. Reviewed By: kostik Differential Revision: https://reviews.llvm.org/D110119
-
- Sep 21, 2021
-
-
Florian Hahn authored
isValidAssumeForContext can provide better results with access to the dominator tree in some cases. This patch adjusts computeConstantRange to allow passing through a dominator tree. The use VectorCombine is updated to pass through the DT to enable additional scalarization. Note that similar APIs like computeKnownBits already accept optional dominator tree arguments. Reviewed By: lebedev.ri Differential Revision: https://reviews.llvm.org/D110175
-
Michael Liao authored
Reviewed By: jeroen.dobbelaere Differential Revision: https://reviews.llvm.org/D102821
-
Aleksandr Bezzubikov authored
When using instructions which have a MetadataAsValue argument (e.g. some target-specific intrinsics) MD canonicalization strips internal MDNodes with a single ConstantAsMetadata child. That prevented IRTranslator from the proper translation of such a calls.
-
Tobias Gysi authored
Compute the tiled producer slice dimensions directly starting from the consumer not using the producer at all. Reviewed By: nicolasvasilache Differential Revision: https://reviews.llvm.org/D110147
-
Tobias Gysi authored
Add a helper method to check if an index vector contains a permutation of its indices. Additionally, refactor applyPermutationToVector to take int64_t. Reviewed By: nicolasvasilache Differential Revision: https://reviews.llvm.org/D110135
-
Dmitry Preobrazhensky authored
Differential Revision: https://reviews.llvm.org/D109616
-
Petar Avramovic authored
-
Andy Wingo authored
Strip a layer of parentheses in TreeTransform::RebuildQualifiedType. Differential Revision: https://reviews.llvm.org/D108359
-
David Green authored
-
Nicolas Vasilache authored
It was previously assumed that tensor.insert_slice should be bufferized first in a greedy fashion to avoid out-of-place bufferization of the large tensor. This heuristic does not hold upon further inspection. This CL removes the special handling of such ops and adds a test that exhibits better behavior and appears in real use cases. The only test adversely affected is an artificial test which results in a returned memref: this pattern is not allowed by comprehensive bufferization in real scenarios anyway and the offending test is deleted. Differential Revision: https://reviews.llvm.org/D110072
-
Nicolas Vasilache authored
Previously, comprehensive bufferize would consider all aliasing reads and writes to the result buffer and matching operand. This resulted in spurious dependences being considered and resulted in too many unnecessary copies. Instead, this revision revisits the gathering of read and write alias sets. This results in fewer alloc and copies. An exhaustive test cases is added that considers all possible permutations of `matmul(extract_slice(fill), extract_slice(fill), ...)`.
-
Tobias Gysi authored
Assert the tile loop nest invariants are satisfied instead of failing silently. Reviewed By: nicolasvasilache Differential Revision: https://reviews.llvm.org/D110137
-
Chris Bieneman authored
This patch replaces reliance on `goto failure` pattern with `llvm::scope_exit`. Reviewed By: bkramer Differential Revision: https://reviews.llvm.org/D109865
-
Ben Shi authored
Optimize (add (mul x, c0), c1) -> (ADDI (MUL (ADDI, c1/c0), c0), c1%c0), if c1/c0 and c1%c0 are simm12, while c1 is not. Optimize (add (mul x, c0), c1) -> (MUL (ADDI, c1/c0), c0), if c1%c0 is zero, and c1/c0 is simm12 while c1 is not. Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D108607
-