- Mar 09, 2021
-
-
Craig Topper authored
The default fixed vector expansion uses sra+xor+add since it can't see that smax is legal due to our custom handling. So we select smax(X, sub(0, X)) manually. Scalable vectors are able to use the smax expansion automatically for most cases. It crashes in one case because getConstant can't build a SPLAT_VECTOR for nxvXi64 when i64 scalars aren't legal. So we manually emit a SPLAT_VECTOR_I64 for that case. Reviewed By: frasercrmck Differential Revision: https://reviews.llvm.org/D97991
-
Craig Topper authored
[RISCV] Make the hasStdExtM() check in RISCVInstrInfo::getVLENFactoredAmount emit a diagnostic rather than an assert. As far as I know we're not enforcing the StdExtM must be enabled to use the V extension. If we use an assert here and hit this code in a release build we'll silently emit an invalid instruction. By using a diagnostic we report the error to the user in release builds. I think there may still be a later fatal error from the code emitter though. Reviewed By: frasercrmck Differential Revision: https://reviews.llvm.org/D97970
-
gbtozers authored
This patch updates the various IR passes to correctly handle dbg.values with a DIArgList location. This patch does not actually allow DIArgLists to be produced by salvageDebugInfo, and it does not affect any pass after codegen-prepare. Other than that, it should cover every IR pass. Most of the changes simply extend code that operated on a single debug value to operate on the list of debug values in the style of any_of, all_of, for_each, etc. Instances of setOperand(0, ...) have been replaced with with replaceVariableLocationOp, which takes the value that is being replaced as an additional argument. In places where this value isn't readily available, we have to track the old value through to the point where it gets replaced. Differential Revision: https://reviews.llvm.org/D88232
-
Sanjay Patel authored
This is another step towards parity between existing select transforms and min/max intrinsics (D98152).. The existing 'not' folds around select are complicated, so it's likely that we will need to enhance this, but this should be a safe step.
-
Sanjay Patel authored
-
Adam Czachorowski authored
We used to trigger assertion when transforming c-tor with unparsed default argument. Now we ignore such constructors for this purpose. Differential Revision: https://reviews.llvm.org/D97965
-
Anton Bikineev authored
In case a char-literal of type int (C/ObjectiveC) corresponds to a format specifier with the %hh length modifier, don't treat the literal as of type char for issuing diagnostics, as otherwise this results in: printf("%hhd", 'e'); warning: format specifies type 'char' but the argument has type 'char'. Differential revision: https://reviews.llvm.org/D97951
-
diggerlin authored
SUMMARY: n the patch https://reviews.llvm.org/D87451 "add new option -mignore-xcoff-visibility" we did as "The option -mignore-xcoff-visibility has no effect on visibility attribute when compile with -emit-llvm option to generated LLVM IR." in these patch we let -mignore-xcoff-visibility effect on generating IR too. the new feature only work on AIX OS Reviewer: Jason Liu, Differential Revision: https://reviews.llvm.org/D89986
-
AndreyChurbanov authored
For clang this change is NFC cleanup, because clang never calls atomic functions from runtime library. Basically, pause is good in spin-loops waiting for something. Atomic CAS loops do not wait for anything, each CAS failure means some other thread progressed. Performance experiments show that the pause only causes unnecessary slowdown on CPUs with slow pause instruction, no difference on CPUs with fast pause instruction, removal of the pause gives lesser binary size which is good. Differential Revision: https://reviews.llvm.org/D97079
-
Andrzej Warzynski authored
This patch refactors include-module.f90: * rename the test file as use-module.f90 to better highlight which driver feature is being tested * move tests for diagnostics to use-module-error.f90 (it tests that `-J/-module-dir` can only be used once) * make sure that `f18` is tested when `FLANG_BUILD_NEW_DRIVER` is set to `Off` * add tests for when all module files are successfully discovered and loaded With this patch, there should be a clear separation into 3 scenarios in use-module.f90: * Everything is OK * One module file wasn't found (missing include path for basictestingmoduletwo.mod) * Two module files are found, but the test requires `basictestingmoduleone.mod` from both `Inputs` and `Inputs/module-dir`. Only the latter is found. Reviewed By: tskeith Differential Revision: https://reviews.llvm.org/D97197
-
Oliver Stannard authored
Add a comment explaining how we lay out stack frames for ARM targets, based on the existing one for AArch64. Also expand the comment to explain reserved call frames for both architectures. Differential revision: https://reviews.llvm.org/D98258
-
Timm Bäder authored
Silences a GCC warning: clang/lib/Sema/SemaChecking.cpp:4506:2: warning: extra ‘;’ [-Wpedantic] }; ^
-
Martin Storsjö authored
This test was previously tweaked in 321f6969 to match the output of of MS STL (except that the MS STL fails on the testcase with an empty path). libc++ doesn't produce paths with all normalized separators (and the spec doesn't mandate it to either). Tweak the test reference to match exactly what libc++ produces. If testing with a non-libc++ library, do a relaxed comparison that allows the separators to differ. Differential Revision: https://reviews.llvm.org/D98215
-
Nathan James authored
https://reviews.llvm.org/D94554 introduced code which wont compile with some build flags due to a field having the same identifier as a type. clang-tools-extra/clangd/DraftStore.h:55:11: error: declaration of ‘clang::clangd::DraftStore::Draft clang::clangd::DraftStore::DraftAndTime::Draft’ changes meaning of ‘Draft’ [-fpermissive] 55 | Draft Draft; | ^~~~~ clang-tools-extra/clangd/DraftStore.h:30:10: note: ‘Draft’ declared here as ‘struct clang::clangd::DraftStore::Draft’ 30 | struct Draft { | ^~~~~
-
Nathan James authored
Create a `ThreadsafeFS` in the `DraftStore` that overlays the dirty file contents over another `ThreadsafeFS`. This provides a nice thread-safe interface for using dirty file contents throughout the codebase, for example cross file refactoring. Creating a Filesystem view will overlay a snapshot of the current contents, so if the draft store is updated while the view is being used, it will contain stale contents. Reviewed By: sammccall Differential Revision: https://reviews.llvm.org/D94554
-
Pavel Labath authored
This function would fail in debug builds, as the two usages of the LLDB_PYTHON_RELATIVE_LIBDIR macro would expand to two distinct strings. The path iterator macros don't support that. Use a temporary variable to ensure everything points to a single string.
-
Simon Pilgrim authored
-
Sanjay Patel authored
This is a partial translation of the existing select-based folds. We need to recreate several different transforms to avoid regressions as noted in D98152. https://alive2.llvm.org/ce/z/teuZ_J
-
Lei Zhang authored
This makes it easy to compose the distribution computation with other affine computations. Reviewed By: mravishankar Differential Revision: https://reviews.llvm.org/D98171
-
Liu, Chen3 authored
[X86][NFC] Move instruction selection of the x86_tdpb[s,u]d_internal and x86_tilezero_internal to X86InstrAMX.td Differential Revision: https://reviews.llvm.org/D97997
-
Stefan Gränitz authored
LLVM OrcJIT is shifting from RuntimeDyld to JITLink. Starting with D96627 I am planning to add debug support. It would be great to have test coverage for it in LLDB early on. Reviewed By: labath Differential Revision: https://reviews.llvm.org/D96634
-
Florian Hahn authored
This patch implements the conditional select operator for ext_vector_types in C++. It does so by using the same semantics as for C. D71463 added support for the conditional select operator for VectorType in C++. Unfortunately the semantics between ext_vector_type in C are different to VectorType in C++. Select for ext_vector_type is based on the MSB of the condition vector, whereas for VectorType it is `!= 0`. This unfortunately means that the behavior is inconsistent between ExtVectorType and VectorType, but I think using the C semantics for ExtVectorType in C++ as well should be less surprising for users. Reviewed By: erichkeane, aaron.ballman Differential Revision: https://reviews.llvm.org/D98055
-
Stefan Gränitz authored
As stated in the JITLink user guide: Do not assume that the input object is well formed. https://llvm.org/docs/JITLink.html#tips-for-jitlink-backend-developers
-
Stefan Gränitz authored
[Orc] Test DebugObjectManagerPlugin fills in load-address for .text section of in-memory ELF debug object
-
Stefan Gränitz authored
-
gbtozers authored
This patch adds a set of lit tests for ISel support of DIArgList/DBG_VALUE_LIST. Differential Revision: https://reviews.llvm.org/D88593
-
gbtozers authored
This patch completes ISel support for DIArgList dbg.values by allowing SDDbgValues with multiple location operands to be emitted as DBG_VALUE_LIST instructions. The primary change of this patch is refactoring EmitDbgValue by pulling location operand emission out to the new function AddDbgValueLocationOps, which is used for both DIArgList and single value dbg.values. Outside of that, the only behaviour change is that the scheduler has a lambda added, HasUnknownVReg, to prevent us from attempting to emit a DBG_VALUE_LIST before all of its used VRegs have become available. Differential Revision: https://reviews.llvm.org/D88592
-
Alexander Shaposhnikov authored
Similarly to the existing tests (e.g. stab.s) function-starts.s is not supported on Windows.
-
Liu, Chen3 authored
[X86][NFC] Adding one flag to imply whether the instruction should check the predicate when compress EVEX instructions to VEX encoding. Some EVEX instructions should check the predicates when compress to VEX encoding. For example, avx512vnni instructions. This is because avx512vnni doesn't mean that avxvnni is supported on the target. This patch moving the manually added check to .inc that generated by tablegen. Differential Revision: https://reviews.llvm.org/D98011
-
Luo, Yuanke authored
-
Florian Hahn authored
If the incoming values of a phi are pointer casts of the same original value, replace the phi with a single cast. Such redundant phis are somewhat common after loop-rotate and removing them can avoid some unnecessary code bloat, e.g. because an iteration of a loop is peeled off to make the phi invariant. It should also simplify further analysis on its own. InstCombine already uses stripPointerCasts in a couple of places and also simplifies phis based on the incoming values, so the patch should fit in the existing scope. The patch causes binary changes in 47 out of 237 benchmarks in MultiSource/SPEC2000/SPEC2006 with -O3 -flto on X86. Reviewed By: lebedev.ri Differential Revision: https://reviews.llvm.org/D98058
-
Sven van Haastregt authored
Builtins that require multiple extensions, such as certain `write_imagef` forms, were not exposed because of the Sema check not splitting the extension string. Differential Revision: https://reviews.llvm.org/D97930
-
Simon Pilgrim authored
MSVC couldn't resolve the decltype of a capture of a capture - but is happy with an auto.
-
MarcoFalke authored
Differential Revision: https://reviews.llvm.org/D98057
-
Kadir Cetinkaya authored
This was causing TSan failures due to a race on vptr during destruction, see https://lab.llvm.org/buildbot/#/builders/131/builds/6579/steps/6/logs/FAIL__Clangd_Unit_Tests__LSPTest_FeatureModulesThr. The story is, during the execution of a destructor all the virtual dispatches should resolve to implementations in the class being destroyed, not the derived ones. And LSPTests will log some stuff during destruction (we send shutdown/exit requests, which are logged), which is a virtual dispatch when LSPTest is derived from clang::clangd::Logger. It is a benign race in our case, as gtests that derive from LSPTest doesn't override the `log` method. But still during destruction, we might try to update vtable ptr (due to being done with destruction of test and starting destruction of LSPTest) and read from it to dispatch a log message at the same time. This patch fixes that race by moving `log` out of the vtable of `LSPTest`. Differential Revision: https://reviews.llvm.org/D98241
-
John Brawn authored
A symbol being redefined as a label is something that can happen as a result of ordinary input, so it shouldn't cause a fatal error. Also adjust the error message to match the one you get when a symbol is redefined as a variable. Differential Revision: https://reviews.llvm.org/D98181
-
Dmitry Vyukov authored
Go requires 47 bits VA for tsan. Go will run race_detector testcases unless tsan warns about "unsupported VMA range" Author: mzh (Meng Zhuo) Reviewed-in: https://reviews.llvm.org/D98238
-
Cullen Rhodes authored
This patch introduces a new intrinsic @llvm.experimental.vector.splice that constructs a vector of the same type as the two input vectors, based on a immediate where the sign of the immediate distinguishes two variants. A positive immediate specifies an index into the first vector and a negative immediate specifies the number of trailing elements to extract from the first vector. For example: @llvm.experimental.vector.splice(<A,B,C,D>, <E,F,G,H>, 1) ==> <B, C, D, E> ; index @llvm.experimental.vector.splice(<A,B,C,D>, <E,F,G,H>, -3) ==> <B, C, D, E> ; trailing element count These intrinsics support both fixed and scalable vectors, where the former is lowered to a shufflevector to maintain existing behaviour, although while marked as experimental the recommended way to express this operation for fixed-width vectors is to use shufflevector. For scalable vectors where it is not possible to express a shufflevector mask for this operation, a new ISD node has been implemented. This is one of the named shufflevector intrinsics proposed on the mailing-list in the RFC at [1]. Patch by Paul Walker and Cullen Rhodes. [1] https://lists.llvm.org/pipermail/llvm-dev/2020-November/146864.html Reviewed By: sdesmalen Differential Revision: https://reviews.llvm.org/D94708
-
Tomas Matheson authored
See https://bugs.llvm.org/show_bug.cgi?id=42154. GCC's __attribute__((align)) can reduce the alignment of a type when applied to a typedef. However, functions which take a pointer or reference to the original type are compiled assuming the original alignment. Therefore when any such function is passed an object of the new, less-aligned type, an alignment fault can occur. In particular, this applies to the constructor, which is defined for the original type and called for the less-aligned object. This change adds a warning whenever an pointer or reference to an object is passed to a function that was defined for a more-aligned type. The calls to ASTContext::getTypeAlignInChars seem change the order in which record layouts are evaluated, which caused changes to the output of -fdump-record-layouts. As such some tests needed to be updated: * Use CHECK-LABEL rather than counting the number of "Dumping AST Record Layout" headers. * Check for end of line in labels, so that struct B1 doesn't match struct B etc. * Add --strict-whitespace, since the whitespace shows meaningful structure. * The order in which record layouts are printed has changed in some cases. * clang-format for regions changed Differential Revision: https://reviews.llvm.org/D97187
-
Dmitry Vyukov authored
Author: mzh (Meng Zhuo) Reviewed-in: https://reviews.llvm.org/D98231
-