- Oct 07, 2021
-
-
Gabor Marton authored
There is an error in the implementation of the logic of reaching the `Unknonw` tristate in CmpOpTable. ``` void cmp_op_table_unknownX2(int x, int y, int z) { if (x >= y) { // x >= y [1, 1] if (x + z < y) return; // x + z < y [0, 0] if (z != 0) return; // x < y [0, 0] clang_analyzer_eval(x > y); // expected-warning{{TRUE}} expected-warning{{FALSE}} } } ``` We miss the `FALSE` warning because the false branch is infeasible. We have to exploit simplification to discover the bug. If we had `x < y` as the second condition then the analyzer would return the parent state on the false path and the new constraint would not be part of the State. But adding `z` to the condition makes both paths feasible. The root cause of the bug is that we reach the `Unknown` tristate twice, but in both occasions we reach the same `Op` that is `>=` in the test case. So, we reached `>=` twice, but we never reached `!=`, thus querying the `Unknonw2x` column with `getCmpOpStateForUnknownX2` is wrong. The solution is to ensure that we reached both **different** `Op`s once. Differential Revision: https://reviews.llvm.org/D110910 -
Michael Forster authored
This reverts commit 00e704bf. This commit should should have updated llvm/llvm-project/lldb/source/Plugins/ABI/ARC/ABISysV_arc.cpp like the other architectures.
-
- Oct 06, 2021
-
-
Michael Kruse authored
Insert OMPLoopTransformationDirective between OMPLoopBasedDirective and the loop transformations OMPTileDirective and OMPUnrollDirective. This simplifies handling of loop transformations not requiring distinguishing between OMPTileDirective and OMPUnrollDirective anymore. Reviewed By: ABataev Differential Revision: https://reviews.llvm.org/D111119
-
Kazu Hirata authored
This reverts commit c72722f4.
-
Simon Pilgrim authored
The comparison always checks for zero value so know the icmp predicate will be ICMP_EQ
-
Louis Dionne authored
We should arguably have always been doing that. The state of libunwind is quite sad, so this commit adds several XFAILs to make the CI pass. We need to investigate why so many tests are not passing in some configurations, but I'll defer that to folks who actually work on libunwind for lack of bandwidth. Differential Revision: https://reviews.llvm.org/D110872
-
Kazu Hirata authored
The last uses were removed on Oct 5, 2021 in commit 3081de8c.
-
Clement Courbet authored
-
Nico Weber authored
It's true that docs.microsoft.com says: """The _ReadBarrier, _WriteBarrier, and _ReadWriteBarrier compiler intrinsics and the MemoryBarrier macro are all deprecated and should not be used. For inter-thread communication, use mechanisms such as atomic_thread_fence and std::atomic<T>, which are defined in the C++ Standard Library. For hardware access, use the /volatile:iso compiler option together with the volatile keyword.""" And these attributes have been here since these builtins were added in r192860. However: - cl.exe does not warn on them even with /Wall - none of the replacements are useful for C code - we don't add __attribute__((__deprecated__())) to any other declarations in intrin.h - intrin0.h in the MSVC headers declares _ReadWriteBarrier() (but without the deprecation attribute), so you get inconsistent deprecation warnings depending on if you include intrin.h or intrin0.h The motivation is that compiling sqlite.h with clang-cl produces a deprecation warning with clang-cl for _ReadWriteBarrier(), but not with cl.exe. Differential Revision: https://reviews.llvm.org/D111232
-
Clement Courbet authored
We have found a miscompile with this change, reverting while working on a reproducer. This reverts commit 455b60cc.
-
Simon Pilgrim authored
We need to be better at exposing the comparison predicate to getCmpSelInstrCost calls as some targets (e.g. X86 SSE) have very different costs for different comparisons (PR48337), and we can't always rely on the optional Instruction argument. This initial commit requires explicit condition type and predicate arguments. The next step will be to review a lot of the existing getCmpSelInstrCost calls which have used BAD_ICMP_PREDICATE even when the predicate is known. Differential Revision: https://reviews.llvm.org/D111024
-
Amy Kwan authored
The default wchar type is different on AIX vs. Linux. When this test is run on AIX, WCHAR_T_TYPE ends up being set to int. This is incorrect as the default wchar type on AIX is actually unsigned short, and setting the type incorrectly causes the expected errors to not be found. This patch sets the type correctly (to unsigned short) for AIX. Differential Revision: https://reviews.llvm.org/D110428
-
Simon Pilgrim authored
As described on D111049, removing the <string> dependency from error handling removes considerable build overhead, its recommended that the report_fatal_error(Twine) variant is used instead.
-
David Green authored
This updates a few more check lines, in some mte tests that were close to auto generated already and some CodeGenPrepare/consthoist tests where being able to see the entire code sequence is useful for determining whether code differences are improvements or not.
-
luxufan authored
This patch add a TableManager which reponsible for fixing edges that need entries to reference the target symbol and constructing such entries. In the past, the PerGraphGOTAndPLTStubsBuilder pass was used to build GOT and PLT entry, and the PerGraphTLSInfoEntryBuilder pass was used to build TLSInfo entry. By generalizing the behavior of building entry, I added a TableManager which could be reused when built GOT, PLT and TLSInfo entries. If this patch makes sense and can be accepted, I will apply the TableManager to other targets(MachO_x86_64, MachO_arm64, ELF_riscv), and delete the file PerGraphGOTAndPLTStubsBuilder.h Reviewed By: lhames Differential Revision: https://reviews.llvm.org/D110383
-
Raphael Isemann authored
-
Raphael Isemann authored
-
Simon Pilgrim authored
As described on D111049, we're trying to remove the <string> dependency from error handling and replace uses of report_fatal_error(const std::string&) with the Twine() variant which can be forward declared.
-
Jaroslav Sevcik authored
Separates the methods for recursive variable parsing in function context and non-recursive parsing of global variables. Original patch: https://reviews.llvm.org/rG601168e42037ac4433e74b920bb22f76d59ba420 Revert patch: https://reviews.llvm.org/rGca5be065c4c612554acdcae3ead01a1474eff296 Diff from the original patch: avoid using nullptr deref/ref. Differential Revision: https://reviews.llvm.org/D110570
-
Sanjay Patel authored
We already handle more complicated cases like: extelt (bitcast (inselt poison, X, 0)) --> trunc (lshr X) But we missed this simpler pattern: https://alive2.llvm.org/ce/z/D55h64 / https://alive2.llvm.org/ce/z/GKzzRq This is part of solving: https://llvm.org/PR52057 I made the transform depend on legal/desirable int type to avoid creating a shift of an illegal type (for example i128). I'm not sure if that restriction is actually necessary, but we can change that as a follow-up if the backend can deal with integer ops on too-wide illegal types. The pile of AVX512 test changes are all neutral AFAICT - the x86 backend seems to know how to turn that into the expected "kmov" instructions. Differential Revision: https://reviews.llvm.org/D111082
-
Michał Górny authored
PT_COREDUMP is a relatively recent addition. Use an #ifdef to skip it if the underlying system does not support it. Differential Revision: https://reviews.llvm.org/D111214
-
Max Kazantsev authored
-
LLVM GN Syncbot authored
-
Michał Górny authored
Split the ABIX86 class into two classes: base ABIX86 class that is common to 32-bit and 64-bit ABIs, and ABIX86_i386 class that is the base for 32-bit ABIs. This removes the confusing concept that ABIX86 initializes 64-bit ABIs but is only the base for 32-bit ABIs. Differential Revision: https://reviews.llvm.org/D111216
-
Simon Pilgrim authored
As described on D111049, we're trying to remove the <string> dependency from error handling and replace uses of report_fatal_error(const std::string&) with the Twine() variant which can be forward declared.
-
Pavel Labath authored
These were added to support some mips registers on linux, but linux mips support has now been removed due. They are still referenced in the freebds mips implementation, but the completeness of that implementation is also unknown. All other architectures just set these fields to zero, which is a cause of significant bloat in our register info definitions. Arm also has registers with variable sizes, but they were implemented in a more gdb-compatible fashion and don't use this feature. Differential Revision: https://reviews.llvm.org/D110914
-
Amara Emerson authored
This reverts commit d95cd811. Re-land the original patch now that the bug this exposed in selection has been fixed by 6bc64e24
-
Simon Pilgrim authored
As described on D111049, we're trying to remove the <string> dependency from error handling and replace uses of report_fatal_error(const std::string&) with the Twine() variant which can be forward declared.
-
Simon Pilgrim authored
As described on D111049, we're trying to remove the <string> dependency from error handling and replace uses of report_fatal_error(const std::string&) with the Twine() variant which can be forward declared.
-
Simon Pilgrim authored
As described on D111049, we're trying to remove the <string> dependency from error handling and replace uses of report_fatal_error(const std::string&) with the Twine() variant which can be forward declared.
-
Max Kazantsev authored
More similar cases to see that the opt we are trying to make is generic enough.
-
Vince Bridgers authored
This simple change addresses a special case of structure/pointer aliasing that produced different symbolvals, leading to false positives during analysis. The reproducer is as simple as this. ```lang=C++ struct s { int v; }; void foo(struct s *ps) { struct s ss = *ps; clang_analyzer_dump(ss.v); // reg_$1<int Element{SymRegion{reg_$0<struct s *ps>},0 S64b,struct s}.v> clang_analyzer_dump(ps->v); //reg_$3<int SymRegion{reg_$0<struct s *ps>}.v> clang_analyzer_eval(ss.v == ps->v); // UNKNOWN } ``` Acks: Many thanks to @steakhal and @martong for the group debug session. Reviewed By: steakhal, martong Differential Revision: https://reviews.llvm.org/D110625 -
Nathan Sidwell authored
The X86 backend only needs to know whether structure return is via an sret pointer. This removes the categorization enumeration and adjusts, templatizes and renames the related functions. Differential Revision: https://reviews.llvm.org/D109966
-
Nicolas Vasilache authored
Instead just emit a warning that analysis failed and the result will be treated conservatively. Differential Revision: https://reviews.llvm.org/D111217
-
David Green authored
This updates the check lines in some extra tests, to make them more maintainable going forward.
-
Simon Pilgrim authored
[CostModel][X86] getCmpSelInstrCost - treat BAD_PREDICATEs the same as the worst case cost predicates for ICMP/FCMP instructions As suggested on D111024, we should treat getCmpSelInstrCost calls without a specific predicate as matching the worst case predicate cost. These regressions will be addressed with a mixture of D111024 and fixing other specific getCmpSelInstrCost calls to have realistic predicates.
-
Jonas Paulsson authored
Seem to cause test failures in compiler-rt. Revert "[SystemZ] Implement memcmp of variable length with CLC." This reverts commit 7a4e9a0c. Revert "[SystemZ] Implement memcpy of variable length with MVC." This reverts commit c6c13c58.
-
Muhammad Omair Javaid authored
This patch allows LLDB to accept register sizes which are not aligned to 8 bits bitsize boundary. This fixes a crash in LLDB when connecting to OpenOCD stub. GDB xml description allows for non-aligned bit lengths but they are rounded off to nearest byte during transfer. In case of OpenOCD some of SOC specific system registers were less than a single byte in length and were causing LLDB to crash. Reviewed By: labath Differential Revision: https://reviews.llvm.org/D111131
-
David Spickett authored
On Ubuntu Focal x13 is used by something in the process of calling sched_yield. Causing the test to fail depending on when the thread is stopped. Adding x14 works around this and the test passes consistently. Not switching to only x14 because that could make other platforms fail. With both we'll always find at least one and even if both values are present we'll only get one report. Reviewed By: oontvoo, vitalybuka Differential Revision: https://reviews.llvm.org/D110931
-