- Sep 30, 2021
-
-
Quinn Pham authored
This patch is in a series of patches to provide builtins for compatibility with the XL compiler. This patch implements the software divide builtin as wrappers for a floating point divide. XL provided these builtins because it didn't produce software estimates by default at `-Ofast`. When compiled with `-Ofast` these builtins will produce the software estimate for divide. Reviewed By: #powerpc, nemanjai Differential Revision: https://reviews.llvm.org/D106959
-
Michael Kruse authored
The ReduceMetadata pass before this patch removed metadata on a per-MDNode (or NamedMDNode) basis. Either all references to an MDNode are kept, or all of them are removed. However, MDNodes are uniqued, meaning that references to MDNodes with the same data become references to the same MDNodes. As a consequence, e.g. tbaa references to the same type will all have the same MDNode reference and hence make it impossible to reduce only keeping metadata on those memory access for which they are interesting. Moreover, MDNodes can also be referenced by some intrinsics or other MDNodes. These references were not considered for removal leading to the possibility that MDNodes are not actually removed even if selected to be removed by the oracle. This patch changes ReduceMetadata to reduces based on removable metadata references instead. MDNodes without references implicitly dropped anyway. References by intrinsic calls should be removed by ReduceOperands or ReduceInstructions. References in other MDNodes cannot be removed as it would violate the immutability of MDNodes. Additionally, ReduceMetadata pass before this patch used `setMetadata(I, NULL)` to remove references, where `I` is the index in the array returned by `getAllMetadata`. However, `setMetadata` expects a MDKind (such as `MD_tbaa`) as first argument. `getAllMetadata` does not return those in consecutive order (otherwise it would not need to be a `std::pair` with `first` representing the MDKind). Reviewed By: aeubanks, swamulism Differential Revision: https://reviews.llvm.org/D110534
-
Stuart Brady authored
Group them together with the vload_half and vstore_half decls for simplicity. Reviewed By: svenvh Differential Revision: https://reviews.llvm.org/D110636
-
Dhruva Chakrabarti authored
[libomptarget] [amdgpu] After a kernel dispatch packet is published, its contents must not be accessed. Fixes: SWDEV-275232 (With contributions from Ammar Elwazir, Laurent Morichetti, and Tony Tye) The current code is racy. After the packet is submitted, the GPU will increment the read index. If this wraps around before the memory is read from it'll refer to a signal from an unrelated packet. Change avoids reading from the packet post-submission. Reviewed By: JonChesterfield Differential Revision: https://reviews.llvm.org/D110679
-
Eric Schweitz authored
Add getFinalValueAttrName() and remove specified number of inlined elements for SmallVector. This patch is mainly motivated to help the upstreaming effort. This patch is part of the upstreaming effort from fir-dev branch. Co-authored-by:
Jean Perier <jperier@nvidia.com> Co-authored-by:
Valentin Clement <clementval@gmail.com> Reviewed By: kiranchandramohan Differential Revision: https://reviews.llvm.org/D110710
-
Kazu Hirata authored
Note that createAArch64ObjectTargetStreamer is declared in AArch64TargetStreamer.h and defined in AArch64TargetStreamer.cpp. Identified with readability-redundant-declaration.
-
- Sep 29, 2021
-
-
David Green authored
Cortex-A55 has 2 64bit NEON vector units, meaning a 128bit instruction requires taking both units (and can only be issued as the first instruction in a dual issue pair). This patch models that by splitting the WriteV SchedWrite into two - the WriteVd that reads/writes only 64bit operands, and the WriteVq that read/writes 128bit registers. The A55 schedule then uses this distinction to model the WriteVq as taking both resource units, and starting a Schedule Group and WriteVd as taking one as before. I believe this is more correct, even if it does not lead to much better performance. Differential Revision: https://reviews.llvm.org/D108766
-
Sean Fertile authored
With xlc and xlC pragma align(packed) will pack bitfields the same way as pragma align(bit_packed). xlclang, xlclang++ and clang will pack bitfields the same way as pragma pack(1). Issue a warning when source code using pragma align(packed) is used to alert the user it may not be compatable with xlc/xlC. Differential Revision: https://reviews.llvm.org/D107506
-
Sanjay Patel authored
The test is from https://llvm.org/PR51351. There are 2 related logic bugs from over-generalizing "lshr" to "any shr", but I'm not sure how to expose the difference for "MaskC" because instsimplify already folds ashr of -1. I'll extend instsimplify to catch the MaskD pattern as a follow-up, but this patch should be enough to avoid the miscompile.
-
Sanjay Patel authored
-
Sanjay Patel authored
-
Jay Foad authored
Recognize Bi as an unconditional branch, just like JMP. This allows machine verification to run after MSP430BranchSelector without failing this assertion: virtual bool llvm::MSP430InstrInfo::analyzeBranch(llvm::MachineBasicBlock &, llvm::MachineBasicBlock *&, llvm::MachineBasicBlock *&, SmallVectorImpl<llvm::MachineOperand> &, bool) const: Assertion `I->getOpcode() == MSP430::JCC && "Invalid conditional branch"' failed. Note that machine verification is currently disabled after addPreEmitPass passes because of problems on other targets, so this is currently NFC. Differential Revision: https://reviews.llvm.org/D110691
-
Simon Pilgrim authored
getScalarizationOverhead() results in a somewhat better cost estimation than counting the insertion/extraction costs directly. Notably, this is still overestimating the costs. Original Patch by: @lebedev.ri (Roman Lebedev) Differential Revision: https://reviews.llvm.org/D110713
-
Simon Pilgrim authored
We can directly use cast<> instead of separate dyn_cast<> with assertions as cast<> will perform this for us. Similarly we can replace a if(isa<>)+cast<>/dyn_cast<> with if(dyn_cast<>)
-
Simon Pilgrim authored
Fix static analysis warning that we check for null Entry after dereferencing it. I don't think this can actually happen as i8/i16 should legalize to use the i32 path which should return a cost - but I'd rather play it safe that rely on an implicit type legalization.
-
Sam Clegg authored
I introduced this by mistake in https://reviews.llvm.org/D109595. Differential Revision: https://reviews.llvm.org/D110717
-
Raphael Isemann authored
Some downstream forks of LLDB change parts of the test setup in a way that causes lldb to somehow resolve `std::abs` (probably to `::abs`). This patch changes the tested function here to be `std::minmax` which (hopefully) doesn't have any identically named functions that LLDB could find and call. Just to be extra safe this also explicitly specified the template arguments so that in case there is a `minmax` non-template function we still don't end up calling it from this test.
-
Teresa Johnson authored
Try to address Windows flakes from d87bdc27 by using 'rm -f' instead of just 'rm' as discussed in D110276. For example: http://45.33.8.238/win/46115/step_7.txt
-
Frederic Cambus authored
Differential Revision: https://reviews.llvm.org/D110715
-
David Green authored
This enables the type promotion pass for AArch64, which acts as a CodeGenPrepare pass to promote illegal integers to legal ones, especially useful for removing extends that would otherwise require cross-basic-block analysis. I have enabled this generally, for both ISel and GlobalISel. In some quick experiments it appeared to help GlobalISel remove extra extends in places too, but that might just be missing optimizations that are better left for later. We can disable it again if required. In my experiments, this can improvement performance in some cases, and codesize was a small improvement. SPEC was a very small improvement, within the noise. Some of the test cases show extends being moved out of loops, often when the extend would be part of a cmp operand, but that should reduce the latency of the instruction in the loop on many cpus. The signed-truncation-check tests are increasing as they are no longer matching specific DAG combines. We also hope to add some additional improvements to the pass in the near future, to capture more cases of promoting extends through phis that have come up in a few places lately. Differential Revision: https://reviews.llvm.org/D110239
-
Marcel Koester authored
Introduced AllocationOpInterface to create deallocation operations on-the-fly that are compatible with the allocation operation implementing this interface. Added interface implementations for AllocOp and CloneOp defined in the MemRef diallect. Adapted the BufferDeallocation pass to be compatible with the interface introduced in this CL. Differential Revision: https://reviews.llvm.org/D109350
-
Florian Hahn authored
This fixes an issue exposed by D71539, where IndVarSimplify tries to access an invalid cached SCEV expression after making changes to the underlying PHI instruction earlier. When changing the incoming value of a PHI, forget the cached SCEV for the PHI.
-
Nicolas Vasilache authored
This revision retires a good portion of the complexity of the codegen strategy and puts the logic behind pass logic. Differential revision: https://reviews.llvm.org/D110678
-
David Green authored
This adds some extra tests for TypePromotion as per D110239, and regenerated the check lines in atomic-ops.ll and cmpxchg-idions.ll to be more easy to maintain with changing codegen (hopefully in a way that does not reduce what is tested).
-
Roman Lebedev authored
-
Roman Lebedev authored
-
Nico Weber authored
Instead, just make the later flag win, like usual. Implement this by making -no_deduplicate an actual alias for --icf=none at the Options.td level. Differential Revision: https://reviews.llvm.org/D110672
-
Wael Yehia authored
Reviewed by: steven_wu, fhahn, tejohnson Differential Revision: https://reviews.llvm.org/D110075
-
Salman Javed authored
This reintroduces c0687e19 (Add support for `NOLINTBEGIN` ... `NOLINTEND` comments) but with fixes to the tests.
-
Michał Górny authored
Remove TerminalStateSwitcher class. It is not used anywhere and its API is really weird. This is the first step towards cleaning up Terminal.h. Differential Revision: https://reviews.llvm.org/D110693
-
Djordje Todorovic authored
-
Nemanja Ivanovic authored
The instruction has similar semantics to vbpermq but for doublewords. It was added in Power9 and the ABI documents the builtin. Differential revision: https://reviews.llvm.org/D107899
-
Roman Lebedev authored
While we did have test coverage for the intrinsics, i don't believe there was LV-based test coverage.
-
Nemanja Ivanovic authored
Since XLC only ever shipped on PowerPC AIX and Linux, it is not reasonable to provide the compatibility macros on any target other than those two. This patch restricts those macros to AIX/Linux. Differential revision: https://reviews.llvm.org/D110213
-
Sander de Smalen authored
The legalizer handles this by breaking up an EXTRACT_SUBVECTOR into smaller parts, and combines those together, padding the result with UNDEF vectors, e.g. nxv6i64 extract_subvector(nxv12i64, 6) <-> nxv8i64 concat( nxv2i64 extract_subvector(nxv16i64, 6) nxv2i64 extract_subvector(nxv16i64, 8) nxv2i64 extract_subvector(nxv16i64, 10) nxv2i64 undef) Reviewed By: frasercrmck, david-arm Differential Revision: https://reviews.llvm.org/D110253 -
Sander de Smalen authored
The patterns added in D110163 were incorrect, since it used the wrong element widths for its shuffles. Example for nxv2f16 extract_subvector(nxv8f16 %in, 6): <a|b|c|d|e|f|g|h> ^^^ extract g and h. => UUNPKHI .h -> .s results in: <e |f |g |h > => UUNPKHI .s -> .d results in: <g |h > Reviewed By: david-arm Differential Revision: https://reviews.llvm.org/D110523 -
Martin Storsjö authored
On Windows, i128 arguments are passed as indirect arguments, and they are returned in xmm0. This is mostly fixed up by `WinX86_64ABIInfo::classify` in Clang, making the IR functions return v2i64 instead of i128, and making the arguments indirect. However for cases where libcalls are generated in the target lowering, the lowering uses the default x86_64 calling convention for i128, where they are passed/returned as a register pair. Add custom lowering logic, similar to the existing logic for i128 div/mod (added in 4a406d32), manually making the libcall (while overriding the return type to v2i64 or passing the arguments as pointers to arguments on the stack). X86CallingConv.td doesn't seem to handle i128 at all, otherwise the windows specific behaviours would ideally be implemented as overrides there, in generic code, handling these cases automatically. This fixes https://bugs.llvm.org/show_bug.cgi?id=48940. Differential Revision: https://reviews.llvm.org/D110413
-
Amara Emerson authored
We already import these patterns from SelectionDAG.
-
David Spickett authored
Should fix test failure on Arm/AArch64 quick bots which only build those targets. https://lab.llvm.org/buildbot/#/builders/171/builds/4077
-
Jay Foad authored
Machine verification after RemoveRedundantDebugValues has been disabled since the pass was first added in D105279, but I guess this was just due to copy-and-paste. Enabling it does not show any problems in check-llvm in an LLVM_ENABLE_EXPENSIVE_CHECKS build. Differential Revision: https://reviews.llvm.org/D110688
-