- Sep 02, 2022
-
-
Arthur Eubanks authored
-
Nuno Lopes authored
So we can't use ctlz in poison-producing mode
-
- Sep 01, 2022
-
-
Arthur Eubanks authored
This reverts commit b10a341a. This commit exposes the pre-existing https://github.com/llvm/llvm-project/issues/56503 in some edge cases. Will fix that and then reland this.
-
Aaron Ballman authored
-
Matt Devereau authored
-
Mehdi Amini authored
Apply clang-tidy fixes for performance-unnecessary-value-param in InferIntRangeInterfaceImpls.cpp (NFC)
-
Mehdi Amini authored
-
Cole Kissane authored
add LLVM_PREFER_STATIC_ZSTD (default TRUE) cmake config flag (compression test seems to fail for shared zstd on windows, note that zstd multithread is by default disabled in the static build so it may be a hidden variable) propagate variable zstd_DIR in LLVMConfig.cmake.in fix llvm-config CMakeLists.txt behavior for absolute libs windows get zstd lib name Reviewed By: phosek Differential Revision: https://reviews.llvm.org/D132870
-
Nikita Popov authored
DwarfEhPrepare inserts calls to _Unwind_Resume into landing pads. If _Unwind_Resume happens to be defined in the same module and debug info is used, then this leads to a verifier error: inlinable function call in a function with debug info must have a !dbg location call void @_Unwind_Resume(ptr %exn.obj) #0 Fix this by assigning a dummy location to the call. (As this happens in the backend, inlining is not actually relevant here.) Fixes https://github.com/llvm/llvm-project/issues/57469. Differential Revision: https://reviews.llvm.org/D133095 -
Valentin Clement authored
This patch update the lowering of the shifta intrinsic to match the behvior of gfortran. When the SHIFT value is equal to the integer bitwidth then we handle it differently. This is due to the operation used in lowering (`mlir::arith::ShRSIOp`) that lowers to `ashr`. Before this patch we have the following results: ``` SHIFTA( -1, 8) = 0 SHIFTA( -2, 8) = 0 SHIFTA( -30, 8) = 0 SHIFTA( -31, 8) = 0 SHIFTA( -32, 8) = 0 SHIFTA( -33, 8) = 0 SHIFTA(-126, 8) = 0 SHIFTA(-127, 8) = 0 SHIFTA(-128, 8) = 0 ``` While gfortran is giving this: ``` SHIFTA( -1, 8) = -1 SHIFTA( -2, 8) = -1 SHIFTA( -30, 8) = -1 SHIFTA( -31, 8) = -1 SHIFTA( -32, 8) = -1 SHIFTA( -33, 8) = -1 SHIFTA(-126, 8) = -1 SHIFTA(-127, 8) = -1 SHIFTA(-128, 8) = -1 ``` With this patch flang and gfortran have the same behavior. Reviewed By: jeanPerier Differential Revision: https://reviews.llvm.org/D133104
-
Nikita Popov authored
This is a fix for PR57025 and an alternative to D131776. The problem in the phi-translation-to-wrong-context.ll test case is that phi translation of %gep.j into if2 pick %gep.i as the result. While this instruction has the correct pointer address, it occurs in a context where %i != 0. As such, we get a NoAlias result for the store in if2, even though they do alias for %i == 0 (which is legal in the original context of the pointer). PHITranslateValue already has a MustDominate option, which can be used to restrict PHI translation results to values that dominate the translated-into block. However, this is more aggressive than what we need and would significantly regress GVN results. In particular, if we have a pointer value that does not require any translation, then it is fine to continue using that value in the predecessor, because the context is still correct for the original query. We only run into problems if PHITranslateSubExpr() picks a completely random instruction in a context that may have preconditions that do not hold. Fix this by always performing the dominance checks in PHITranslateSubExpr(), without enabling the more general MustDominate requirement. Fixes https://github.com/llvm/llvm-project/issues/57025. This also fixes the test case for https://github.com/llvm/llvm-project/issues/30999, but I'm not sure whether that's just the particular test case, or a general solution to the problem. Differential Revision: https://reviews.llvm.org/D132935
-
Wei Yi Tee authored
[clang][dataflow] Use `StringMap` for storing analysis states at annotated points instead of `vector<pair<string, StateT>>`. Reviewed By: gribozavr2, sgatev, ymandel Differential Revision: https://reviews.llvm.org/D132763
-
Nikita Popov authored
-
Nikita Popov authored
-
Wei Yi Tee authored
Moves the work required for retrieving annotation states into the `SetupTest` and `PostVisitCFG` callback to avoid having to run a separate pass over the CFG after analysis has completed. Reviewed By: gribozavr2, sgatev, ymandel Differential Revision: https://reviews.llvm.org/D132377
-
Nikita Popov authored
-
Nikita Popov authored
This code was relying on a very subtle contract: The expectation was that for non-allocas, the unwind safety check would already perform a capture check, so we don't need to perform it later. This held true when this unwind safety was only handled for allocas and noalias calls, but became incorrect when byval support was added. To avoid this kind of issue, just remove the dependency between the unwind and thread-safety checks entirely. At worst, this means we perform a redundant capture check. If this should turn out to be problematic for compile-time, we can cache that query in a more explicit way.
-
Wei Yi Tee authored
- Add `AnalysisInputs` struct as the parameters for `checkDataflow`, and renamed `AnalysisData` struct to `AnalysisOutputs` which contains the data structures generated from a dataflow analysis run. - Remove compulsory binding from statement to annotations. Instead, `checkDataflow` in the most general form takes a `VerifyResults` callback which takes as input an `AnalysisOutputs` struct. This struct contains the data structures generated by the analysis that can then be tested. We then introduce two overloads/wrappers of `checkDataflow` for different mechanisms of testing - one which exposes annotation line numbers and is not restricted to statements, and the other which exposes states computed after annotated statements. In the future, we should look at retrieving the analysis states for constructs other than statements. Reviewed By: gribozavr2, sgatev Differential Revision: https://reviews.llvm.org/D132147
-
Stephen Tozer authored
Re-landing with an erroneous assert removed. This reverts commit 58d104b3.
-
Nikita Popov authored
Variant with capture after the loop, in which case promotion is safe.
-
serge-sans-paille authored
This is a follow up to https://reviews.llvm.org/D126864, addressing some remaining comments. It also considers union with a single zero-length array field as FAM for each value of -fstrict-flex-arrays. Differential Revision: https://reviews.llvm.org/D132944
-
Nikita Popov authored
-
Ilia Diachkov authored
The patch adds the support of OpenCL and SPIR-V built-in types. It also implements ExtInst selection and adds spv_unreachable and spv_alloca intrinsics which improve the generation of the corresponding SPIR-V code. Five LIT tests are included to demonstrate the improvement. Differential Revision: https://reviews.llvm.org/D132648 Co-authored-by:
Aleksandr Bezzubikov <zuban32s@gmail.com> Co-authored-by:
Michal Paszkowski <michal.paszkowski@outlook.com> Co-authored-by:
Andrey Tretyakov <andrey1.tretyakov@intel.com> Co-authored-by:
Konrad Trifunovic <konrad.trifunovic@intel.com>
-
Sanjay Patel authored
The existing predicate doesn't work for a single-element vector, so make sure we are not crossing scalar/vector types. Test (was crashing) based on the post-commit example for: 48277712
-
Sanjay Patel authored
When X is a power-of-two or zero and zero input is poison: ctlz(i32 X) ^ 31 --> cttz(X) cttz(i32 X) ^ 31 --> ctlz(X) https://alive2.llvm.org/ce/z/Cs7sFE
-
Alex Bradbury authored
Zicbop->Zicbom typo.
-
Nikita Popov authored
-
Bjorn Pettersson authored
This commit adds a reproducer for https://github.com/llvm/llvm-project/issues/57025 showing a miscompile in GVN. Not sure how likely this kind of faults would be in a normal pipeline, considering that the input IR has some dead code in it. On the other hand, GVN itself sometimes creates dead basic blocks when splitting critical edges. Anyway, the fault was found when doing fuzzy testing using random pass pipelines. Differential Revision: https://reviews.llvm.org/D131775
-
Alexey Bataev authored
Need either follow the original order of the operands for bool logical ops, or emit freeze instruction to avoid poison propagation. Differential Revision: https://reviews.llvm.org/D126877
-
Amara Emerson authored
This port of the SDAG optimization is only for exact sdiv case. Differential Revision: https://reviews.llvm.org/D130517
-
Yuanbo Li authored
This patch fixes an issue in which CorrelatedValuePropagation::processSRem would create new instructions to represent the SRem instruction, but would not correctly copy any existing debug location metadata to the new instruction. Differential Revision: https://reviews.llvm.org/D132218
-
Egor Zhdan authored
This is a valid HTML5 tag. Previously it triggered a Clang error (`HTML start tag prematurely ended, expected attribute name or '>'`) since Clang was treating `/>` as a text token. This was happening because after lexing the closing quote (`"`) the lexer state was reset to "Normal" while the tag was not actually closed yet: `>` was not yet parsed at that point. rdar://91464292 Differential Revision: https://reviews.llvm.org/D132932
-
Michał Górny authored
Ensure that the ConnectionStatus and Status from Communication::ReadThread() is correctly passed to ::Read() in order to fix further discrepancies between ::Read() calls in non-threaded and threaded modes. Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.llvm.org/D132577
-
Florian Hahn authored
This patch moves the cost-based decision whether to use an intrinsic or library call to the point where the recipe is created. This untangles code-gen from the cost model and also avoids doing some extra work as the information is already computed at construction. Reviewed By: Ayal Differential Revision: https://reviews.llvm.org/D132585
-
Nicolas Vasilache authored
-
Dylan Fleming authored
Allows addition/multiplication reductions to be used with real types by adding getReductionOperation() to OpenMP.cpp, which can select either integer or floating-point instruction. Reviewed By: kiranchandramohan Differential Revision: https://reviews.llvm.org/D132459
-
Nuno Lopes authored
This reverts commit 4aed0986.
-
Nathan James authored
-
Nicolas Vasilache authored
Previously, the memory space would not be propagated properly, creating invalid IR. Differential Revision: https://reviews.llvm.org/D133101
-
Nuno Lopes authored
So we can't use ctlz in poison-producing mode
-