- Dec 16, 2022
-
-
Matthias Springer authored
Folding of rank-reduced subviews is also supported. Differential Revision: https://reviews.llvm.org/D140110
-
Matthias Springer authored
The assert message was previously ignored. The lowered IR now calls `puts` it in case of a failed assertion. Differential Revision: https://reviews.llvm.org/D138647
-
Simon Pilgrim authored
See if we can freely sign-extend both sources of a vselect operand, also handle allones constant build vectors (easily rematerializable and uses in the test case). Fixes #59526
-
Nikita Popov authored
-
Philip Reames authored
I went to extend this locally, and then promptly tripped across a bug which is possible with the landed patch. The problematic case is: vsetvli zero, 4, <some vtype> vmv.x.s x1, v0 vsetvli a0, zero, <same type> In this case, the naive rewrite - what I had implemented - would form: vsetvli zero, zero, <same vtype> vmv.x.s x1, v0 This is, amusingly, correct for the vmv.x.s, but is incorrect for the instructions which follow the sequence and probably rely on VL=VLMAX. (The VL before the sequence is unknown, and thus doesn't have to be VLMAX.) I plan to rework the rewrite code to be more robust here, but I wanted to directly fix the bug first. Sorry for the lack of test; I didn't manage to reproduce this without an additional optimization change after a few minutes of trying.
-
Kai Nacke authored
Newer tests use ppc64le-linux triple. It is identical to ppc32. Some of the PPC GIsel tests were generated by this change. Reviewed by: RKSimon Differential Revision: https://reviews.llvm.org/D140107
-
Simon Pilgrim authored
-
Nikita Popov authored
Fix compiler warning.
-
- Dec 15, 2022
-
-
Qiongsi Wu authored
The ClangBuiltLinux project relies on `-mcpu=405`. Before https://reviews.llvm.org/D139720, `clang` treated `-mcpu=405` implicitly in the same way as `-mcpu=generic`, because `405` was an unknown value and `clang` did not validate unknown input values. https://reviews.llvm.org/D139720 added the validation of `-mcpu` input value, and `clang` now generates an error with `-mcpu=405`. For further details of the problem, see https://github.com/ClangBuiltLinux/linux/issues/1771. This patch adds support of `-mcpu=405` explicitly, and treats it as an equivalent of `-mcpu=generic`. Reviewed By: nemanjai Differential Revision: https://reviews.llvm.org/D140080
-
Roman Lebedev authored
Manual checklines are generally not welcomed in LLVM tests. They are really brittle, and really hard to update. *Please* use scripts!
-
Simon Pilgrim authored
Just perform each cast<Instruction> once - we can make OtherAccess a Instruction* type as we only ever assign it from a known LoadInst/StoreInst
-
Yitzhak Mandelbaum authored
The underlying model already supports ignoring accesses to optionals through smart pointers. This patch exposes that option through ClangTidy's configuration options. Differential Revision: https://reviews.llvm.org/D140021
-
Nikita Popov authored
-
Yitzhak Mandelbaum authored
The optional model has an option to ignore optionals accessed through smart pointer types (other than optional itself). This patch improves this feature in two ways: 1. We extend support to optionals accessed directly through the smart pointer, like `ptr->value()`. Previously, support was limited to cases that went through an intermediate field. 2. We clean up the implementation by removing the option from the analysis, leaving it only in the diagnostic phase (where it is relevant). 3. Adjusts a test which was misleading in what it was testing. Differential Revision: https://reviews.llvm.org/D140020
-
Guillaume Chatelet authored
There is no point in testing this behavior since this is std::optional's semantic.
-
Philip Reames authored
This extends the backwards walk to allow mutating the previous vsetvl's AVL value if it was not used by any instructions in between. In practice, this mostly benefits vmv.x.s and fvmv.f.s patterns since vector instructions which ignore VL are rare. Differential Revision: https://reviews.llvm.org/D140048
-
Nilanjana Basu authored
[AArch64] Patch for lowering trunc instructions to 'tbl' for (8|16)xi32 -> (8|16)xi8 conversions in https://reviews.llvm.org/D133495 is extended to support trunc to tbl lowering for (8|16) x i64 to (8|16) x i8. A microbenchmark for runtime for these transformations is added in https://reviews.llvm.org/D136274 Reviewed by: fhahn, t.p.northover Differential Revision: https://reviews.llvm.org/D135229
-
Nilanjana Basu authored
These tests show code generation for vectorized trunc lowering from i16 to i8 in AArch64. Reviewed By: fhahn Differential Revision: https://reviews.llvm.org/D137293
-
Krzysztof Parzyszek authored
-
Andrew Savonichev authored
Alignment of an alloca in IR can be lower than the preferred alignment on purpose, but this override essentially treats the preferred alignment as the minimum alignment. The patch changes this behavior to always use the specified alignment. If alignment is not set explicitly in LLVM IR, it is set to DL.getPrefTypeAlign(Ty) in computeAllocaDefaultAlign. Tests are changed as well: explicit alignment is increased to match the preferred alignment if it changes output, or omitted when it is hard to determine the right value (e.g. for pointers, some structs, or weird types). Differential Revision: https://reviews.llvm.org/D135462
-
Guillaume Chatelet authored
Differential Revision: https://reviews.llvm.org/D140098
-
Vladislav Dzhidzhoev authored
This reverts commit 731abdfd. This commit breaks some tests in libcxx, e.g. `std/utilities/expected/expected.expected/ctor/ctor.inplace.pass.cpp`
-
Sam McCall authored
When the initializer of an `auto` variable is dependent, clang doesn't give the DeclRefExpr a useful dependent type that we can apply heuristics to. However we can dig one up by looking at the initializer. Differential Revision: https://reviews.llvm.org/D140044
-
Kai Nacke authored
The flags, initialization of the flags, and the getter methods for features defined in PPC.td can be generated by TableGen. Reviewed By: shchenz Differential Revision: https://reviews.llvm.org/D140028
-
Paul Robinson authored
Two tests checked 'ppc64be' which appears not to exist; the tests pass on clang-ppc64be-linux-multistage so I assume they are fine and just removed those UNSUPPORTED lines. All others were converted to the new target= format, and get the same results on ppc bots as before. Part of the project to eliminate special handling for triples in lit expressions. Differential Revision: https://reviews.llvm.org/D138954
-
Benjamin Maxwell authored
Reland with a fixup to avoid converting APInts to int64_t which allowed for overflows (UB) with sufficiently high/low multiplier values. This allows DemandedBits to see the result of VSCALE will be at most VScaleMax * some compile-time constant. This relies on the vscale_range() attribute being present on the function, with a max set. (This is done by default when clang is targeting AArch64+SVE). Using this various redundant operations (zexts, sexts, ands, ors, etc) can be eliminated. Differential Revision: https://reviews.llvm.org/D138508
-
Anton Sidorenko authored
This patch adds reassociation of FADD/FSUB instruction pairs. Differential Revision: https://reviews.llvm.org/D138660
-
Emmmer authored
The `EmulateInstructionRISCV` uses a lot of types and functions in `llvm` and `lldb`, this change is to make the code look cleaner. PS: This patch should be merged before D140032. Reviewed By: DavidSpickett Differential Revision: https://reviews.llvm.org/D140092
-
Sanjay Patel authored
This transform was added with 4446f71c. However, as noted in the post-commit feedback, the transform is not safe with an arbitrary base vector because we may leak poison from a narrow element into an adjacent element when bitcasting. I made the least invasive code change in case we do figure out a way to make this safe.
-
Backl1ght authored
Reviewed By: HazardyKnusperkeks, MyDeveloperDay Differential Revision: https://reviews.llvm.org/D139937
-
Jean Perier authored
Lower binary and unary elemental operations with an array argument using hlfir.elemental, hlfir.yield_element, and hlfir.apply. Concat implementation, which is a binary operation, is moved to a BinaryOp struct so that it can leverage this new code. This patch implements the "not yet implemented: character array expression temp with dynamic length" TODO of the current lowering by splitting the result length computation from the result value computation. That way, the result length computation can be done before lowering the operation to an hlfir.elemental, and the length of the hlfir.elemental is known and storage for it can later be allocated. It adds a DesignatorOp builder to make "dumb" indexing (without triplets, component, substrings or derived type component ref) easier since indexing needs to be generated for array variables in elemental expression (in the added hlfir::genElementAt helper). Differential Revision: https://reviews.llvm.org/D140040
-
Vladislav Dzhidzhoev authored
RecordLayoutBuilder assumes the size of a potentially-overlapping field with non-zero size as the size of the base subobject type corresponding to the field type. Make CGRecordLayoutBuilder to acknowledge that in order to avoid incorrect padding insertion. Differential Revision: https://reviews.llvm.org/D139741
-
Juan Manuel MARTINEZ CAAMAÑO authored
Reviewed By: RKSimon Differential Revision: https://reviews.llvm.org/D139550
-
Vladislav Dzhidzhoev authored
Legalize G_SHUFFLE_VECTOR having destination vector length greater than source vector length by reshaping source vectors. Partial implementation of SelectionDAGBuilder::visitShuffleVector. Differential Revision: https://reviews.llvm.org/D132190
-
Manuel Brito authored
Differential Revision: https://reviews.llvm.org/D140090
-
Simon Pilgrim authored
-
Benjamin Maxwell authored
This reverts commit c165b055.
-
Matthias Springer authored
MoveInitOperandsToInput is put into a separate populate... function because it can interfere with certain transformations. Differential Revision: https://reviews.llvm.org/D140091
-
Valentin Clement authored
In SELECT TYPE, within the block following TYPE IS, the associating entity is not polymorphic. It has the type named in the type guard and other properties taken from the selector. Within the block following a CLASS IS type guard statement, the associating entity is polymorphic and has the declared type named in the type guard statement. This patch makes sure the associating entity matches the selector if it is an array, a pointer or an allocatable. Reviewed By: jeanPerier Differential Revision: https://reviews.llvm.org/D140017
-
Luke Lau authored
This continues the refactoring work of selecting offset + address operands with the AddrOpsN pattern, previously called LoadOpsN. This is not an NFC, since constant addresses are now folded into the offset in more places for v128.storeN_lane. Differential Revision: https://reviews.llvm.org/D139950
-