- Sep 30, 2021
-
-
Stefan Pintilie authored
This patch makes sure that the builtins __builtin_ppc_load8r and __ builtin_ppc_store8r are only available for Power 7 and up. Currently the builtins seem to produce incorrect code if used for Power 6 or before. Reviewed By: nemanjai, #powerpc Differential Revision: https://reviews.llvm.org/D110653
-
Roman Lebedev authored
-
Roman Lebedev authored
-
Daniil Fukalov authored
-
Sjoerd Meijer authored
It can happen that after widening of the IV, flattening may not be possible, e.g. when it is deemed unprofitable. We were not properly checking this, which resulted in flattening being applied when it shouldn't, also leading to incorrect results (miscompilation). This should fix PR51980 (https://bugs.llvm.org/show_bug.cgi?id=51980) Differential Revision: https://reviews.llvm.org/D110712
-
Roman Lebedev authored
The only sched models that for cpu's that support avx2 but not avx512 are: haswell, broadwell, skylake, zen1-3 For load we have: https://godbolt.org/z/xz6x7c35P - for intels `Block RThroughput: =6.0`; for ryzens, `Block RThroughput: <=2.5` So pick cost of `6`. For store we have: https://godbolt.org/z/xz6x7c35P - for intels `Block RThroughput: =4.0`; for ryzens, `Block RThroughput: <=2.0` So pick cost of `4`. I'm directly using the shuffling asm the llc produced, without any manual fixups that may be needed to ensure sequential execution. Reviewed By: RKSimon Differential Revision: https://reviews.llvm.org/D110709
-
Roman Lebedev authored
The only sched models that for cpu's that support avx2 but not avx512 are: haswell, broadwell, skylake, zen1-3 For load we have: https://godbolt.org/z/a9hv4z47v - for intels `Block RThroughput: =4.0`; for ryzens, `Block RThroughput: =2.0` So pick cost of `4`. For store we have: https://godbolt.org/z/6GfPn1b79 - for intels `Block RThroughput: =3.0`; for ryzens, `Block RThroughput: <=2.0` So pick cost of `3`. I'm directly using the shuffling asm the llc produced, without any manual fixups that may be needed to ensure sequential execution. Reviewed By: RKSimon Differential Revision: https://reviews.llvm.org/D110708
-
Roman Lebedev authored
The only sched models that for cpu's that support avx2 but not avx512 are: haswell, broadwell, skylake, zen1-3 Identical to VF=2. For load we have: https://godbolt.org/z/4TEbdzbMM - for intels `Block RThroughput: =2.0`; for ryzens, `Block RThroughput: <=1.0` So pick cost of `2`. For store we have: https://godbolt.org/z/MYfzGPf3Y - for intels `Block RThroughput: =1.0`; for ryzens, `Block RThroughput: <=0.5` So pick cost of `1`. I'm directly using the shuffling asm the llc produced, without any manual fixups that may be needed to ensure sequential execution. Reviewed By: RKSimon Differential Revision: https://reviews.llvm.org/D110705
-
Roman Lebedev authored
The only sched models that for cpu's that support avx2 but not avx512 are: haswell, broadwell, skylake, zen1-3 Identical to VF=2. For load we have: https://godbolt.org/z/sGE41GYo7 - for intels `Block RThroughput: =2.0`; for ryzens, `Block RThroughput: <=1.0` So pick cost of `2`. For store we have: https://godbolt.org/z/ba5r3s9xa - for intels `Block RThroughput: =1.0`; for ryzens, `Block RThroughput: <=0.5` So pick cost of `1`. I'm directly using the shuffling asm the llc produced, without any manual fixups that may be needed to ensure sequential execution. Reviewed By: RKSimon Differential Revision: https://reviews.llvm.org/D110704
-
Roman Lebedev authored
The only sched models that for cpu's that support avx2 but not avx512 are: haswell, broadwell, skylake, zen1-3 For load we have: https://godbolt.org/z/caKqjr9hb - for intels `Block RThroughput: =2.0`; for ryzens, `Block RThroughput: <=1.0` So pick cost of `2`. For store we have: https://godbolt.org/z/6TTn3eKj8 - for intels `Block RThroughput: =1.0`; for ryzens, `Block RThroughput: <=0.5` So pick cost of `1`. I'm directly using the shuffling asm the llc produced, without any manual fixups that may be needed to ensure sequential execution. Reviewed By: RKSimon Differential Revision: https://reviews.llvm.org/D110702
-
Muiez Ahmed authored
Differential Revision: https://reviews.llvm.org/D110650
-
Wesley Wiser authored
`__stdcall`, `__fastcall` and `__vectorcall` return large values via a hidden pointer argument. However, the size of that argument should not be included in the argument list byte count suffix added to the function's decorated name. This patch fixes that issue so that LLVM generates the same decorated name as MSVC does. MSVC example: https://godbolt.org/z/nc35MKPhr Reviewed By: rnk Differential Revision: https://reviews.llvm.org/D110719
-
Alex Langford authored
This change accomplishes the following: - Moves `IRExecutionUnit::FindBestAlternateMangledName` to `Language`. - Renames `FindBestAlternateMangledName` to `FindBestAlternateFunctionMangledName` - Changes the first parameter of said method from a `ConstString` representing a demangled name to a `Mangled`. - Remove the use of CPlusPlusLanguage from Expression
-
Martin Storsjö authored
Generate the llvm-lit script in runtimes/CmakeFiles.txt unless invoked from llvm/runtimes. Differential Revision: https://reviews.llvm.org/D109593
-
Nico Weber authored
-
Jay Foad authored
This was introduced in D32628 but it does not seem to be required any more. At least it does not show any problems in check-llvm in an LLVM_ENABLE_EXPENSIVE_CHECKS build. Differential Revision: https://reviews.llvm.org/D110692
-
Louis Dionne authored
-
Dan Liew authored
ad890aa2 landed a test without using the `%run` prefix which means the test fails to run for platforms that need it (e.g. iOS simulators). This patch adds the `%run` prefix. While we're here also split the single `RUN` line into two to make debugging easier. rdar://83637296 Differential Revision: https://reviews.llvm.org/D110734
-
Petr Hosek authored
{x86_64,aarch64}-unknown-fuchsia and {x86_64,aarch64}-fuchsia should behave identically as targets, update the test to make sure that's the case. Differential Revision: https://reviews.llvm.org/D110687 -
Nico Weber authored
clang-cl maps /wdNNNN to -Wno-flags for a few warnings that map cleanly from cl.exe concepts to clang concepts. This patch adds support for the same numbers to `#pragma warning(disable : NNNN)`. It also lets `#pragma warning(push)` and `#pragma warning(pop)` have an effect, since these are used together with `warning(disable)`. The optional numeric argument to `warning(push)` is ignored, as are the other non-`disable` `pragma warning()` arguments. (Supporting `error` would be easy, but we also don't support `/we`, and those should probably be added together.) The motivating example is that a bunch of code (including in LLVM) uses this idiom to locally disable warnings about calls to deprecated functions in Windows-only code, and 4996 maps nicely to -Wno-deprecated-declarations: #pragma warning(push) #pragma warning(disable: 4996) f(); #pragma warning(pop) Implementation-wise: - Move `/wd` flag handling from Options.td to actual Driver-level code - Extract the function mapping cl.exe IDs to warning groups to the new file clang/lib/Basic/CLWarnings.cpp - Create a diag::Group enum so that CLWarnings.cpp can refer to existing groups by ID (and give DllexportExplicitInstantiationDecl a named group), and add a function to map a diag::Group to the spelling of it's associated commandline flag - Call that new function from PragmaWarningHandler Differential Revision: https://reviews.llvm.org/D110668 -
Louis Dionne authored
This is consistent with what we've been doing forever.
-
Sanjay Patel authored
This was noticed in: https://llvm.org/PR51351 https://alive2.llvm.org/ce/z/aLxunD
-
Aart Bik authored
The lack of negi details leaked from merger class into codegen part. Also, special case for vector code was not needed, the type can be used directly! Reviewed By: bixia Differential Revision: https://reviews.llvm.org/D110677
-
Walter Erquinigo authored
Usage of aux_size is guarded against elsewhere in this file, but is missing here. Reviewed By: wallace Differential Revision: https://reviews.llvm.org/D110269 Original Author: calebzulawski
-
Eric Schweitz authored
Move builders to .cpp file and update accordingly. This patch is part of the upstreaming effort from fir-dev branch. Reviewed By: kiranchandramohan Differential Revision: https://reviews.llvm.org/D110698 Co-authored-by:
Jean Perier <jperier@nvidia.com> Co-authored-by:
Valentin Clement <clementval@gmail.com>
-
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.
-