- Apr 03, 2023
-
-
David Sherwood authored
Differential Revision: https://reviews.llvm.org/D147151
-
Guillaume Chatelet authored
This is an implementation of https://discourse.llvm.org/t/rfc-running-libc-unit-tests-as-integration-tests/69461. Differential Revision: https://reviews.llvm.org/D147231
-
Emilia Dreamer authored
The heuristic for determining if an arrow is a trailing return arrow looks for the auto keyword, along with parentheses. This isn't sufficient, since it also triggers on variable declarations with an auto type, and with an arrow operator. This patch makes sure a function declaration is being parsed, instead of any other declaration. Fixes https://github.com/llvm/llvm-project/issues/61469 Reviewed By: HazardyKnusperkeks, owenpan, MyDeveloperDay Differential Revision: https://reviews.llvm.org/D147377
-
Nikita Popov authored
Even if there are no thread-safety concerns, we should not promote (not guaranteed-to-execute) stores to globals without further analysis: While the global may be writable, we may not have provenance to perform the write. The @promote_global_noalias test case illustrates a miscompile in the presence of a noalias pointer to the global. Worth noting that the load-only promotion may also not be well-defined depending on precise semantics (we don't specify whether load violating noalias is poison or UB -- though I believe the general inclination is to make it poison, and only stores UB), but that's a more general issue. This is inspired by https://github.com/llvm/llvm-project/issues/60860, which is a related issue with TBAA metadata. Differential Revision: https://reviews.llvm.org/D146233
-
Simon Pilgrim authored
Add SSE41 test coverage as well
-
ibricchi authored
Currently there is no way to enable the module inliner when linking with full lto. This patch enables that option. Differential Revision: https://reviews.llvm.org/D146805
-
Timm Bäder authored
For the given test case, we were trying to initialize a member of C, which doesn't have any. Get the proper base pointer instead and initialize the members there. Differential Revision: https://reviews.llvm.org/D143466
-
Florian Hahn authored
The shape arguments for the @llvm.matrix.column.major.load where incorrect. Flip them so they are in sync with the shape of the multiplications.
-
Dmitri Gribenko authored
The dependency was introduced in https://github.com/llvm/llvm-project/commit/9a99afb455601aaa3a28d307c7bbcfdaad3fa4fc
-
Dmitri Gribenko authored
-
Congcong Cai authored
fixed [60810](https://github.com/llvm/llvm-project/issues/60810) unscoped enumerations in class can also be checked by `readability-static-accessed-through-instance` add matcher for `enumConstantDecl` to match format ``` struct { enum { E1 }; }; ``` The filter of member expression and the fix hint should be same as other condition. Reviewed By: PiotrZSL Differential Revision: https://reviews.llvm.org/D147315
-
Adrian Kuegel authored
Also fix tests, they were not calling FileCheck.
-
Serguei Katkov authored
When we replace poison with freeze poison it might appear that user of poison is a constant (for example vector constant). In this case we will get that constant will get non-constant operand. Moreover replacing poison and GlobalValue everywhere in module seems to be overkill. So the solution will be just make a replacement only in instructions we visited (contributing to hoisted condition). Moreover if user of posion is constant, this constant also should need a freeze and it does not make sense to replace poison with frozen version, just freeze another constant. Reviewed By: mkazantsev Differential Revision: https://reviews.llvm.org/D147429
-
Nikita Popov authored
This reverts commit cc90ca6f. This still breaks the GCC build in the same way as the previous version.
-
Nikita Popov authored
Extract a helper that does the clobber walk while taking into account the cap. Slightly reflow things to check this first in the store case, before we start walking over all accesses in the loop.
-
Jingu Kang authored
If MI sets zero for high 64-bits implicitly, remove `mov 0` for high 64-bits. For example, %1:fpr64 = nofpexcept FCVTNv4i16 %0:fpr128, implicit $fpcr %2:fpr64 = MOVID 0 %4:fpr128 = IMPLICIT_DEF %3:fpr128 = INSERT_SUBREG %4:fpr128(tied-def 0), killed %2:fpr64, %subreg.dsub %6:fpr128 = IMPLICIT_DEF %5:fpr128 = INSERT_SUBREG %6:fpr128(tied-def 0), killed %1:fpr64, %subreg.dsub %7:fpr128 = INSvi64lane %5:fpr128(tied-def 0), 1, killed %3:fpr128, 0 ==> %1:fpr64 = nofpexcept FCVTNv4i16 %0:fpr128, implicit $fpcr %6:fpr128 = IMPLICIT_DEF %7:fpr128 = INSERT_SUBREG %6:fpr128(tied-def 0), killed %1:fpr64, %subreg.dsub Differential Revision: https://reviews.llvm.org/D147235
-
Stefan Gränitz authored
Apparently, the refactor in 8b1771bd broke the logic behind formatv here: ``` 140736272011264 .rodata 140736272015360 .text 140736272011424 .eh_frame ```
-
Timm Bäder authored
The GetPtrBasePop op we were using only works for direct base classes. Differential Revision: https://reviews.llvm.org/D143480
-
Johannes de Fine Licht authored
Reviewed By: gysit Differential Revision: https://reviews.llvm.org/D147311
-
Sergei Barannikov authored
-Werror is redundant because CMake not only checks the exit status, but also parses the output of try_compile. -Wformat-security is a special case, because specifying it without -Wformat causes gcc to emit a warning in a format not recognized by CMake, which makes the check pass.
-
Jun Zhang authored
Signed-off-by:
Jun Zhang <jun@junz.org> Differential Revision: https://reviews.llvm.org/D147404
-
Jun Zhang authored
Differential Revision: https://reviews.llvm.org/D147409 Signed-off-by:
Jun Zhang <jun@junz.org>
-
Victor Perez authored
In patch https://reviews.llvm.org/rG478bd0735fc094d3af37e9791df5118a402ae7a7, this function was changed so that it always returns `success()`. Drop this and explicitly state it won't be generated in the `.td` file and explain `llvm.resume` restrictions will be checked in `LLVMFuncOp::verify()`. Differential Revision: https://reviews.llvm.org/D147342
-
Martin Braenne authored
The deduplicated code is moved into initVars(). As an added bonus, pushCallInternal() now also gets the "Add all fields mentioned in default member initializers" behavior, which apparently had been added to the Environment ctor but not pushCallInternal(). Reviewed By: xazax.hun, ymandel Differential Revision: https://reviews.llvm.org/D147326
-
Nikita Popov authored
This reverts commit 88c744e7. This breaks the GCC build and is already discussed on the revision.
-
Guillaume Chatelet authored
Build bot detected a memory leak. This reverts commit b82d04ea.
-
Guillaume Chatelet authored
This is an implementation of https://discourse.llvm.org/t/rfc-running-libc-unit-tests-as-integration-tests/69461. Differential Revision: https://reviews.llvm.org/D147231
-
Job Noorman authored
Block is not mutated so can be made const. Reviewed By: lhames Differential Revision: https://reviews.llvm.org/D147316
-
Jean Perier authored
The current code is wrong: it is doing an alloca with the declared type instead of the dynamic type, leading to undefined behavior when the dynamic type and declared type differ and the temporary is later used. This also introduces some `fir.alloca none` for unlimited polymorphic that are not allocating the right thing at all. Add TODOs for now, the correct thing to do will probably be to use the runtime (like AssignTemporary), but since this happens in code doing "mold" temp allocation, I first need to check if there is a need for "mold" temporary creation not followed by an assign, or if this can be combined with the assign instead (for HLFIR, it is pretty easy combine this from as_expr codegen, not sure for the current lowering). Differential Revision: https://reviews.llvm.org/D147333
-
Jean Perier authored
The current lowering for polymorphic pointer association was not dealing with NULL in a "context aware" fashion: it was calling the `PointerAssociate` runtime entry point with a fir.box<none> target. But the fir.box<none> is a descriptor for a scalar, this lead the runtime to set the pointer rank to zero, regardless of its actual rank. I do not think there is a way to expose this problem with the Fortran code currently supported by flang, because most further manipulation of the pointer would either set the rank correctly, or do not rely on the rank in the runtime descriptor. However, this is incorrect, and when assumed rank are supported, the following would have failed: ``` subroutine check_rank(p) class(*), pointer :: p(..) p => null() select rank(p) rank (1) print *, "OK" rank default print *, "FAILED" end select end subroutine class(*), pointer :: p(:) p => null() call check_rank(p) end ``` Instead, detect NULL() in polymorphic pointer lowering and trigger the deallocation of the pointer. Differential Revision: https://reviews.llvm.org/D147317
-
Tobias Gysi authored
The revision adds the stack alignment to the data layout dialect and it extends the LLVM dialect import and export to support the new data layout entry. One possible use case for the flag is the LLVM dialect inliner. The LLVM inliner queries the flag to determine if it is safe to update the alignment of an existing alloca. We may want to perform the same optimization inside of MLIR. Reviewed By: Dinistro Differential Revision: https://reviews.llvm.org/D147332
-
Ben Shi authored
Optimize 32-bit 'x+(y<<i)' to (ALSL_W y, x, i) on LoongArch64, in which 'i' is in [1, 2, 3, 4]. Reviewed By: xen0n, SixWeining Differential Revision: https://reviews.llvm.org/D147423
-
Adrian Kuegel authored
-
Sheng authored
-
Ben Shi authored
Optimize bitfield extractions retaining bit positions from 'lu12i + addi + and' to 'bstrpick + slli'. Reviewed By: xen0n, SixWeining Differential Revision: https://reviews.llvm.org/D147368
-
Ben Shi authored
Reviewed By: SixWeining, xen0n Differential Revision: https://reviews.llvm.org/D147367
-
Qiu Chaofan authored
Power ISA 3.0 introduced new 'test data class' instructions, which accept flags for: NaN/Infinity/Zero/Denormal. This instruction can be used to implement custom lowering for llvm.is.fpclass, but some extra bits provided by the intrinsic are missing (normal and QNaN/SNaN). For those categories not natively supported, this patch uses a two-way or three-way combination to implement correct behavior. Reviewed By: sepavloff, shchenz Differential Revision: https://reviews.llvm.org/D140381
-
Ben Shi authored
Optimize 'x * c' to (ALSL x, (SLLI x, i0), i1) in which c = (1 << i0) | (1 << i1). Reviewed By: xen0n, SixWeining Differential Revision: https://reviews.llvm.org/D147406
-
Ben Shi authored
Reviewed By: xen0n, SixWeining Differential Revision: https://reviews.llvm.org/D147405
-
Craig Topper authored
-