- Mar 30, 2022
-
-
Aaron Ballman authored
Member access for an atomic structure or union is unconditional undefined behavior (C11 6.5.2.3p5). However, we would issue a confusing error message about the base expression not being a structure or union type. GCC issues a warning for this case. Clang now warns as well, but the warning is defaulted to an error because the actual access is still unsafe. This fixes Issue 54563.
-
Ron Lieberman authored
Differential Revision: https://reviews.llvm.org/D122658
-
- Mar 29, 2022
-
-
Pavel Labath authored
They are not portable (which meant we had a hand-rolled implementation for windows), and llvm::StringRef provides equivalent functionality.
-
Danny Mösch authored
This was caused by ff60af91. The reason for the failure is that the type `__int128_t` is not available on 32-bit architectures. So just exclude the test case if 128-bit integers are not available.
-
Fangrui Song authored
addSectionSymbols suppresses the STT_SECTION symbol if the first input section is non-SHF_MERGE synthetic. This is incorrect when the first input section is synthetic while a non-synthetic input section exists: * `.bss : { *(COMMON) *(.bss) }` (abc388ed regressed the case because COMMON symbols precede .bss in the absence of a linker script) * Place a synthetic section in another section: `.data : { *(.got) *(.data) }` For `%t/a1` in the new test emit-relocs-synthetic.s, ld.lld produces incorrect relocations with symbol index 0. ``` 0000000000000000 <_start>: 0: 8b 05 33 00 00 00 movl 51(%rip), %eax # 0x39 <bss> 0000000000000002: R_X86_64_PC32 *ABS*+0xd 6: 8b 05 1c 00 00 00 movl 28(%rip), %eax # 0x28 <common> 0000000000000008: R_X86_64_PC32 common-0x4 c: 8b 05 06 00 00 00 movl 6(%rip), %eax # 0x18 000000000000000e: R_X86_64_GOTPCRELX *ABS*+0x4 ``` Fix the issue by checking every input section. Reviewed By: ikudrin Differential Revision: https://reviews.llvm.org/D122463 -
Louis Dionne authored
Since we expect the condition to be true most of the time, we might as well tell the compiler. And when assertions are disabled, we might as well tell the compiler that it's allowed to assume that the condition holds. Differential Revision: https://reviews.llvm.org/D122397
-
Louis Dionne authored
-
Hirochika Matsumoto authored
https://alive2.llvm.org/ce/z/94yRMN Fixes #54177 Differential Revision: https://reviews.llvm.org/D122077
-
Johannes Doerfert authored
Somehow those check lines were mostly untested prefixes and the ones we were looking for have been removed. Simple cleanup.
-
Ivan Butygin authored
Differential Revision: https://reviews.llvm.org/D122561
-
Nikita Popov authored
This was erroneously re-introduced as part of bb0b2317.
-
Chris Bieneman authored
Fleshing this out now allows me to rely on enum math to translate values rather than having to translate the off cases. I should have added this in the first pass, but wasn't thinking about it.
-
Nathan Sidwell authored
Each demangler node's match function needs to call the provided functor with constructor arguments. That was omitted from D120905. This adds the new Precedence argument where necessary (and a missing boolean for a module node). The two visitors need updating with a printer for that type, and this adds a stub to cxa_demangle's version. blaikie added one to llvm's. I'll fill out those printers in a followup, rather than wait, so that downstream consumers are unbroken.
-
Louis Dionne authored
This means that re-running with llvm-lit in that configuration will work as expected. This also enables assertions in libc++abi in the Generic-assertions CI job, which was disabled previously. Differential Revision: https://reviews.llvm.org/D122597
-
Simon Pilgrim authored
-
Thomas Preud'homme authored
PowerPC backend relies on each pair of prologue/epilogue of a software pipelined loop to correspond to a single iteration a the loop through its use of the BDZ instruction to skip inner prologues/epilogues and loop kernel. However the interface does not make it clear that it is a valid way to check that the trip count is big enough to execute inner prologues/epilogues and kernel loop. The API also does not specify in which order of prologues the createTripCountGreaterCondition() hook is being called. Knowing that it starts with the last/innermost prologues can help recording some information when createTripCountGreaterCondition() is first executed and reuse it in setPreheader() or adjustTripCount(). This commit documents both aspects. Reviewed By: jmolloy Differential Revision: https://reviews.llvm.org/D122642
-
Javier Setoain authored
We are using "enable-index-optimizations" and "indexOptimizations" as names for an optimization that consists of using i32 for indices within a vector. For instance, when building a vector comparison for mask generation. The name is confusing and suggests a scope beyond these vector indices. This change makes the function of the option explicit in its name. Differential Revision: https://reviews.llvm.org/D122415
-
serge-sans-paille authored
It was already the case for CLI help, also support it for rst output. As a side effect remove redundant (and sometime inconsistent!) value help from HelpText in clang/Driver/Options.td. Differential Revision: https://reviews.llvm.org/D122378
-
Jay Foad authored
This had already been done for some of these files but not all.
-
Sven van Haastregt authored
This simplifies completeness comparisons against OpenCLBuiltins.td and also makes the header no longer "claim" any single-letter identifiers. Continues the direction set out in D119560.
-
David Green authored
D113200 introduced an error where it was converting FP_TO_SI_SAT with multiply to a fixed point floating point convert. The saturation bitwidth needs to be equal to the floating point width, or else the routine would truncate the result as opposed to saturating it. Fixes #54601
-
Florian Hahn authored
Code movement to it slightly easier to use ConstraintTy & co in ConstraintInfo directly, for follow-up patches.
-
Guillaume Chatelet authored
Fixes https://github.com/llvm/llvm-project/issues/53686 Differential Revision: https://reviews.llvm.org/D122481
-
Chenbing Zheng authored
Reviewed By: RKSimon Differential Revision: https://reviews.llvm.org/D121504
-
Uday Bondhugula authored
NFC. Remove dead FlatAffineConstraints constructor. Differential Revision: https://reviews.llvm.org/D122638
-
Zi Xuan Wu authored
Initialize TargetLoweringObjectFileELF and EH header.
-
Zi Xuan Wu authored
In generic cpu model, there are only low 16 registers and little 32-bit instruction. CK801 is the cpu family with least basic features like generic model. Add test run and check for generic cpu model in original test case to cover basic LLVM IR functionality.
-
Liqin Weng authored
Reviewed By: benshi001 Differential Revision: https://reviews.llvm.org/D122282
-
Jean Perier authored
When folding MAXLOC/MINLOC, the current element being compared was moved twice in row in case it became the new extremum. With numeric and logical types, it made no difference (std::move is a no-op for them), but for characters where the string storage is actually moved, it caused the new extremum to be set to the empty string, leading to wrong results. Note: I could have left the first std::move relating to logical Findloc, but it brings nothing and makes the code less auditable, so I also removed it. Differential Revision: https://reviews.llvm.org/D122590
-
Lian Wang authored
Reviewed By: frasercrmck Differential Revision: https://reviews.llvm.org/D122204
-
Markus Böck authored
DR: http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#1479 Clang has implemented this DR as far back as I could go on compiler explorer (3.0). This patch simply adds a test case and needed comments for the update script to mark it as complete. Differential Revision: https://reviews.llvm.org/D122620
-
Argyrios Kyrtzidis authored
-
Serguei Katkov authored
According to definition of canonical form, it is a canonical if scale reg does not contain addrec for loop L then none of bases should contain addrec for this loop. The critical word here is "contains". Current checker of canonical form checks not "containing" property but "is". So it does not check whether it contains but whether it is. Fix the checker and canonicalizing utility to follow definition. Without this fix in the test attached the base formula looking as reg((-1 * {0,+,8}<nuw><nsw><%bb2>)<nsw>) + 1*reg((8 * (%arg /u 8))<nuw>) is considered as conanocial while base contains an addrec. And modified formula we want to insert reg({0,+,8}<nuw><nsw><%bb2>) + 1*reg((-8 * (%arg /u 8))) is considered as not canonical. Reviewed By: mkazantsev Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D122457 -
serge-sans-paille authored
Cleanup a few extra files, this closes the work on libLLVM dependencies on my side. Impact on libLLVM preprocessed output: -35876 lines Discourse thread: https://discourse.llvm.org/t/include-what-you-use-include-cleanup Differential Revision: https://reviews.llvm.org/D122576
-
luxufan authored
Due to D79842, clang dirver would search possible tool name in both possible locations, then moving to the next name. The gcc toolchain `llvm-project/clang/test/Driver/ Inputs/multilib_riscv_elf_sdk` don't have a `riscv64-unknown-elf-ld` executable in `llvm-project/clang/test/Driver/Inputs/multilib_riscv_elf_sdk/bin/`. So when searching `riscv64-unknown-elf-ld`, if there is a `riscv64-unknown-elf-ld` in `PATH`, the test would fail. This patch makes the `PATH` empty when testing it. Differential Revision: https://reviews.llvm.org/D122588
-
Liqin Weng authored
This transform will reduce one GPR. Reviewed By: craig.topper, benshi001 Differential Revision: https://reviews.llvm.org/D122051
-
LLVM GN Syncbot authored
-
Paul Kirth authored
This reverts commit 2add3fbd.
-
Paul Kirth authored
This reverts commit a427e188.
-
Shraiysh Vaishay authored
This patch adds translation for parallel sections from PFT to MLIR. Reviewed By: kiranchandramohan, NimishMishra Differential Revision: https://reviews.llvm.org/D122464
-