- Nov 06, 2021
-
-
Yonghong Song authored
This is to revert commit f95bd18b (Revert "[Attr] support btf_type_tag attribute") plus a bug fix. Previous change failed to handle cases like below: $ cat reduced.c void a(*); void a() {} $ clang -c reduced.c -O2 -g In such cases, during clang IR generation, for function a(), CGCodeGen has numParams = 1 for FunctionType. But for FunctionTypeLoc we have FuncTypeLoc.NumParams = 0. By using FunctionType.numParams as the bound to access FuncTypeLoc params, a random crash is triggered. The bug fix is to check against FuncTypeLoc.NumParams before accessing FuncTypeLoc.getParam(Idx). Differential Revision: https://reviews.llvm.org/D111199
-
Florian Hahn authored
Try simplify G_UADDO with 8 or 16 bit operands to wide G_ADD and TBNZ if result is only used in the no-overflow case. It is restricted to cases where we know that the high-bits of the operands are 0. If there's an overflow, then the the 9th or 17th bit must be set, which can be checked using TBNZ. Reviewed By: paquette Differential Revision: https://reviews.llvm.org/D111888
-
Deepak Panickal authored
The callback can be used to provide a default pass pipeline. Reviewed By: mehdi_amini, rriddle Differential Revision: https://reviews.llvm.org/D113144
-
Shao-Ce SUN authored
According to RISC-V Unprivileged ISA 15.6. Reviewed By: asb Differential Revision: https://reviews.llvm.org/D111866
-
Jon Chesterfield authored
LLVM docs at https://llvm.org/docs/CMake.html#quick-start state 3.13.4 Reviewed By: atmnpatel Differential Revision: https://reviews.llvm.org/D113271
-
Zarko Todorovski authored
Correct the XLC/C++ version in the warning message to use the information from XL's -qversion output. Reviewed By: rzurob Differential Revision: https://reviews.llvm.org/D112847
-
Aart Bik authored
Reviewed By: bixia Differential Revision: https://reviews.llvm.org/D113197
-
Martin Liska authored
Fixes: sanitizer_stacktrace.h:212:5: warning: ISO C++ forbids braced-groups within expressions [-Wpedantic] Differential Revision: https://reviews.llvm.org/D113292
-
Fangrui Song authored
to match RELSZ/RELENT. Reviewed By: jhenderson Differential Revision: https://reviews.llvm.org/D113206
-
Nico Weber authored
-f flags usually use the `=` form. -fdebug-compilation-dir= has been around for a few months now (since 0c2bb6b4, both LLVM 12.0 and 13.0 have it), so using it shouldn't be a big problem -- especially since use_relative_paths_in_debug_info is opt-in anyways.
-
Arthur Eubanks authored
If we don't properly initialize all the analysis managers, we may be missing analyses that other analyses depend on. Fixes broken polly test, e.g. https://lab.llvm.org/buildbot/#/builders/10/builds/7501.
-
Zarko Todorovski authored
[clang] [Objective C] Inclusive language: use objcmt-allowlist-dir-path=<arg> instead of objcmt-white-list-dir-path=<arg> Trying to update some options that don't at least have an inclusive language version. This patch adds `objcmt-allowlist-dir-path` as a default alternative. Reviewed By: akyrtzi Differential Revision: https://reviews.llvm.org/D112591
-
Roman Lebedev authored
These tests have pretty high O() complexity due to their nature, which leads to potentially-long runtimes. While in release build for me they took ~1 and ~2 sec, as noted in https://reviews.llvm.org/D113214#inline-1080479 they take minutes in debug build. Fine-tune the amount of permutations they deal with, without affecting the test coverage. After this, they take <~10ms each for me (in release build), hopefully that is good-enough for debug build too.
-
Roman Lebedev authored
This was mentioned in https://reviews.llvm.org/D113214#inline-1080385 but i forgot to stage the change before committing.
-
Kazu Hirata authored
-
Whitney Tsang authored
Having a NoOpLoopNestPass can ensure that only outermost loop is invoked for a LoopNestPass with a lit test. There are some existing passes that are implemented as LoopNestPass, but they are still using LOOP_PASS macro. It would be easier to identify LoopNestPasses with a LOOPNEST_PASS macro. Differential Revision: https://reviews.llvm.org/D113185
-
- Nov 05, 2021
-
-
Craig Topper authored
This improves our type coverage. We were only testing integer insert and extract before due to the FP types not being enabled for arguments and returns. Differential Revision: https://reviews.llvm.org/D113217
-
Michael Liao authored
-
David Green authored
There is a combine in instcombine to transform a saturated add/sub into a saddsat/ssubsat, currently handling inputs which are both sign extended (https://alive2.llvm.org/ce/z/68qpTn). This can generalize to, for example ashr of at least the bitwidth (https://alive2.llvm.org/ce/z/4TFyX- and https://alive2.llvm.org/ce/z/qDWzFs for example). Which means it generalizes further to "the number of sign bits", needing to be enough to truncate to the size of the saturate. (An example using `or` for instance: https://alive2.llvm.org/ce/z/EI_h_A). So this patch makes use of ComputeNumSignBits (with the newly added ComputeMinSignedBits) in matchSAddSubSat to generalize the fold to any inputs with enough sign bits known, truncating the inputs to the new size of the saturate. Differential Revision: https://reviews.llvm.org/D112298
-
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
-