- Feb 22, 2021
-
-
Martin Storsjö authored
Differential Revision: https://reviews.llvm.org/D96840
-
Pavel Labath authored
This reapplies 7df4eaaa/D96202, which was reverted due to issues on windows. These were caused by problems in the computation of the liblldb directory, which was fixed by D96779. The original commit message was: Our test configuration logic assumes that the tests can be run either with debugserver or with lldb-server. This is not entirely correct, since lldb server has two "personalities" (platform server and debug server) and debugserver is only a replacement for the latter. A consequence of this is that it's not possible to test the platform behavior of lldb-server on macos, as it is not possible to get a hold of the lldb-server binary. One solution to that would be to duplicate the server configuration logic to be able to specify both executables. However, that seems excessively redundant. A well-behaved lldb should be able to find the debug server on its own, and testing lldb with a different (lldb-|debug)server does not seem very us...
-
Craig Topper authored
This also removes a pattern from RISCV that is no longer needed since the sexti32 on the LHS of the srem in the pattern implies the result is sign extended so the sign_extend_inreg should be removed in DAG combine now. Reviewed By: luismarques, RKSimon Differential Revision: https://reviews.llvm.org/D97133
-
Simon Pilgrim authored
In conjunction with the 'vperm2x128(bitcast(x),bitcast(y),c) -> bitcast(vperm2x128(x,y,c))' fold in combineTargetShuffle, this should remove any unnecessary bitcasts around vperm2x128 lane shuffles.
-
António Afonso authored
This reverts commit a83a825e.
-
madhur13490 authored
Differential Revision: https://reviews.llvm.org/D97157
-
António Afonso authored
VSCode was not being informed whenever a location had been resolved (after being initated as non-resolved), so even though it was actually resolved, the IDE would show a hollow dot (instead of a red dot) because it didn't know about the change. Differential Revision: https://reviews.llvm.org/D96680
-
Nikita Popov authored
FindAvailableLoadedValue() accepts an iterator by reference. If no available value is found, then the iterator will either be left at a clobbering instruction or the beginning of the basic block. This allows using FindAvailableLoadedValue() across multiple blocks. If this functionality is not needed, as is the case in InstCombine, then we can use a much more efficient implementation: First try to find an available value, and only perform clobber checks if we actually found one. As this function only looks at a very small number of instructions (6 by default) and usually doesn't find an available value, this saves many expensive alias analysis queries.
-
Sanjay Patel authored
The arguments in all cases should be vectors of exactly one of integer or FP. All of the tests currently pass the verifier because we check for any vector type regardless of the type of reduction. This obviously can't work if we mix up integer and FP, and based on current LangRef text it was not intended to work for pointers either. The pointer case from https://llvm.org/PR49215 is what led me here. That example was avoided with 5b250a27. Differential Revision: https://reviews.llvm.org/D96904
-
António Afonso authored
This issue was introduced in https://reviews.llvm.org/D92187. The guard I'm changing were is supposed to act when linux is loading the linker for the second time (due to differences in paths like symlinks). This is done by checking `module_sp != m_interpreter_module.lock()` however this will be true when `m_interpreter_module` wasn't initialized, making linux unload the linker module (the most visible result here is that lldb will stop getting notified about new modules loaded by the process, because it can't set the rendezvous breakpoint again after the stepping over it once). The `m_interpreter_module` is not getting initialize when it goes through this path: https://github.com/llvm/llvm-project/blob/dbfdb139f75470a9abc78e7c9faf743fdd963c2d/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp#L332, which happens when lldb was able to read the address from the dynamic section of the executable. What I'm not sure about though, is if when we go through this path if we still load the linker twice on linux. If that's the case then it means we need to somehow set the m_interpreter_module instead of the fix I provide here. I've only tested this on Android. Differential Revision: https://reviews.llvm.org/D96637
-
Nikita Popov authored
This contains the logic for extracting an available load/store from a given instruction, to be reused in a following patch.
-
Kristina Bessonova authored
Currently, if there is a module that contains a strong definition of a global variable and a module that has both a weak definition for the same global and a reference to it, it may result in an undefined symbol error while linking with ThinLTO. It happens because: * the strong definition become internal because it is read-only and can be imported; * the weak definition gets replaced by a declaration because it's non-prevailing; * the strong definition failed to be imported because the destination module already contains another definition of the global yet this def is non-prevailing. The patch adds a check to computeImportForReferencedGlobals() that allows considering a global variable for being imported even if the module contains a definition of it in the case this def has an interposable linkage type. Note that currently the check is based only on the linkage type (and this seems to be enough at the moment), but it might be worth to account the information whether the def is prevailing or not. Reviewed By: tejohnson Differential Revision: https://reviews.llvm.org/D95943
-
- Feb 21, 2021
-
-
Simon Pilgrim authored
This patch handles usubsat patterns hidden through zext/trunc and uses the getTruncatedUSUBSAT helper to determine if the USUBSAT can be correctly performed in the truncated form: zext(x) >= y ? x - trunc(y) : 0 --> usubsat(x,trunc(umin(y,SatLimit))) zext(x) > y ? x - trunc(y) : 0 --> usubsat(x,trunc(umin(y,SatLimit))) Based on original examples: void foo(unsigned short *p, int max, int n) { int i; unsigned m; for (i = 0; i < n; i++) { m = *--p; *p = (unsigned short)(m >= max ? m-max : 0); } } Differential Revision: https://reviews.llvm.org/D25987 -
Simon Pilgrim authored
Fixes regression exposed by removing bitcasts across logic-ops in D96206. Differential Revision: https://reviews.llvm.org/D96206
-
Simon Pilgrim authored
Extend the existing combine that handles bitcasting for fp-logic ops to also help remove logic ops across bitcasts to/from the same integer types. This helps improve AVX512 predicate handling for D/Q logic ops and also allows DAGCombine's scalarizeExtractedBinop to remove some annoying gpr->simd->gpr transfers. The concat_vectors regression in pr40891.ll will be addressed in a followup commit on this patch. Differential Revision: https://reviews.llvm.org/D96206
-
Craig Topper authored
Largely copied from AArch64/arm64-xaluo.ll
-
Petr Hosek authored
The special root semantics for identifier-named sections is meant specifically for the metadata sections. In the context of group semantics, where group members are always retained or discarded as a unit, it's natural not to have this semantics apply to a section in a group, otherwise we would never discard the group defeating the purpose of using the group in the first place. This change modifies the GC behavior so that __start_/__stop_ references don't retain C identifier named sections in section groups which allows for these groups to be collected. This matches the behavior of BFD ld. The only kind of existing case that might break is interdependent metadata sections that are all in a group together, but that group doesn't contain any other sections referenced by anything except implicit inclusion in a `__start_` and/or `__stop_`-referenced identifier-named section, but such cases should be unlikely. Differential Revision: h...
-
Kazu Hirata authored
-
Kazu Hirata authored
-
Jianzhou Zhao authored
-
Brad Smith authored
-
Dave Lee authored
Adjust `ShouldAutoContinue` to be available to any thread plan previous to the plan that explains a stop, not limited to the parent to the plan that explains the stop. Before this change, `Thread::ShouldStop` did the following: 1. find the plan that explains the stop 2. if it's not a master plan, continue processing previous (aka parent) plans 3. first, call `ShouldAutoContinue` on the immediate parent of the explaining plan 4. then loop over previous plans, calling `ShouldStop` and `MischiefManaged` Of note, the iteration in step 4 does not call `ShouldAutoContinue`, so again only the plan just prior to the explaining plan is given the opportunity to override whether to continue or stop. This commit changes the loop call `ShouldAutoContinue`, giving each plan the opportunity to override `ShouldStop` of previous plans. Why? This allows a plan to do the following: 1. mark itself done and be popped off the stack 2. allow parent plans to finish their work, and to also be popped off the stack 3. and finally, have the thread continue, not stop This is useful for stepping into async functions. A plan will would step far enough enough to set a breakpoint on the async target, and then use `ShouldAutoContinue` to unwind the necessary stepping, and then have the calling thread continue. Differential Revision: https://reviews.llvm.org/D97076
-
Jacques Pienaar authored
-
Jacques Pienaar authored
Move over to ODS & use pass options.
-
Nathan James authored
-
Martin Storsjö authored
This makes the symlinks work properly on windows. A similar round of cleanup was done in c41bda7f, but these tests were added after that. Differential Revision: https://reviews.llvm.org/D97089
-
Martin Storsjö authored
The spec doesn't declare it as an enum class, and being declared as an enum class breaks referring to the values as e.g. path::auto_format. Differential Revision: https://reviews.llvm.org/D97084
-
Petr Hosek authored
This can reduce the binary size because counters will no longer occupy space in the binary, instead they will be allocated by dynamic linker. Differential Revision: https://reviews.llvm.org/D97110
-
Stephen Kelly authored
Extend test to verify that it does not match in template instantiations. Differential Revision: https://reviews.llvm.org/D96132
-
Stephen Kelly authored
Update test to note use of lambda instead of the invisible operator(). Differential Revision: https://reviews.llvm.org/D96131
-
Craig Topper authored
[RISCV] Add another test case showing failure to use remw when the RHS has been zero extended from less than i32. NFC
-
Stephen Kelly authored
Diagnose the problem in templates in the context of the template declaration instead of in the context of all of the (possibly very many) template instantiations. Differential Revision: https://reviews.llvm.org/D96224
-
Nikita Popov authored
When one of the inputs is a wrapping range, intersect with the union of the two inputs. The union of the two inputs corresponds to the result we would get if we treated the min/max as a simple select. This fixes PR48643.
-
Sanjay Patel authored
Follow-up to: D96648 / b40fde06 ...for the special-case base calls. From the earlier commit: This is unusual in the general (non-reciprocal) case because we need an extra instruction, but that should be better for general FP reassociation and codegen. We conservatively check for "arcp" FMF here as we do with existing fdiv folds, but it is not strictly necessary to have that.
-
Sanjay Patel authored
-
Nikita Popov authored
We don't need any special handling for wrapping ranges (or empty ranges for that matter). The sub() call will already compute a correct and precise range. We only need to adjust the test expectation: We're now computing an optimal result, rather than an unsigned envelope.
-
AndreyChurbanov authored
Close mutexattr and condattr local objects to eliminate resource leaks. Differential Revision: https://reviews.llvm.org/D96892
-
Craig Topper authored
This adds the IR for this C code int32_t foo(uint16_t x, int16_t y) { x %= y; return x; } Note the dividend is unsigned and the divisor is signed. C type promotion rules will extend them and use a 32-bit srem and the function returns a 32-bit result. We fail to use remw for this case. The zero extended input has enough sign bits, but we won't consider (i64 AssertZext X, i16) in the sexti32 isel pattern. We also end up with a extra shifts to zero upper bits on the result. computeKnownBits knew the result was positive before type legalization and allowed the SIGN_EXTEND to become ZERO_EXTEND. But after promoting to i64 we no longer know that bit 31 (and all bits above it) should be 0. -
Shilei Tian authored
`sm_35` is the minimum requirement for OpenMP offloading on NVPTX device. Current driver test case is using `sm_20`. D97003 is going to switch the minimum CUDA version to 9.2, which only supports `sm_30+`. This patch makes step for the change. Reviewed By: JonChesterfield Differential Revision: https://reviews.llvm.org/D97120
-
Stephen Kelly authored
The normalization of matchers means that this now works in all language modes. Differential Revision: https://reviews.llvm.org/D96135
-