- Oct 03, 2023
-
-
Shoaib Meenai authored
Right now, `-Wformat` for a scoped enum will suggest a cast based on the format specifier being used. This can lead to incorrect results, e.g. attempting to format a scoped enum with `%s` would suggest casting to `char *` instead of fixing the specifier. Change the logic to treat the scoped enum's underlying type as the intended type to be printed, and suggest format specifier changes and casts based on that.
-
Kirill Stoimenov authored
This reverts commit 414ff812.
-
Vlad Serebrennikov authored
`make_cxx_dr_status` has a hardcoded number of the latest release, for the purpose of determining whether a particular DR is available to users or not yet. I'm bumping it to 17.
-
JolantaJensen authored
Currently the mappings from TLI are used to generate the list of available "scalar to vector" mappings attached to scalar calls as "vector-function-abi-variant" LLVM IR attribute. Function names from TLI are wrapped in mangled name following the pattern: _ZGV<isa><mask><vlen><parameters>_<scalar_name>[(<vector_redirection>)] The problem is the mangled name uses _LLVM_ as the ISA name which prevents the compiler to compute vectorization factor for scalable vectors as it cannot make any decision based on the _LLVM_ ISA. If we use "s" as the ISA name, the compiler can make decisions based on VFABI specification where SVE spacific rules are described. This patch is only a refactoring stage where there is no change to the compiler's behaviour.
-
LLVM GN Syncbot authored
-
Alex Langford authored
The implementations are now close enough that replacing it is trivial.
-
Matheus Izvekov authored
Hashing the sugared type instead of the canonical type meant that a simple example like this would always fail under MSVC: ``` static auto l() {} int main() { auto a = l; a(); } ``` `clang --target=x86_64-pc-windows-msvc -fno-exceptions -fsanitize=function -g -O0 -fuse-ld=lld -o test.exe test.cc` produces: ``` test.cc:4:3: runtime error: call to function l through pointer to incorrect function type 'void (*)()' ``` -
Hiroshi Yamauchi authored
The MSVC compiler 19.37 for ARM64 from Visual Studio 17.7.4 has an optimization bug that causes an incorrect behavior with isAdvSIMDModImmType10() and causes the test test/CodeGen/AArch64/arm64-build-vector.ll to fail. Work around by using a slightly different variation.
-
Joseph Huber authored
Summary: The `algorithm` header included here sometimes caused issues when using `libc++` over `libstdc++`. This was primarily because of the order they were included in. This patch just gets rid of this dependency as it was only used for min and max which are trivial to reimplement. Fixes: https://github.com/llvm/llvm-project/issues/67938
-
Alexandre Ganea authored
This would silence: ``` [2003/2029] Generating ASAN_NOINST_TEST_OBJECTS.asan_noinst_test.cpp.x86_64-inline.o In file included from C:/git/llvm-project/compiler-rt/lib/asan/tests/asan_noinst_test.cpp:24: In file included from C:/git/llvm-project/compiler-rt/lib/asan\asan_allocator.h:20: In file included from C:/git/llvm-project/compiler-rt/lib\sanitizer_common/sanitizer_allocator.h:74: C:/git/llvm-project/compiler-rt/lib\sanitizer_common\sanitizer_allocator_primary64.h:639:54: warning: 'static_assert' with no message is a C++17 extension [-Wc++17-extensions] 639 | static_assert(kRegionSize >= SizeClassMap::kMaxSize); | ^ | , "" 1 warning generated. ``` -
Alexandre Ganea authored
``` [3/56] Building CXX object projects\compiler-rt\lib\asan\CMakeFiles\RTAsan.x86_64.dir\asan_poisoning.cpp.obj C:\git\llvm-project\compiler-rt\lib\asan\asan_poisoning.cpp(450): warning C4390: ';': empty controlled statement found; is this the intent? [4/56] Building CXX object projects\compiler-rt\lib\asan\CMakeFiles\RTAsan_dynamic.x86_64.dir\asan_poisoning.cpp.obj C:\git\llvm-project\compiler-rt\lib\asan\asan_poisoning.cpp(450): warning C4390: ';': empty controlled statement found; is this the intent? ```
-
Alexandre Ganea authored
Disable `warning C4200: nonstandard extension used : zero-sized array in struct/union` as done in other places in compiler-rt.
-
Alexandre Ganea authored
-
Alexandre Ganea authored
As suggested by https://reviews.llvm.org/D116872#4650507 Differential Revision: https://reviews.llvm.org/D116872
-
Tobias Hieta authored
[workflow] Fix abi checker in llvm-tests. Same fix as in 99fb0af8 (#67957) Fixes #67651
-
Craig Topper authored
…t folding. We want to create a build_vector with narrower elements here. Normally getNode on the ISD::TRUNCATE will constant fold this to a new BUILD_VECTOR. If it doesn't constant fold, we end up with a cycle in the DAG because we truncate the node we are replacing. Constant folding can fail if one of the elements is an opaque constant. The failing case I saw involved an opaque constant created by a memset that was expanded. Not sure exactly what happened after that. This patch creates a new BUILD_VECTOR with the new type directly.
-
Vlad Serebrennikov authored
https://cplusplus.github.io/CWG/issues/2267.html Related: #63416
-
- Oct 02, 2023
-
-
Timm Baeder authored
-
jeanPerier authored
Fixes https://github.com/llvm/llvm-project/issues/67658 The bug was that when instantiating a character array result variable, the code inserted a cast from the result buffer to the proper array type if it could see an fir.unboxchar op. But this is wrong for results and on caller side because the fir.emboxchar is visible so, charHelper.genUnboxChar() just takes the operand from that instead of generating an unboxchar. The fix is simply to move the cast at the place where fir.boxchar<> argument are dealt with. The cast when creating fir.emboxchar is also removed: it adds noise and causes constant length result type to be lowered to fir.char<?>. The main change from this patch is to deal with the lit test fallout of this cast move and removal.
-
Philip Reames authored
-
Serge Pavlov authored
This reverts commit 2b279487. On some buildbots the test LLVM::interrupts.test start failing.
-
Timm Baeder authored
-
Simon Pilgrim authored
Pulled out of D155472
-
Shafik Yaghmour authored
In some cases where ill-formed code could be interpreted as a deduction guide we can crash because we reach an unreachable path. This fixes this issue by introducing a diagnostic instead. Fixes: https://github.com/llvm/llvm-project/issues/65522
-
Yinying Li authored
-
Yinying Li authored
Change CompressedWithHigh to LooseCompressed.
-
Louis Dionne authored
This reverts commit ec9d80ec, since we are currently seeing tons of CI jobs being triggered spuriously.
-
vabridgers authored
This change avoids a crash in BasicValueFactory by checking the bit width of an APSInt to avoid calling getZExtValue if greater than 64-bits. This was caught by our internal, randomized test generator. Clang invocation clang -cc1 -analyzer-checker=optin.portability.UnixAPI case.c <src-root>/llvm/include/llvm/ADT/APInt.h:1488: uint64_t llvm::APInt::getZExtValue() const: Assertion `getActiveBits() <= 64 && "Too many bits for uint64_t"' failed. ... #9 <address> llvm::APInt::getZExtValue() const <src-root>/llvm/include/llvm/ADT/APInt.h:1488:5 clang::BinaryOperatorKind, llvm::APSInt const&, llvm::APSInt const&) <src-root>/clang/lib/StaticAnalyzer/Core/BasicValueFactory.cpp:307:37 llvm::IntrusiveRefCntPtr<clang::ento::ProgramState const>, clang::BinaryOperatorKind, clang::ento::NonLoc, clang::ento::NonLoc, clang::QualType) <src-root>/clang/lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp:531:31 llvm::IntrusiveRefCntPtr<clang::ento::ProgramState const>, clang::BinaryOperatorKind, clang::ento::SVal, clang::ento::SVal, clang::QualType) <src-root>/clang/lib/StaticAnalyzer/Core/SValBuilder.cpp:532:26 ... -
Alexey Bataev authored
Need to take the mask size as number of elements, not the number of elements of the original fixed vector. Otherwise, the compiler may crash.
-
Slava Zakharin authored
…result. If function result have allocatable components or components that may require finalization, we have to call Destroy runtime for them. We also have to free the top-level entity's memory regardless of whether we called Destroy or not.
-
Slava Zakharin authored
This should help inlining elemental into another elemental, and also will help to get rid of unnecessary deep copies in bufferization.
-
Serge Pavlov authored
Recent versions of GNU binutils starting from 2.39 support symbol+offset lookup in addition to the usual numeric address lookup. This change adds symbol lookup to llvm-symbolize and llvm-addr2line. Now llvm-symbolize behaves closer to GNU addr2line, - if the value specified as address in command line or input stream is not a number, it is treated as a symbol name. For example: llvm-symbolize --obj=abc.so func_22 llvm-symbolize --obj=abc.so "CODE func_22" This lookup is now supported only for functions. Specification with offset is not supported yet. Differential Revision: https://reviews.llvm.org/D149759 -
Vlad Serebrennikov authored
While working on #67965, I stumbled upon the fact that `make_cxx_dr_status` script doesn't check for duplicated comment (last comment wins), so I added this check. It even found another instance of duplicated comment: CWG1223 was marked as CWG1227. I fixed status of the former.
-
Nikita Popov authored
-
Felipe de Azevedo Piovezan authored
FastISel currently drops dbg.values targeting allocas. It may seem surprising that a simple case would fail to be lowered, but dbg.values targeting allocas are not common; we usually have dbg.declares doing that, and those are handled by the common code between FastISel and SelectionDAGISel. This patch addresses the issue by querying the static alloca map from FuncInfo. If we have a frame index for it, we create a DBG_VALUE intrinsic from it.
-
Oleksandr "Alex" Zinenko authored
Buffer deallocation pipeline previously was incorrect when applied to functions. It has since been fixed. Make sure it is exercised in the tutorial to avoid leaking allocations.
-
Matthias Springer authored
The bufferization analysis has been improved over the last months and this workaround is no longer needed.
-
Sam McCall authored
This is a partial revert of cc696627 The full definition of Decl and Stmt are required by PointerUnion, which validates the number of free bits in Decl* etc based on type alignment.
-
Corentin Jabot authored
-