- Oct 31, 2023
-
-
Vlad Serebrennikov authored
This patch backports a one-liner `std::to_underlying` that came with C++23. This is useful for refactoring unscoped enums into scoped enums, because the latter are not implicitly convertible to integer types. I followed libc++ implementation, but I consider their testing too heavy for us, so I wrote a simpler set of tests.
-
Jan Kokemüller authored
The calls to std::construct_at might overwrite the previously set __has_value_ flag in the case where the flag is overlapping with the actual value or error being stored (since we use [[no_unique_address]]). To fix this issue, this patch ensures that we initialize the __has_value_ flag after we call std::construct_at. Fixes #68552
-
Igor Kirillov authored
* Enhanced the logic of ExpandMemCmp pass to merge contiguous subsequences in LoadSequence, based on sizes allowed in `AllowedTailExpansions`. * This enhancement seeks to minimize the number of basic blocks and produce optimized code when using memcmp with non-register aligned sizes. * Enable this feature for AArch64 with memcmp sizes modulo 8 equal to 3, 5, and 6. Reapplication of #69942 after fixing a bug
-
Philip Reames authored
To reduce the spurious test delta in an upcoming change.
-
Jon Chesterfield authored
I think it follows from the HSA spec that a write to the first byte is deemed significant to the GPU in which case writing to the second short and reading back from it later would be safe. However, the examples for this all involve an atomic write to the first 32 bits and it seems a credible risk that the occasional CI errors abound invalid packets have as their root cause that the firmware notices the early write to packet->setup and treats that as a sign that the packet is ready to go. That was overly-paranoid, however in passing noticed the code in libc is genuinely invalid. The memset writes a zero to the header byte, changing it from type_invalid (1) to type_vendor (0), at which point the GPU is free to read the 64 byte packet and interpret it as a vendor packet, which is probably why libc CI periodically errors about invalid packets. Also a drive by change to do the atomic store on a uint32_t consistently. I'm not sure offhand what __atomic_store_n on a uint16_t* and an int resolves to, seems better to be unambiguous there.
-
Antonio Frighetto authored
AArch64 backend now features v8.4a atomic Load-Acquire RCpc and Store-Release register unscaled support.
-
Antonio Frighetto authored
-
Simon Pilgrim authored
Fix discrepancy from when this was forked from the SkylakeServer model Confirmed with Agner + uops.info
-
Simon Pilgrim authored
-
DaPorkchop_ authored
This makes __builtin_bit_cast support converting to and from vector types in a constexpr context.
-
Valentin Clement (バレンタイン クレメン) authored
The location set on atomic operations in both OpenMP and OpenACC was completly off. The real location needs to be created from the source CharBlock of the parse tree node of the respective atomic statement. This patch updates locations in lowering for atomic operations.
-
Nikita Popov authored
This reverts commit 1770a2e3. Stage 2 llvm-tblgen crashes when generating X86GenAsmWriter.inc and other files.
-
Craig Topper authored
This is consistent with the IR verifier and SelectionDAG's getNode. Update tests accordingly. I tried to keep some coverage of non-pow2 when possible. X86 didn't like a G_UNMERGE_VALUES from s48 to 3 s16 that got created when I tried s48.
-
Leandro Lupori authored
TotalElementCount() was modified to return std::optional<uint64_t>, where std::nullopt means overflow occurred. Besides the additional check in RESHAPE folding, all callers of TotalElementCount() were changed, to also check for overflows.
-
Craig Topper authored
-
Michael Buch authored
These tests were failing on the LLDB public matrix build-bots for older clang versions: ``` clang-7: warning: argument unused during compilation: '-nostdlib++' [-Wunused-command-line-argument] error: invalid value 'c++20' in '-std=c++20' note: use 'c++98' or 'c++03' for 'ISO C++ 1998 with amendments' standard note: use 'gnu++98' or 'gnu++03' for 'ISO C++ 1998 with amendments and GNU extensions' standard note: use 'c++11' for 'ISO C++ 2011 with amendments' standard note: use 'gnu++11' for 'ISO C++ 2011 with amendments and GNU extensions' standard note: use 'c++14' for 'ISO C++ 2014 with amendments' standard note: use 'gnu++14' for 'ISO C++ 2014 with amendments and GNU extensions' standard note: use 'c++17' for 'ISO C++ 2017 with amendments' standard note: use 'gnu++17' for 'ISO C++ 2017 with amendments and GNU extensions' standard note: use 'c++2a' for 'Working draft for ISO C++ 2020' standard note: use 'gnu++2a' for 'Working draft for ISO C++ 2020 with GNU extensions' standard make: *** [main.o] Error 1 ``` The test fails because we try to compile it with `-std=c++20` (which is required for std::chrono::{days,weeks,months,years}) on clang versions that don't support the `-std=c++20` flag. We could change the test to conditionally compile the C++20 parts of the test based on the `-std=` flag and have two versions of the python tests, one for the C++11 chrono features and one for the C++20 features. This patch instead just disables the test on older clang versions (because it's simpler and we don't really lose important coverage). -
-
Jake Egan authored
…off support Same as D135848. The newly added test fails with `fatal error: error in backend: Objective-C support is unimplemented for object file format`.
-
Adrian Prantl authored
The code was incorrectly going into the wrong direction by removing one component instead of appendeing /Developer to it. Due to fallback mechanisms in xcrun this never seemed to have caused any issues.
-
Craig Topper authored
This is needed because GISel emits copies instead of bitcasts like SelectionDAG.
-
Valentin Clement (バレンタイン クレメン) authored
Switch the representation from scalar integer to a enumeration. The parser transform the string in the input to the correct enumeration.
-
Jay Foad authored
Implement codegen for: llvm.amdgcn.raw.buffer.atomic.cmpswap.i64 llvm.amdgcn.raw.ptr.buffer.atomic.cmpswap.i64 llvm.amdgcn.struct.buffer.atomic.cmpswap.i64 llvm.amdgcn.struct.ptr.buffer.atomic.cmpswap.i64
-
Louis Dionne authored
[libc++][tests] Fix a few remaining instances of outdated static assertion regexes in our test suite (#70454) This is a re-application of 166b3a86, which was reverted in fde1ecde because it broke some tests.
-
Arthur Eubanks authored
When directly compiling to an object file we properly set the section flag, but not when emitting assembly.
-
Timm Bäder authored
-
Z572 authored
Fixes #68653
-
Alan Phipps authored
Part 1 of 3. This includes the LLVM back-end processing and profile reading/writing components. compiler-rt changes are included. Differential Revision: https://reviews.llvm.org/D138846
-
Valentin Clement (バレンタイン クレメン) authored
After #69944 lowering of array ref in atomic operation works properly. Add some lowering test to catch up regression in the future.
-
- Oct 30, 2023
-
-
LLVM GN Syncbot authored
-
Nick Desaulniers authored
Fixes a bug introduced by commit b54294e2 ("[clang][ConstantEmitter] have tryEmitPrivate[ForVarInit] try ConstExprEmitter fast-path first") In the added test case, the QualType is a LValueReferenceType. LValueReferenceType 0x558412998d90 'const char (&)[41]' `-ParenType 0x558412998d30 'const char[41]' sugar `-ConstantArrayType 0x558412998cf0 'const char[41]' 41 `-QualType 0x55841294c271 'const char' const `-BuiltinType 0x55841294c270 'char' Fixes: #69979
-
David Spickett authored
For most register sets, if it was enabled this meant you could use it, it was present in the process. There was no present but turned off state. So "enabled" made sense. Then ZA came along (and soon to be ZT0) where ZA can be present in the hardware when you have SME, but ZA itself can be made inactive. This means that "IsZAEnabled()" doesn't mean is it active, it means do you have SME. Which is very confusing when we actually want to know if ZA is active. So instead say "IsZAPresent", to make these checks more specific. For things that can't be made inactive, present will imply "active" as they're never inactive.
-
tsitdikov authored
All usages of the variable have been removed in https://github.com/llvm/llvm-project/pull/68689, we now need to clean it up.
-
Natalie Chouinard authored
This test has been failing since the SPIR-V backend started failing explicitly on unsupported shader types. Switched this test to a compute shader since it is currently the only type supported.
-
Timm Baeder authored
The added test case used to fail because we converted the LHS to `-1`.
-
Jessica Del authored
These new intrinsics, `amdgcn_wmma_tied_f16_16x16x16_f16` and `amdgcn_wmma_tied_f16_16x16x16_f16`, explicitly tie the destination accumulator matrix to the input accumulator matrix. The `wmma_f16` and `wmma_bf16` intrinsics only write to 16-bit of the 32-bit destination VGPRs. Which half is determined via the `op_sel` argument. The other half of the destination registers remains unchanged. In some cases however, we expect the destination to copy the other halves from the input accumulator. For instance, when packing two separate accumulator matrices into one. In that case, the two matrices are tied into the same registers, but separate halves. Then it is important to copy the other matrix values to the new destination.
-
Luke Lau authored
We currently have three postprocess peephole optimisations for vector pseudos: 1) Masked pseudo with all ones mask -> unmasked pseudo 2) Merge vmerge pseudo into operand pseudo's mask 3) vmerge pseudo with all ones mask -> vmv.v.v pseudo This patch aims to move these peepholes out of SelectionDAG and into a separate RISCVFoldMasks MachineFunction pass. There are a few motivations for doing this: * The current SelectionDAG implementation operates on MachineSDNodes, which are essentially MachineInstrs but require a bunch of logic to reason about chain and glue operands. The RISCVII::has*Op helper functions also don't exactly line up with the SDNode operands. Mutating these pseudos and their operands in place becomes a good bit easier at the MachineInstr level. For example, we would no longer need to check for cycles in the DAG during performCombineVMergeAndVOps. * Although it's further down the line, moving this code out of SelectionDAG allows it to be reused by GlobalISel later on. * In performCombineVMergeAndVOps, it may be possible to commute the operands to enable folding in more cases (see test/CodeGen/RISCV/rvv/vmadd-vp.ll). There is existing machinery to commute operands in TII::commuteInstruction, but it's implemented on MachineInstrs. The pass runs straight after ISel, before any of the other machine SSA optimization passes run. This is so that dead-mi-elimination can mop up any vmsets that are no longer used (but if preferred we could try and erase them from inside RISCVFoldMasks itself). This also means that these peepholes are no longer run at codegen -O0, so this patch isn't strictly NFC. Only the performVMergeToVMv peephole is refactored in this patch, the remaining two would be implemented later. And as noted by @preames, it should be possible to move doPeepholeSExtW out of SelectionDAG as well.
-
Stanislav Mekhanoshin authored
This allows folding of 64-bit operands if fit into 32-bit. Fixes https://github.com/llvm/llvm-project/issues/67781
-
Stanislav Mekhanoshin authored
We can use sign extended 64-bit literals, but only for signed operands. At the moment we do not know if an operand is signed. Such operand will be encoded as its low 32 bits and then either correctly sign extended or incorrectly zero extended by HW.
-
cor3ntin authored
Per https://eel.is/c++draft/dcl.fct.def.default#2.2, the explicit object parameter of a defaulted special member function must be of the same type as the one of an equivalent implicitly defaulted function, ignoring references. Fixes #69233
-