- Oct 04, 2020
-
-
Craig Topper authored
Instead of emitting MachineSDNodes during lowering, emit X86ISD opcodes. These opcodes will either be selected by tablegen patterns or custom selection code. Emitting MachineSDNodes during lowering is uncommon so this makes things more consistent. It also allows selectAddr to be called to perform address matching during instruction selection. I had trouble getting tablegen to accept XMM0-XMM7 as results in an isel pattern for the WIDE instructions so I had to use custom instruction selection.
-
Jacques Pienaar authored
Class simplifies keeping track of the indentation while emitting. For every new line the current indentation is simply prefixed (if not at start of line, then it just emits as normal). Add a simple Region helper that makes it easy to have the C++ scope match the emitted scope. Use this in op doc generator and rewrite generator. This reverts revert commit be185b6a addresses shared lib failure by fixing up cmake files. Differential Revision: https://reviews.llvm.org/D84107
-
Alexander Shaposhnikov authored
This diff refactors writeUniversalBinary and adds writeUniversalBinaryToBuffer. This is a preparation for adding support for universal binaries to llvm-objcopy. Test plan: make check-all Differential revision: https://reviews.llvm.org/D88372
-
Mircea Trofin authored
The signature of the ctor expects a MCRegister, but currently any unsigned value can be converted to a MCRegister. This patch checks that indeed the provided value is a physical register only. We want to eventually stop implicitly converting unsigned or Register to MCRegister (which is incorrect). The next step after this patch is changing uses of MCRegUnitIterator to explicitly cast Register or unsigned values to MCRegister. To that end, this patch also introduces 2 APIs that make that conversion checked and explicit. Differential Revision: https://reviews.llvm.org/D88705
-
Michał Górny authored
-
Florian Hahn authored
When updating operands of a VPUser, we also have to adjust the list of users for the new and old VPValues. This is required once we start transitioning recipes to become VPValues.
-
Roman Lebedev authored
-
Roman Lebedev authored
We could either try to make SROA more picky to the new type and/or prevent InstCombine from creating the original problem (converting load-stores to operate on ints), and/or make InstCombine recover the situation by cleaning up all that cruft.
-
Florian Hahn authored
-
Martin Storsjö authored
[AArch64] Prefer prologues with sp adjustments merged into stp/ldp for WinCFI, if optimizing for size This makes the prologue match the windows canonical layout, for cases without a frame pointer. This can potentially be a slower (a longer dependency chain of the sp register, and potentially one arithmetic operation more on some cores), but gives notable size improvements. The previous two commits shrinks a 166 KB xdata section by 49 KB, and if the change from this commit is enabled, it shrinks the xdata section by another 25 KB. In total, since the start of the recent arm64 unwind info cleanups and optimizations (since before commit 37ef743c), the xdata+pdata sections of the same test DLL has shrunk from 407 KB in total originally, to 163 KB now. Differential Revision: https://reviews.llvm.org/D88701
-
Martin Storsjö authored
This saves one instruction per prologue/epilogue for any function with an odd number of callee-saved GPRs, but more importantly, allows such functions to match the packed unwind format. Differential Revision: https://reviews.llvm.org/D88699
-
Martin Storsjö authored
On windows, the callee saved registers in a canonical prologue are ordered starting from a lower register number at a lower stack address (with the possible gap for aligning the stack at the top); this is the opposite order that llvm normally produces. To achieve this, reverse the order of the registers in the assignCalleeSavedSpillSlots callback, to get the stack objects laid out by PrologEpilogInserter in the right order, and adjust computeCalleeSaveRegisterPairs to lay them out from the bottom up. This allows generated prologs more often to match the format that allows the unwind info to be written as packed info. Differential Revision: https://reviews.llvm.org/D88677
-
Nico Weber authored
This reverts commit e25bf259. Breaks tests on Windows, see comments on https://reviews.llvm.org/D88452
-
Nathan Lanza authored
-
Michał Górny authored
Add a partial read/write tests for x87 FPU registers. This includes reading and writing ST registers, control registers and floating-point exception data registers (fop, fip, fdp). The tests assume the current (roughly incorrect) behavior of reporting the 'abridged' 8-bit ftag state as 16-bit ftag. They also assume Linux plugin behavior of reporting fip/fdp split into halves as (fiseg, fioff) and (foseg, fooff). Differential Revision: https://reviews.llvm.org/D88583
-
Michał Górny authored
Multiple fixes related to bugs discovered while debugging a crash when reading all registers on i386. The underlying problem was that GetSetForNativeRegNum() did not account for MPX registers on i386, and since it only compared against upper bounds of each known register set, the MPX registers were classified into the wrong set and therefore considered supported. However, they were not expected in RegNumX86ToX86_64() and caused the assertion to fail. This includes: - adding (unused) i386 → x86_64 translations for MPX registers - fixing GetSetForNativeRegNum() to check both lower and upper bound for register sets, to avoid wrongly classifying unhandled register sets - adding missing range check for MPX registers on i386 - renaming k_last_mpxr to k_last_mpxr_i386 for consistency - replacing return-assertions with llvm_unreachable() and adding more checks for unexpected parameters Differential Revision: https://reviews.llvm.org/D88682
-
Michał Górny authored
Fix reading FIP/FDP registers to correctly return segment and offset parts. On amd64, this roughly matches the Linux behavior of splitting the 64-bit FIP/FDP into two halves, and putting the higher 32 bits into f*seg and lower into f*off. Well, actually we use only 16 bits of higher half but the CPUs do not seem to handle more than that anyway. Differential Revision: https://reviews.llvm.org/D88681
-
Michał Górny authored
Do not instrument user-defined ELF sections (whose names resemble valid C identifiers). They may have special use semantics and modifying them may break programs. This is e.g. the case with NetBSD __link_set API that expects these sections to store consecutive array elements. Differential Revision: https://reviews.llvm.org/D76665
-
Simon Pilgrim authored
Some initial test coverage toward fixing PR46896 - these are just copied from rotate.ll
-
Simon Pilgrim authored
We can't use Use.Calls after its std::move()'d to TmpCalls as it will be in an undefined state. Instead, swap with the known empty map in TmpCalls so we can then safely emplace_back into the now empty Use.Calls. Fixes clang static analyzer warning.
-
Jacques Pienaar authored
This reverts commit 78530ce6. Fails on shared_lib build.
-
Simon Pilgrim authored
If we know the shift amount is less than the bitwidth we should be able to convert this to a rotate/funnel shift
-
- Oct 03, 2020
-
-
Jacques Pienaar authored
Class simplifies keeping track of the indentation while emitting. For every new line the current indentation is simply prefixed (if not at start of line, then it just emits as normal). Add a simple Region helper that makes it easy to have the C++ scope match the emitted scope. Use this in op doc generator and rewrite generator. Differential Revision: https://reviews.llvm.org/D84107
-
David Green authored
We were not accounting for the pointer offset when splitting a store from a VMOVDRR node, which could lead to incorrect aliasing info. In this case it is the fneg via integer arithmetic that gives us a store->load pair that we started getting wrong. Differential Revision: https://reviews.llvm.org/D88653
-
Simon Pilgrim authored
Add basic vector handling to recognizeBSwapOrBitReverseIdiom/collectBitParts - this works at the element level, all vector element operations must match (splat constants etc.) and there is no cross-element support (insert/extract/shuffle etc.).
-
Aaron Ballman authored
-
Simon Pilgrim authored
Try to appease buildbots breakages due to D88578
-
Andrzej Warzynski authored
This patch fixes one worning. Since Flang sets `-Werror`, that's sufficient for a build to fail. As per flang/README.md, Clang-10 is one of the officially supported compilers. Differential Revision: https://reviews.llvm.org/D88723
-
Bernhard Manfred Gruber authored
Prevent rewrite when an unqualified id in a typedef type collides with a function argument name. Fixes PR44206.
-
Simon Pilgrim authored
[InstCombine] recognizeBSwapOrBitReverseIdiom - support for 'partial' bswap patterns (PR47191) (Reapplied) If we're bswap'ing some bytes and zero'ing the remainder we can perform this as a bswap+mask which helps us match 'partial' bswaps as a first step towards folding into a more complex bswap pattern. Reapplied with early-out if recognizeBSwapOrBitReverseIdiom collects a source wider than the result type. Differential Revision: https://reviews.llvm.org/D88578
-
Mark de Wever authored
The function `TryListConversion` didn't properly validate the following part of the standard: Otherwise, if the parameter type is a character array [... ] and the initializer list has a single element that is an appropriately-typed string literal (8.5.2 [dcl.init.string]), the implicit conversion sequence is the identity conversion. This caused the following call to `f()` to be ambiguous. void f(int(&&)[1]); void f(unsigned(&&)[1]); void g(unsigned i) { f({i}); } This issue only occurs when the initializer list had one element. Differential Revision: https://reviews.llvm.org/D87561 -
David Green authored
-
Nikita Popov authored
So we don't have to pass through more parameters in the future.
-
Nikita Popov authored
This one doesn't even have any dead stores to eliminate...
-
Craig Topper authored
-
Evandro Menezes authored
-
Petr Hosek authored
This helper method is useful even outside of Gnu toolchains, so move it to ToolChain so it can be reused in other toolchains such as Fuchsia. Differential Revision: https://reviews.llvm.org/D88452
-
Craig Topper authored
Add a comment to hopefully prevent anyone else from making the same mistake.
-
Craig Topper authored
[X86] Add missing intrinsic test for aesdecwide128kl and aesdecwide256kl. Capture all output values in keylocker tests. NFC The aesdec/enc instructions produce a flag output and one or eight xmm regsiter outputs. The test were not capturing the xmm outputs. Also add nounwind to tests to remove .cfi directives
-