- Apr 26, 2023
-
-
Markus Mützel authored
When building the Fortran runtime on MinGW, `clock_gettime` is currently used. That function is provided by the `pthread` library on that platform. That means that all programs that link `libFortranRuntime` also require to be linked with `pthread` on that platform. There is already a code path (for MSVC) that doesn't use `clock_gettime` in the implementation of the Fortran library. Use the same code path also on MinGW by undefining `CLOCKID`. Reviewed By: vzakhari Differential Revision: https://reviews.llvm.org/D149051
-
Slava Zakharin authored
I believe this test started failing pre-commit testing after D148038. For example: https://buildkite.com/llvm-project/premerge-checks/builds/148654#0187b72b-7360-4c52-be94-93eefcb269f4 https://buildkite.com/llvm-project/premerge-checks/builds/148642#0187b691-15a7-44c4-ae23-c7e97ec67755 On Windows the .exe suffix is used for clang-offload-packager tool: "c:\\program files\\llvm\\bin\\clang-offload-packager.exe" ... At the same time, I believe I have seen this test sporadically fail before, meaning that the .exe suffix is not added consistently. I am not sure why this might be happening. I decided just to allow the suffix.
-
Alex Bradbury authored
This will allow reusing the same logic for a select combine.
-
Tobias Hieta authored
There was a bunch of references to bugzilla and other old instructions in there. I have updated it to match the current reality. Reviewed By: tstellar Differential Revision: https://reviews.llvm.org/D149131
-
Cullen Rhodes authored
-
Slava Zakharin authored
Fortran runtime standalone build is broken after D140998 because of the missing CMake modules path. This is a fix. Differential Revision: https://reviews.llvm.org/D149090
-
OCHyams authored
A `ValueAsMetadata` may be replaced with nullptr for several reasons including deleting values and value remapping a use-before-def. In the case of a `MetadataAsValue` user, `handleChangedOperand` intercepts and replaces the metadata with an empty tuple (`!{}`). At the moment, an empty metadata operand in a debug intrinsics signals that it can be deleted. Given that we end up with empty metadata operands in circumstances where the Value has been "lost" the current behaviour can lead to incorrect variable locations. Instead, we should treat empty metadata as meaning "there is no location for the variable" (the same as we currently treat undef operands). This patch changes `isKillLocation` to take this into account. Related to https://discourse.llvm.org/t/auto-undef-debug-uses-of-a-deleted-value Reviewed By: StephenTozer Differential Revision: https://reviews.llvm.org/D140902
-
- Apr 25, 2023
-
-
Aaron Ballman authored
This amends 2e275e24. That commit added a null to pointer cast kind when determining whether the expression can be a valid constant initializer, but failed to update the constant expression evaluator to perform the evaluation. This commit updates the constant expression evaluator to handle that cast kind.
-
OCHyams authored
This helps towards the effort to remove UndefValue from LLVM. Related to https://discourse.llvm.org/t/auto-undef-debug-uses-of-a-deleted-value Reviewed By: nlopes Differential Revision: https://reviews.llvm.org/D140991
-
Emilio Cota authored
While at it, fix some typos. Differential Revision: https://reviews.llvm.org/D149159
-
Jay Foad authored
After D147334 we never select _SGPR forms of SMEM instructions on subtargets that also support the _SGPR_IMM form, so there is no need to handle them here. Differential Revision: https://reviews.llvm.org/D149139
-
Doru Bercea authored
-
Victor Perez authored
Move mlir-translate exception-related tests from basic.ll to exception.ll. Signed-off-by:
Victor Perez <victor.perez@codeplay.com> Differential Revision: https://reviews.llvm.org/D149043
-
Zhongyunde authored
Use simplifySelectWithICmpEq to handle the implied equalities from the icmp-or, then both of ICMP_NE and ICMP_EQ will be addressed (X | Y) == 0 ? X : 0 --> 0 (commuted 2 ways) (X | Y) != 0 ? 0 : X --> 0 (commuted 2 ways) Fixes https://github.com/llvm/llvm-project/issues/62263 Reviewed By: nikic, RKSimon Differential Revision: https://reviews.llvm.org/D148986
-
Nikita Popov authored
Relative to the previous attempt, this includes a bailout for phi nodes, whose arguments might refer to a previous cycle iteration. We did not hit this before by a fortunate deficiency of the ConstantFoldInstOperands() API, which doesn't handle phi nodes, unlike ConstantFoldInstruction(). ----- Instead of hardcoding a few instruction kinds, use the generic interface now that we have it. The primary effect of this is that intrinsics are now supported. It's worth noting that this is still limited in that it does not support vectors, so we can't remove e.g. existing fshl special cases.
-
Zhongyunde authored
Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D149115
-
Nikita Popov authored
-
NAKAMURA Takumi authored
`!range(a, b)` generates a list `[a,b)`. `a` is optional and `0` by default. - `!range(-1, 4)` generates `[-1, 0, 1, 2, 3]` - `!range(4)` generates `[0, 1, 2, 3]` - `!range(2, 2)` generates `[]<list<int>>` `!range(list)` is equivalent to `!range(0, !size(list))`. Differential Revision: https://reviews.llvm.org/D145871
-
NAKAMURA Takumi authored
-
OCHyams authored
This reverts commit 1e6fe677 (D140900). Buildbot: https://lab.llvm.org/buildbot/#/builders/196/builds/29937
-
Nikita Popov authored
-
Jeremy Morse authored
In rare situations involving AVX intrinsics, it seems LLVM can be coaxed into generating copies to arguments that look like this: $xmm0 = VMOVAPSrr $xmm1, implicit-def $ymm0 CALL64 @something ymm0 This particular form of copy implicitly zeros the upper lanes of ymm0, hence there's an implicit-def for the register in the copy. The X86 implementation of describeLoadedValue doesn't attempt to describe this sort of copy which causes the generic implementation in TargetInstrInfo::describeLoadedValue to fire an assertion saying it expected the target hook to handle it. Play it safe in the generic implementation and return the "no location / value" return value, rather than asserting. Differential Revision: https://reviews.llvm.org/D148626 -
OCHyams authored
This improves the readability of debugging intrinsics. Instead of: call void @llvm.dbg.value(metadata !2, ...) !2 = !{} We will see: call void @llvm.dbg.value(metadata !{}, ...) !2 = !{} Note that we still get a numbered metadata entry for the node even if it's not used elsewhere. This is to avoid adding more context to the print functions. This is already legal IR - LLVM can parse and understand it - so there is no need to update the parser. The next patches in this stack will make such empty metadata operands more common and semantically important. Related to https://discourse.llvm.org/t/auto-undef-debug-uses-of-a-deleted-value Reviewed By: StephenTozer Differential Revision: https://reviews.llvm.org/D140900 -
Benjamin Kramer authored
This doesn't change the output in any way, but we have a bunch of emitFill for padding. When emitting an array of floats we'd end up with DataFragment float1 FillFragment 0 DataFragment float2 FillFragment 0 ... and so on We never actually emit anything for those fills, neither in asm nor obj emission mode, they just consume RAM for no reason.
-
Jay Foad authored
Differential Revision: https://reviews.llvm.org/D149145
-
Tom Eccles authored
Inlining as a hlfir.elemental will allow the transpose to be inlined into subsequent operations in some cases. For example, y = TRANSPOSE(x) z = y * 2 Will operate in a single loop without creating a temporary for the TRANSPOSE (unlike the runtime call, which always allocates). This is in a new SimplifyHLFIRIntriniscs pass. The intention is that some day that pass might replace the FIR SimplifyIntrinsics pass. Depends On: D149060 Reviewed By: jeanPerier, vzakhari Differential Revision: https://reviews.llvm.org/D149067
-
Tom Eccles authored
If we know the extent at compile time, it is better to generate an arith.constant than hlfir.get_extent. This gives more information earlier in compilation (before hflir.get_extent is lowered). Reviewed By: jeanPerier Differential Revision: https://reviews.llvm.org/D149060
-
Mikhail Goncharov authored
-
Nikita Popov authored
I was very confused by this change while working on a patch -- turns out that it's pre-existing, and we currently just match the "1" part of "13".
-
Zhongyunde authored
Fix the last runtime issue as some sequent comparisons need be spilted. For the origin equal comparisons chain, the new spilted Icmp chain will still be end with equal, while for the new not-equal comparisons chain, the new spilted Icmp chain will still be end with equal, so should address this carefully, see detail wih case partial_sequent_ne Thanks for @aeubanks, @glandium and @ayzhao report the runtime issue and carefully examine. Fix https://github.com/llvm/llvm-project/issues/59740. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D141188
-
Alex Bradbury authored
SELECT_CC is expanded to SETT and SELECT.
-
Alvin Wong authored
The interception tests rely on the test binary being large address aware. This has already been set for MSVC builds. Now we do the same for MinGW. This fixes the interception unit tests for i686-w64-windows-gnu target. Differential Revision: https://reviews.llvm.org/D148996
-
Alvin Wong authored
Use `ASAN_INTERCEPT_FUNC` instead of `INTERCEPT_FUNCTION` so it checks the return value and reports a message if verbosity >= 1. Differential Revision: https://reviews.llvm.org/D148989
-
Haojian Wu authored
This is an initial patch to add TextDocumentEdit (versioned edits) support in clangd, the scope is minimal: - add and extend the corresponding protocol structures - propagate the documentChanges for diagnostic codeactions (our motivated case) Differential Revision: https://reviews.llvm.org/D148783
-
Nikita Popov authored
-
Nikita Popov authored
-
Max Kazantsev authored
This lifts two TODOs from this function, allowing us to prove no-overflow whether it happens through max int (up) or through min int (down) for both and and sub. Differential Revision: https://reviews.llvm.org/D148618 Reviewed By: dmakogon
-
Nikita Popov authored
-
Luke Lau authored
Reviewed By: ABataev Differential Revision: https://reviews.llvm.org/D148923
-
Luke Lau authored
We were crashing when lowering interleave shuffles like (shuffle <0,3,1,4>, x:v4i8, y:v4i8) Where it was technically an unary shuffle (both EvenSrc and OddSrc point to the first operand), but the resulting extract_subvectors were out of bounds. This checks to make sure that the vectors being extracted are within range. Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D148647
-