- Feb 05, 2021
-
-
Fangrui Song authored
-
Fangrui Song authored
-
Fangrui Song authored
-
Craig Topper authored
[RISCV] Use LLVMScalarOrSameVectorWidth to make avoid needing to mention the index type for vrgatherei16 intrinsics. Add .vv to the intrinsic name to be consistent with D95979. Reviewed By: khchen Differential Revision: https://reviews.llvm.org/D95981
-
Craig Topper authored
The vrgather.vv instruction uses a vector of indices with the same SEW as operand 0. The vrgather.vx instructions use a scalar index operand of XLen bits. By splitting this into 2 intrinsics we are able to use LLVMatchType in the definition to avoid specifying the type for the index operand when creating the IR for the intrinsic. For .vv it will match the operand 0 type. And for .vx it will match the type of the vl operand we already needed to specify a type for. I'm considering splitting more intrinsics. This was a somewhat odd one because the .vx doesn't use the element type, it always use XLen. Reviewed By: HsiangKai Differential Revision: https://reviews.llvm.org/D95979
-
Matheus Izvekov authored
loadRegFromStackSlot()/storeRegToStackSlot() can generate aligned access instructions for stack slots even if the stack is unaligned, based on the assumption that the stack can be realigned. However, this doesn't work for fixed slots, which are e.g. used for spilling XMM registers in a non-leaf function with `__attribute__((preserve_all))`. When compiling such code with `-mstack-alignment=8`, this causes general protection faults. Fix it by only considering stack realignment for non-fixed slots. Note that this changes the output of three existing tests which spill AVX registers, since AVX requires higher alignment than the ABI provides on stack frame entry. Reviewed By: rnk, jyknight Differential Revision: https://reviews.llvm.org/D73126
-
Craig Topper authored
Reviewed By: arsenm Differential Revision: https://reviews.llvm.org/D96097
-
Dan Gohman authored
When the -matomics feature is not enabled, disable POSIXThreads mode and set the thread model to Single, so that we don't predefine macros like `__STDCPP_THREADS__`. Differential Revision: https://reviews.llvm.org/D96091
-
Dan Gohman authored
As mentioned in TODO comment, casting double to float causes NaNs to change bits. To avoid the change, this patch adds support for single-floating-point immediate value on MachineCode. Patch by Yuta Saito. Differential Revision: https://reviews.llvm.org/D77384
-
Philip Reames authored
Sorry for the build break, apparently forgot to build ARM target.
-
Vitaly Buka authored
-
Fangrui Song authored
`-flto -gsplit-dwarf -g -O[123]` may create .debug_gnu_pubnames with 0 DIE offset entries. llvm-dwarfdump -debug-gnu-pubnames/ld.lld --gdb-index errors for that. ``` .section .debug_gnu_pubnames,"",@progbits .long .LpubNames_end2-.LpubNames_begin2 # Length of Public Names Info .LpubNames_begin2: .short 2 # DWARF Version .long .Lcu_begin2 # Offset of Compilation Unit Info .long 57 # Compilation Unit Length .long 0 # DIE offset .byte 16 # Attributes: TYPE, EXTERNAL .asciz "absl" # External Name .long 0 # DIE offset .byte 16 # Attributes: TYPE, EXTERNAL .asciz "absl::base_internal" # External Name .long 0 # End Mark ``` -
Philip Reames authored
If we know that the scalar epilogue is required to run, modify the CFG to end the middle block with an unconditional branch to scalar preheader. This is instead of a conditional branch to either the preheader or the exit block. The motivation to do this is to support multiple exit blocks. Specifically, the current structure forces us to identify immediate dominators and *which* exit block to branch from in the middle terminator. For the multiple exit case - where we know require scalar will hold - these questions are ill formed. This is the last change needed to support multiple exit loops, but since the diffs are already large enough, I'm going to land this, and then enable separately. You can think of this as being NFCI-ish prep work, but the changes are a bit too involved for me to feel comfortable tagging the change that way. Differential Revision: https://reviews.llvm.org/D94892
-
Shilei Tian authored
[OpenMP][libomptarget] Fixed an issue that device sync is skipped if the kernel doesn't have any argument Currently if there is not kernel argument, device synchronization will be skipped. This can lead to two issues: 1. If there is any device error, it will not be captured; 2. The target region might end before the kernel is done, which is not spec conformant. The test added in this patch only runs on NVPTX platform, although it will not be executed by Phab at all. It also requires `not` which is not available on most systems. Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D96067
-
Zequan Wu authored
Differential Revision: https://reviews.llvm.org/D96092
-
Eric Schweitz authored
-
Craig Topper authored
This improves our coverage of these operations and shows that we use really large constants for division by constant on i8/i16 especially on RV64. The issue is that BuildSDIV/BuildUDIV are limited to legal types so we have to promote to i64 before it kicks in. At that point we've lost the range information for the original type.
-
Amy Huang authored
The added test case failed on ppc, android, and other buildbots, so require x86 targets.
-
wlei authored
when we skip the call stack starting with an external address, we should also skip the bottom LBR entry, otherwise it will cause a truncated context issue. Reviewed By: hoy, wenlei Differential Revision: https://reviews.llvm.org/D95480
-
Amy Huang authored
D94563 implemented `ReadBinaryName` on Windows, which causes a test case to now pass, so remove the `XFAIL: windows-msvc` line.
-
Amy Huang authored
[asan] Add %d variable to external_symbolizer_path option, so that user can specify paths relative to the location of the binary. We want way to set a path to llvm-symbolizer that isn't relative to the current working directory; this change adds a variable that expands to the path relative to the current binary. This approach came from comments in https://reviews.llvm.org/D93070 Differential Revision: https://reviews.llvm.org/D94563
-
River Riddle authored
This makes ignoring a result explicit by the user, and helps to prevent accidental errors with dropped results. Marking LogicalResult as no discard was always the intention from the beginning, but got lost along the way. Differential Revision: https://reviews.llvm.org/D95841
-
Yaxun (Sam) Liu authored
Defer constant checking of dependent initializer to template instantiation since it cannot be done for dependent values. Reviewed by: Artem Belevich Differential Revision: https://reviews.llvm.org/D95840
-
Eric Schweitz authored
These are no longer part of FIR. https://github.com/flang-compiler/f18-llvm-project/pull/267 Differential Revision: https://reviews.llvm.org/D96077
-
Mehdi Chinoune authored
Reapply {D88052} Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D96066 -
Jordan Rupprecht authored
This reverts commit 207d4be4 due to returning incorrect results. Regression test case posted in D96074.
-
Richard Smith authored
These attributes were all incorrect or inappropriate for LLVM to infer: - inaccessiblememonly is generally wrong; user replacement operator new can access memory that's visible to the caller, as can a new_handler function. - willreturn is generally wrong; a custom new_handler is not guaranteed to terminate. - noalias is inappropriate: Clang has a flag to determine whether this attribute should be present and adds it itself when appropriate. - noundef and nonnull on the return value should be specified by the frontend on all 'operator new' functions if we want them, not here. In any case, inferring attributes on functions declared 'nobuiltin' (as these are when Clang emits them) seems questionable.
-
Richard Smith authored
Several of the new attributes here were incorrect, and even the ones that are generally correct were being added even to nobuiltin calls. This reverts commit bb3f169b.
-
Bill Torpey authored
For those using a GUI, it can be very helpful to have a particular suffix appended to the report file name, so it can be opened with a double-click. (see also: https://github.com/google/sanitizers/issues/951) Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D46546
-
Sean Silva authored
- attribute-dict production is redundant with dictionary-attribute - definitions of attribute aliases were part of the same production as uses of attribute aliases - `std.dim` now accepts the dimension number as an operand, so the example is out of date. Use the predicate of std.cmpi as a better example. Differential Revision: https://reviews.llvm.org/D96076
-
Yaxun (Sam) Liu authored
-
Sam McCall authored
This enables: - completion in { .x.^ } - completion in { .x = { .^ } } - type-based ranking of candidates for { .x = ^ } Differential Revision: https://reviews.llvm.org/D96058 -
Richard Smith authored
explicitly qualified as members of the current instantiation. Despite the nested name specifier being fully-dependent in this case, the elaborated type might only be instantiation-dependent, because the type is a member of the current instantiation.
-
Ayke van Laethem authored
The ldrexd/strexd instructions are not supported on M-class chips, see for example https://developer.arm.com/documentation/dui0489/e/arm-and-thumb-instructions/memory-access-instructions/ldrex-and-strex which says: > All these 32-bit Thumb instructions are available in ARMv6T2 and > above, except that LDREXD and STREXD are not available in the ARMv7-M > architecture. Looking at the ARMv8-M architecture, it appears that these instructions aren't supported either. The Architecture Reference Manual lists ldrex/strex but not ldrexd/strexd: https://developer.arm.com/documentation/ddi0553/bn/ Godbolt example on LLVM 11.0.0, which incorrectly emits ldrexd/strexd instructions: https://llvm.godbolt.org/z/5qqPnE Differential Revision: https://reviews.llvm.org/D95891
-
Aaron Ballman authored
Attributes accept arguments, not parameters, so we should report that the duplicate attribute arguments don't match.
-
Eric Schweitz authored
https://github.com/flang-compiler/f18-llvm-project/pull/413 Differential Revision: https://reviews.llvm.org/D96072
-
Kirill Bobyrev authored
Follow-up on D95925: adds better detection for function arguments and also checks for conflicts in muli-variable init statements in ForStmt. Reviewed By: hokein Differential Revision: https://reviews.llvm.org/D96009
-
Craig Topper authored
-
Marek Kurdej authored
Note: contrary to what I said previously, I didn't change .clang-format nor utils/generate_feature_test_macro_components.py script. Reviewed By: ldionne, #libc Differential Revision: https://reviews.llvm.org/D92229
-
Nikita Popov authored
MemorySSA currently treats lifetime.end intrinsics as not aliasing anything. This breaks MemorySSA-based MemCpyOpt, because we'll happily move a read of a pointer below a lifetime.end intrinsic, as no clobber is reported. I think the MemorySSA modelling here isn't correct: lifetime.end(p) has approximately the same effect as doing a memcpy(p, undef), and should be treated as a clobber. This patch removes the special handling of lifetime.end, leaving alias analysis to handle it appropriately. Differential Revision: https://reviews.llvm.org/D95763
-