- Nov 05, 2021
-
-
Valentin Clement authored
This patch add the conversion pattern for fir.extract_value and fir.insert_value. fir.extract_value is lowered to llvm.extractvalue anf fir.insert_value is lowered to llvm.insertvalue. This patch also adds the type conversion for the BoxType and RecordType needed to have some comprehensive tests. This patch is part of the upstreaming effort from fir-dev branch. Reviewed By: awarzynski Differential Revision: https://reviews.llvm.org/D112961 Co-authored-by:
Jean Perier <jperier@nvidia.com> Co-authored-by:
Eric Schweitz <eschweitz@nvidia.com>
-
Nico Weber authored
Ran `git ls-files '*.gn' '*.gni' | xargs llvm/utils/gn/gn.py format`. No behavior change.
-
Alex Lorenz authored
The __block Objective-C pointers can be set but not used due to a commonly used lifetime extension pattern in Objective-C. Differential Revision: https://reviews.llvm.org/D112850
-
Nico Weber authored
This is possible after D106314 / 8773822c. Makes the required prepare-code-coverage-artifact.py invocation a bit longer, but that seems like a good tradeoff. Differential Revision: https://reviews.llvm.org/D113282
-
David Green authored
This introduces a new ComputeMinSignedBits method for ValueTracking that returns the BitWidth - SignBits + 1 from ComputeSignBits, and represents the minimum bit size for the value as a signed integer. Similar to the existing APInt::getMinSignedBits method, this can make some of the reasoning around ComputeSignBits more natural. See https://reviews.llvm.org/D112298
-
Simon Pilgrim authored
Another minor step towards merging FoldConstantVectorArithmetic into FoldConstantArithmetic. We don't use SDNodeFlags in any constant folding inside DAG, so passing the Flags argument is a waste of time - an alternative would be to wire up FoldConstantArithmetic to take SDNodeFlags just-in-case we someday start using it, but we don't have any way to test it and I'd prefer to avoid dead code. Differential Revision: https://reviews.llvm.org/D113276
-
Roman Lebedev authored
Even though AVX512's masked mem ops (unlike AVX1/2) have a mask that is a `VF x i1`, replication of said masks happens after promotion of it to `VF x i8`, so we should use `i8`, not `i1`, when calculating the cost of mask replication.
-
Sanjay Patel authored
(X s< 0) ? Y : 0 --> (X s>> BW-1) & Y We canonicalize to the icmp+select form in IR, and we already have this fold for scalar select in SDAG, so I think it's an oversight that we don't have the fold for vectors. It seems neutral for AArch64 and saves some instructions on x86. Whether we should also have the sibling folds for the inverse condition or all-ones true value may depend on target-specific factors such as whether there's an "and-not" instruction. Differential Revision: https://reviews.llvm.org/D113212
-
Sanjay Patel authored
-
Sanjay Patel authored
-
Sanjay Patel authored
-
LLVM GN Syncbot authored
-
Roman Lebedev authored
Avid readers of this saga may recall from previous installments, that replication mask replicates (lol) each of the `VF` elements in a vector `ReplicationFactor` times. For example, the mask for `ReplicationFactor=3` and `VF=4` is: `<0,0,0,1,1,1,2,2,2,3,3,3>`. More importantly, replication mask is used by LoopVectorizer when using masked interleaved memory operations. As discussed in previous installments, while it is used by LV, and we **seem** to support masked interleaved memory operations on X86, it's support in cost model leaves a lot to be desired: until basically yesterday even for AVX512 we had no cost model for it. As it has been witnessed in the recent AVX2 `X86TTIImpl::getInterleavedMemoryOpCost()` costmodel patches, while it is hard-enough to query the cost of a particular assembly sequence [from llvm-mca], afterwards the check lines LV costmodel tests must be updated manually. This is, at the very least, boring. Okay, now we have decent costmodel coverage for interleaving shuffles, but now basically the same mind-killing sequence has to be performed for replication mask. I think we can improve at least the second half of the problem, by teaching the `TargetTransformInfoImplCRTPBase::getUserCost()` to recognize `Instruction::ShuffleVector` that are repetition masks, adding exhaustive test coverage using `-cost-model -analyze` + `utils/update_analyze_test_checks.py` This way we can have good exhaustive coverage for cost model, and only basic coverage for the LV costmodel. This patch adds precise undef-aware `isReplicationMask()`, with exhaustive test coverage. * `InstructionsTest.ShuffleMaskIsReplicationMask` shows that it correctly detects all the known masks. * `InstructionsTest.ShuffleMaskIsReplicationMask_undef` shows that replacing some mask elements in a known replication mask still allows us to recognize it as a replication mask. Note, with enough undef elts, we may detect a different tuple. * `InstructionsTest.ShuffleMaskIsReplicationMask_Exhaustive_Correctness` shows that if we detected the replication mask with given params, then if we actually generate a true replication mask with said params, it matches element-wise ignoring undef mask elements. Reviewed By: spatel Differential Revision: https://reviews.llvm.org/D113214
-
Roman Lebedev authored
Reviewed By: courbet Differential Revision: https://reviews.llvm.org/D113213
-
David Sherwood authored
When created a UUNPKLO/HI node with an undef input then the output should also be undef. I've added a target DAG combine function to ensure we avoid creating an unnecessary uunpklo/hi instruction. Differential Revision: https://reviews.llvm.org/D113266
-
Quinn Pham authored
[NFC] This patch fixes URLs containing "master". Old URLs were either broken or redirecting to the new URL. Reviewed By: #libc, ldionne, mehdi_amini Differential Revision: https://reviews.llvm.org/D113186
-
Simon Pilgrim authored
NumOps represents the number of elements for vector constant folding, rename this NumElts so in future we can the consistently use NumOps to represent the number of operands of the opcode. Minor cleanup before trying to begin generalizing FoldConstantArithmetic to support opcodes other than binops.
-
Nico Weber authored
-
Jingu Kang authored
A pattern has selected wrong uaddlv MI. It should be as below. uaddv(uaddlp(v8i8)) ==> uaddlv(v8i8) Differential Revision: https://reviews.llvm.org/D113263
-
Alfredo Dal'Ava Junior authored
This symbol is defined in libc.so so it is definitely not DSO-Local. Marking it as such causes problems on some platforms (such as PowerPC). Differential revision: https://reviews.llvm.org/D109090
-
Martin Liska authored
Differential Revision: https://reviews.llvm.org/D113172
-
Simon Pilgrim authored
To constant fold bitwise logic ops where we've legalized constant build vectors to a different type (e.g. v2i64 -> v4i32), this patch adds a basic ability to peek through the bitcasts and perform the constant fold on the inner operands. The MVE predicate v2i64 regressions will be addressed by future support for basic v2i64 type support. One of the yak shaving fixes for D113192.... Differential Revision: https://reviews.llvm.org/D113202
-
David Green authored
-
Valentin Clement authored
The `fir.select` and `fir.select_rank` are lowered to llvm.switch. This patch is part of the upstreaming effort from fir-dev branch. Reviewed By: mehdi_amini Differential Revision: https://reviews.llvm.org/D113089 Co-authored-by:
Jean Perier <jperier@nvidia.com> Co-authored-by:
Eric Schweitz <eschweitz@nvidia.com>
-
Fraser Cormack authored
This patch fleshes out the missing documentation for the final two VP intrinsics introduced in D99355: `llvm.vp.gather` and `llvm.vp.scatter`. It does so mostly by deferring to the `llvm.masked.gather` and `llvm.masked.scatter` intrinsics, respectively. Reviewed By: simoll Differential Revision: https://reviews.llvm.org/D112997
-
Alex Zinenko authored
The ODS-based Python op bindings generator has been generating incorrect specification of the operand segment in presence if both optional and variadic operand groups: optional groups were treated as variadic whereas they require separate treatement. Make sure it is the case. Also harden the tests around generated op constructors as they could hitherto accept the code for both optional and variadic arguments. Reviewed By: nicolasvasilache Differential Revision: https://reviews.llvm.org/D113259
-
Simon Pilgrim authored
Fixes one of the regressions in D113192
-
David Green authored
-
Fraser Cormack authored
This patch fleshes out the missing documentation for two of the VP intrinsics introduced in D99355: `llvm.vp.load` and `llvm.vp.store`. It does so mostly by deferring to the `llvm.masked.load` and `llvm.masked.store` intrinsics, respectively. Reviewed By: simoll Differential Revision: https://reviews.llvm.org/D112930
-
Clement Courbet authored
In preparation for D112453.
-
Riccardo Mori authored
This is part of an effort to reduce the differences between the custom C++ bindings used right now by polly in lib/External/isl/include/isl/isl-noxceptions.h and the official isl C++ interface. In the official interface the type `isl::size` cannot be casted to an unsigned without previously having checked if it contains a valid value with the function `isl::size::is_error()`. For this reason two helping functions have been added: - `IslAssert`: assert that no errors are present in debug builds and just disables the mandatory error check in non-debug builds - `unisgnedFromIslSIze`: cast the `isl::size` object to `unsigned` Changes made: - Add the functions `IslAssert` and `unsignedFromIslSize` - Add the utility function `rangeIslSize()` - Retype `MaxDisjunctsInDomain` from `int` to `unsigned` - Retype `RunTimeChecksMaxAccessDisjuncts` from `int` to `unsigned` - Retype `MaxDimensionsInAccessRange` from `int` to `uns...
-
Chen Zheng authored
Reviewed By: nemanjai Differential Revision: https://reviews.llvm.org/D113236
-
Jay Foad authored
-
Jay Foad authored
In TwoAddressInstructionPass::processTiedPairs with -early-live-intervals, update any preexisting physreg live intervals, as well as virtreg live intervals. By default (without -precompute-phys-liveness) physreg live intervals only exist for registers that are live-in to some basic block. Differential Revision: https://reviews.llvm.org/D113191
-
Matthias Springer authored
By doing so, the method can no longer be reimplemented. Differential Revision: https://reviews.llvm.org/D113248
-
Christian Sigg authored
Reviewed By: rriddle Differential Revision: https://reviews.llvm.org/D113171
-
Qiu Chaofan authored
ppc_fp128 and fp128 are both 128-bit floating point types. However, we can't do conversion between them now, since trunc/ext are not allowed for same-size fp types. This patch adds two new intrinsics: llvm.ppc.convert.f128.to.ppcf128 and llvm.convert.ppcf128.to.f128, to support such conversion. Reviewed By: shchenz Differential Revision: https://reviews.llvm.org/D109421
-