- May 31, 2021
-
-
Matthias Springer authored
Fold away in_bounds attribute even if the transfer op has a non-identity permutation map. Differential Revision: https://reviews.llvm.org/D103133
-
cynecx authored
https://reviews.llvm.org/D95745 introduced a new `unwind` keyword for inline assembler expressions. Inline asms marked with the `unwind` keyword allows stack unwinding from inline assembly because the compiler emits unwinding information ("around" the inline asm) as it would for calls/invokes. Unwinding the stack from within non-unwind inline asm may cause UB. Reviewed By: Amanieu Differential Revision: https://reviews.llvm.org/D102642
-
Martin Storsjö authored
Due to issues with the detection of the clang-verify feature, these tests have been skipped in the Windows CI configuration so far. Differential Revision: https://reviews.llvm.org/D103308
-
Tres Popp authored
-
Kadir Cetinkaya authored
-
Hyeongyu Kim authored
As noted in PR45210: https://bugs.llvm.org/show_bug.cgi?id=45210 ...the bug is triggered as Eli say when sext(idx) * ElementSize overflows. ``` // assume that GV is an array of 4-byte elements GEP = gep GV, 0, Idx // this is accessing Idx * 4 L = load GEP ICI = icmp eq L, value => ICI = icmp eq Idx, NewIdx ``` The foldCmpLoadFromIndexedGlobal function simplifies GEP+load operation to icmp. And there is a problem because Idx * ElementSize can overflow. Let's assume that the wanted value is at offset 0. Then, there are actually four possible values for Idx to match offset 0: 0x00..00, 0x40..00, 0x80..00, 0xC0..00. We should return true for all these values, but currently, the new icmp only returns true for 0x00..00. This problem can be solved by masking off (trailing zeros of ElementSize) bits from Idx. ``` ... => Idx' = and Idx, 0x3F..FF ICI = icmp eq Idx', NewIdx ``` Reviewed By: efriedma Differential Revision: https://reviews.llvm.org/D99481
-
Ben Shi authored
Reviewed By: dylanmckay Differential Revision: https://reviews.llvm.org/D98335
-
Bruce Mitchener authored
Differential Revision: https://reviews.llvm.org/D103381
-
- May 30, 2021
-
-
Chris Lattner authored
CSE is the only client of this API, refactor it a bit to pull the query internally to make changes to DominanceInfo a bit easier. This commit also improves comments a bit.
-
Lang Hames authored
-
Lang Hames authored
OrcRTCWrapperFunctionResult is a C struct that can be used to return serialized results from "wrapper functions" -- functions that deserialize an argument buffer, call through to an actual implementation function, then serialize and return the result of that function. Wrapper functions allow calls between ORC and the ORC Runtime to be written using a single signature, WrapperFunctionResult(const char *ArgData, size_t ArgSize), and without coupling either side to a particular transport mechanism (in-memory, TCP, IPC, ... the actual mechanism will be determined by the TargetProcessControl implementation). OrcRTCWrapperFunctionResult is designed to allow small serialized buffers to be returned by value, with larger serialized results stored on the heap. They also provide an error state to report failures in serialization/deserialization.
-
David Green authored
This ensures that the operands of any gather/scatter instructions that we attempt to push out of the loop are invariant, preventing invalid IR from being generated.
-
Ben Shi authored
Reviewed By: dylanmckay Differential Revision: https://reviews.llvm.org/D96394
-
Florian Hahn authored
A couple of additional tests inspired by PR50511.
-
Butygin authored
Differential Revision: https://reviews.llvm.org/D103237
-
Ben Shi authored
Reviewed By: dylanmckay Differential Revision: https://reviews.llvm.org/D97669
-
Roman Lebedev authored
This patch starts to produce a very obvious false-positives, despite the fact the preexisting tests already cover the pattern. they clearly don't actually cover it. https://godbolt.org/z/3zdqvbfxj This reverts commit 1709bb8c.
-
Florian Hahn authored
-
Sanjay Patel authored
This is similar to the fix in c590a988 ( PR49832 ), but we missed handling the pattern for select of bools (no compare inst). We can't substitute a vector value because the equality condition replacement that we are attempting requires that the condition is true/false for the entire value. Vector select can be partly true/false. I added an assert for vector types, so we shouldn't hit this again. Fixed formatting while auditing the callers. https://llvm.org/PR50500
-
Florian Hahn authored
extractelement is poison if the index is out-of-bounds, so just scalarizing the load may introduce an out-of-bounds load, which is UB. To avoid introducing new UB, we can mask the index so it only contains valid indices. Fixes PR50382. Reviewed By: efriedma Differential Revision: https://reviews.llvm.org/D103077
-
Mindong Chen authored
When you try to define a new DEBUG_TYPE in a header file, DEBUG_TYPE definition defined around the #includes in files include it could result in redefinition warnings even compile errors. Reviewed By: tejohnson Differential Revision: https://reviews.llvm.org/D102594
-
Pengxuan Zheng authored
Using the proper API automatically sets `__stack_chk_guard` to `dso_local` if `Reloc::Static`. This wasn't strictly necessary until recently when dso_local was no longer implied by `TargetMachine::shouldAssumeDSOLocal` for `__stack_chk_guard`. By using the proper API, we can avoid generating unnecessary GOT relocations. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D102646
-
Arthur Eubanks authored
This reverts commit 1c7f3233. Some code still needs to properly set parameter ABI attributes, see D101806.
-
Arthur Eubanks authored
This reverts commit bc7d15c6. Dependent change is to be reverted.
-
Xuanda Yang authored
source: https://bugs.llvm.org/show_bug.cgi?id=50214 Make sizeof pointer type compatible with void* in MallocSizeofChecker. Reviewed By: NoQ Differential Revision: https://reviews.llvm.org/D103358
-
Arthur O'Dwyer authored
Differential Revision: https://reviews.llvm.org/D102781
-
Arthur O'Dwyer authored
It looks to me as if *every* helper header needs to be added to the modulemap, actually; which is unfortunate since we keep proliferating them at such a rapid pace.
-
- May 29, 2021
-
-
Fangrui Song authored
-
Arthur O'Dwyer authored
Drive-by minor improvements to a couple of uses of min_pointer. Differential Revision: https://reviews.llvm.org/D103366
-
David Green authored
If the operand of the WhileLoopStart is flagged as killed, that currently gets propogated to both the t2CMPri as the instruction is reverted, and the newly created t2DoLoopStart. Only the second should remain as killing the operand, the first dropping the flags.
-
Chris Lattner authored
This avoids trying to find the RegionKindInterface for every operation in the program, we only need it if they have regions. Differential Revision: https://reviews.llvm.org/D103367
-
Chris Lattner authored
Differential Revision: https://reviews.llvm.org/D103365
-
mydeveloperday authored
{D74265} reduced the aggressiveness of line breaking following C# attributes, however this change removed any support for attributes on properties, causing significant ugliness to be introduced. This revision goes some way to addressing that by re-introducing the more aggressive check to `mustBreakBefore()`, but constraining it to the most common cases where we use properties which should not impact the "caller info attributes" or the "[In , Out]" decorations that are normally put on pinvoke It does not address my additional concerns of the original change regarding multiple C# attributes, as these are somewhat incorrectly handled by virtue of the fact its not recognising the second attribute as an attribute at all. But instead thinking its an array. The purpose of this revision is to get back to where we were for the most common of cases as a stepping stone to resolving this. However {D74265} has broken a lot of C# code and this revision will go someway alone to addressing the majority. Reviewed By: jbcoe, HazardyKnusperkeks, curdeius Differential Revision: https://reviews.llvm.org/D103307
-
Jessica Clarke authored
The replacement doesn't work for llc, but it is needed by patchable-function-entry.ll. This reverts commit aa9a30b8.
-
Jessica Clarke authored
On FreeBSD, absolute paths are passed unmodified in AT_EXECPATH, but relative paths are resolved to absolute paths, and any symlinks will be followed in the process. This means that the resource dir calculation will be wrong if Clang is invoked as an absolute path to a symlink, and this currently causes clang/test/Driver/rocm-detect.hip to fail on FreeBSD. Thus, make sure to call realpath on the result, just like is done on macOS. Whilst here, clean up the old fallback auxargs loop to use the actual type for auxargs rather than using lots of hacky casts that rely on addresses and pointers being the same (which is not the case on CHERI, and thus Arm's prototype Morello, although for little-endian systems it happens to work still as the word-sized integer will be padded to a full pointer, and it's someone academic given dereferencing past the end of environ will give a bounds fault, but CheriBSD is new enough that the elf_aux_info path will be used). This also makes the code easier to follow, and removes the confusing double-increment of p. Reviewed By: dim, arichardson Differential Revision: https://reviews.llvm.org/D103346
-
Jessica Clarke authored
Whilst here, also remove a couple of unnecessary -o - instances. Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D103201
-
Sanjay Patel authored
This does not solve PR17101, but it is one of the underlying diffs noted here: https://bugs.llvm.org/show_bug.cgi?id=17101#c8 We could ease the one-use checks for the 'clear' (no 'not' op) half of the transform, but I do not know if that asymmetry would make things better or worse. Proofs: https://rise4fun.com/Alive/uVB Name: masked bit set %sh1 = shl i32 1, %y %and = and i32 %sh1, %x %cmp = icmp ne i32 %and, 0 %r = zext i1 %cmp to i32 => %s = lshr i32 %x, %y %r = and i32 %s, 1 Name: masked bit clear %sh1 = shl i32 1, %y %and = and i32 %sh1, %x %cmp = icmp eq i32 %and, 0 %r = zext i1 %cmp to i32 => %xn = xor i32 %x, -1 %s = lshr i32 %xn, %y %r = and i32 %s, 1 Note: this is a re-post of a patch that I committed at: rGa041c4ec6f7a The commit was reverted because it exposed another bug: rGb212eb7159b40 But that has since been corrected with: rG8a156d1c2795189 ( D101191 ) Differential Revision: https://reviews.llvm.org/D72396
-
Sanjay Patel authored
-
Denys Petrov authored
Summary: Make StoreManager::castRegion function usage safier. Replace `const MemRegion *` with `Optional<const MemRegion *>`. Simplified one of related test cases due to suggestions in D101635. Differential Revision: https://reviews.llvm.org/D103319
-
Ulrich Weigand authored
The implementation of subword atomics does not actually guarantee the result is zero-extended, which now caused build bot failures after https://reviews.llvm.org/D101342 was landed.
-