- May 09, 2024
-
-
Nikita Popov authored
Test all commuted variants of the pattern, most of which currently fail to fold.
-
Michael Klemm authored
Fixes bug https://github.com/llvm/llvm-project/issues/90769. Many thanks to @Meinersbur for providing the initial thought and solution to this.
-
chandan singh authored
[OpenMP] [Flang] Resolved Issue llvm#76121: Implemented Check for Unhandled Arguments in __kmpc_fork_call_if (#82221) Root cause: Segmentation fault is caused by null pointer dereference inside the __kmpc_fork_call_if function at https://github.com/llvm/llvm-project/blob/main/openmp/runtime/src/z_Linux_asm.S#L1186 . __kmpc_fork_call_if is missing case to handle argc=0 . Fix: Added a check inside the __kmp_invoke_microtask function to handle the case when argc is 0. --------- Co-authored-by:
Singh <chasingh@amd.com>
-
Craig Topper authored
It is already initialized in RISCVTargetMachine.cpp
-
Craig Topper authored
We failed to use BSETI when bit 31 was set and a few bits above bit 31 were set. We also failed to use multiple BSETI when the low 32 bits were zero. I've removed the special cases for constants 0x80000000-0xffffffff and wrote a more generic algorithm for BSETI. I've rewritten the BCLRI handling to be similar to the new BSETI algorithm. This picks up cases where bit 31 is 0 and only a few high bits are 0.
-
Nikita Popov authored
String pool merging currently, for a reason that's not entirely clear to me, tries to create GEP instructions instead of GEP constant expressions when replacing constant references. It only uses constant expressions in cases where this is required. However, it does not catch all cases where such a requirement exists. For example, the landingpad catch clause has to be a constant. Fix this by always using the constant expression variant, which also makes the implementation simpler. Additionally, there are some edge cases where even replacement with a constant GEP is not legal. The one I am aware of is the llvm.eh.typeid.for intrinsic, so add a special case to forbid replacements for it. Fixes https://github.com/llvm/llvm-project/issues/88844.
-
Nikita Popov authored
-
Luke Lau authored
-
Nikita Popov authored
These used both lower and upper case variants of the same name, resulting in malformed check lines when regenerated.
-
Nikita Popov authored
-
Nikita Popov authored
These tests did not test what they were supposed to. The transform fails to actually handle the commuted cases.
-
Zixu Wang authored
`Count` and `Skip` should use `uint64_t` as they are encoded/decoded using 64-bit ULEB128. In `*_OPCODE_DO_*_ULEB_TIMES_SKIPPING_ULEB`, `Skip` could be encoded as a two's complement for moving `SegmentOffset` backwards. Having a 32-bit `Skip` truncates the encoded value and leads to a malformed `AdvanceAmount` and invalid `SegmentOffset` that extends past valid sections.
-
Felix (Ting Wang) authored
Under some circumstance (library loaded with the main program), TLS initial-exec model can be applied to local-dynamic access(es). We could use some simple heuristic to decide the update at function level: * If there is equal or less than a number of TLS local-dynamic access(es) in the function, use TLS initial-exec model. (the threshold which default to 1 is controlled by hidden option)
-
Artem Dergachev authored
Fixes #90498. Same as 5337efc6 for atomic builtins, but for `std::atomic` this time. This is useful because even though the actual builtin atomic is still there, it may be buried beyond the inlining depth limit. Also add one popular custom smart pointer class name to the name-based heuristics, which isn't necessary to fix the bug but arguably a good idea regardless.
-
Maksim Panchenko authored
A compiler can generate a redundant indirection for a jump via a fixed jump table target. Add a test case that covers such pattern that covers PIC case. We already have non-PIC case detection. Currently XFAIL.
-
Krystian Stasiowski authored
Fixes a crash caused by #90152.
-
AtariDreams authored
Fixed test for #88193
-
AtariDreams authored
It is inaccurate and needs to be corrected.
-
Craig Topper authored
[RISCV] Don't use std::vector<std::string> for split extensions in RISCVISAInfo::parseArchString. NFC (#91538) We can use a SmallVector<StringRef>. Adjust the code so we check for empty strings in the loop instead of making a copy of the vector returned from StringRef::split. This overlaps with #91532 which also removed the std::vector, but that PR may be more controversial.
-
Mircea Trofin authored
This adds the instrumentation lowering pass. (Tracking Issue: #89287, RFC referenced there)
-
Slava Zakharin authored
The lowering produces fir.dummy_scope operation if the current function has dummy arguments. Each hlfir.declare generated for a dummy argument is then using the result of fir.dummy_scope as its dummy_scope operand. This is only done for HLFIR. I was not able to find a reliable way to identify dummy symbols in `genDeclareSymbol`, so I added a set of registered dummy symbols that is alive during the variables instantiation for the current function. The set is initialized during the mapping of the dummy argument symbols to their MLIR values. It is reset right after all variables are instantiated - this is done to avoid generating hlfir.declare operations with dummy_scope for the clones of the dummy symbols (e.g. this happens with OpenMP privatization). If this can be done in a cleaner way, please advise.
-
Craig Topper authored
This can be LI+BCLRI+BCLRI.
-
Craig Topper authored
-
Arthur Eubanks authored
This reverts commit 2475efa9. Causes crashes, see comments on https://github.com/llvm/llvm-project/commit/2475efa91d8b4fa8f1a2d16052cb6d14be7d5dc6.
-
Augusto Noronha authored
-
Mingming Liu authored
A related change is https://reviews.llvm.org/D133121, which correctly preserves both branch weights and value profiles for invoke instruction. * If the branch weight of the `invokeinst` specifies taken / not-taken branches, there is no scale.
-
Kazu Hirata authored
-
Dave Lee authored
Adds a `show_function_display_name` parameter to `SymbolContext::DumpStopContext`. This parameter defaults to false, but `BreakpointLocation::GetDescription` sets it to true. This is NFC in mainline lldb, and will be used to modify how Swift breakpoint locations are printed.
-
lntue authored
-
David Green authored
This is useful when the inner add has multiple uses, and so cannot be canonicalized by pushing the constants down through the mul. This patch adds patterns for both `add(mul(add(A, CA), CM), CB)` and with an extra add `add(add(mul(add(A, CA), CM), B) CB)` as the second can come up when lowering geps.
-
Simon Pilgrim authored
Sibling patch to #89897
-
Teresa Johnson authored
If directed by an option, update hints on calls to new that already provide a hot/cold hint.
-
Dave Lee authored
Give language plugins the opportunity to provide a language specific display name. This will be used in a follow up commit. The purpose of this change is to ultimately display breakpoint locations with a more human friendly demangling of Swift symbols.
-
Andrzej Warzyński authored
The folder for arith::CeilDivSIOp should only be applied when it can be guaranteed that no overflow would happen. The current implementation works fine when both dividends are positive and the only arithmetic operation is the division itself. However, in cases where either the dividend or divisor is negative (or both), the division is split into multiple arith operations, e.g.: `- ( -a / b)`. That's additional 2 operations on top of the actual division that can overflow - the folder should check all 3 ops for overflow. The current logic doesn't do that - it effectively only checks the last operation (i.e. the division). It breaks when using e.g. MININT values (e.g. -128 for 8-bit integers) - negating such values overflows. This PR makes sure that no folding happens if any of the intermediate arithmetic operations overflows. Fixes https://github.com/llvm/llvm-project/issues/89382
-
Stanislav Mekhanoshin authored
NFCI as far as I understand, added for consitency.
-
Joseph Huber authored
Summary: This gets the target's corresponding ELF value from the preprocessor. We use this to detect if a given ELF is compatible with the CPU offloading impolementation for OpenMP. Previously we used defitions from CMake, but this is easier for people to understand as there may be new users of this in the future.
-
Thomas Raoux authored
Allow more cleanups on inline_asm ops modeling side effects based on the side_effect attributed.
-
David Green authored
-
Mariusz Borsa authored
The way the LIT RUN command is currently constructed ( %run not --crash %t ) causes the test failure on devices - since 'not' is a LLVM built command, not available on devices. Changing the command to read 'not --crash %run %t' fixes it, as 'not' now executes on the host running the test. rdar://115914588 Co-authored-by:
Mariusz Borsa <m_borsa@apple.com>
-
Florian Hahn authored
Add a set of tests with non-constant backward dependences, where the minimum value is known (via the start value of the outer AddRec).
-