- Dec 08, 2023
-
-
Graham Hunter authored
If we have vectorized variants of a function which take linear parameters, we should be able to vectorize assuming the strides match.
-
alex-t authored
AlignmentFromAssumptions uses SCEV to update the load/store alignment. It tracks down the use-def chains for the pointer which it takes from the assumption cache until it reaches the load or store instruction. It mistakenly adds to the worklist the users of the load result irrespective of the fact that the load result has no connection with the original pointer, moreover, it is not a pointer at all in most cases. Thus the def-use chain contains irrelevant load users. When it is a store instruction the algorithm attempts to adjust its alignment to the alignment of the original pointer. The problem appears when the load and store memory operand pointers belong to different address spaces and possibly have different sizes. The 4bf015c0 was an attempt to address a similar problem. The truncation or zero extension was added to make pointers the same size. That looks strange to me because the zero extension of the pointer is not legal. The test in the 4bf015c0 does not work any longer as for the explicit address spaces conversion the addrspacecast is generated. Summarize: 1. For the alloca to global address spaces conversion addrspacecasts are used, so the code added by the 4bf015c0 is no longer functional. 2. The AlignmentFromAssumptions algorithm should not add the load users to the worklist as they have nothing to do with the original pointer. 3. Instead we only track users that are: GetelementPtrIns, PHINodes.
-
Dinar Temirbulatov authored
Patch by: Kerry McLaughlin <kerry.mclaughlin@arm.com>
-
Nick Desaulniers authored
Not that I'm very good at SFINAE, but it seems that conversion operators are perhaps difficult to compose with SFINAE. I saw an example that used one layer of indirection to have an explicit return type that could then be used with enable_if_t. Link: https://stackoverflow.com/a/7604580 Fixes: #74623
-
Nikita Popov authored
If the module summary references a global variable that does not exist, throw a nice error instead of asserting. Fixes https://github.com/llvm/llvm-project/issues/74726.
-
- Dec 07, 2023
-
-
Krzysztof Parzyszek authored
The specific terminator operation depends on what operation it is inside of. The function `genOpenMPTerminator` performs these checks and selects the appropriate type of terminator. Remove partial duplication of that code, and replace it with a function call. This makes `genOpenMPTerminator` be the sole source of OpenMP terminators.
-
Nikita Popov authored
This adds test coverage for conditions with and/or.
-
Zack Johnson authored
-
Simon Pilgrim authored
If we're extracting a constant floating point value, and the constant is a legal fp imm value, then replace the extraction with a fp constant.
-
Natalie Chouinard authored
Add a pre-commit CI workflow for the experimental SPIR-V backend. This action should only run when SPIR-V target or test files are modified. The `codegen-spirv` tests don't run as part of `check-all` because the SPIR-V backend is still experimental. Depends on #73371 (for a green tree)
-
Natalie Chouinard authored
Remove references to functions that were deleted in #74521 which are causing SPIR-V backend build failures.
-
Dominik Wójt authored
Add proper explanation for cin.sh.cpp fail. The stdin-is-piped.sh.cpp used to fail with old qemu (4.2.0), but should pass now, as the qemu is updated now to 8.1.3 in CI.
-
Joseph Huber authored
Summary: This was added in a previous patch to update how we export the static library used for OpenMP offloading. By mistake this if-else was using the output incorrectly. Fixes https://github.com/llvm/llvm-project/issues/74079
-
Timm Bäder authored
-
W-50243 authored
'isctype' fails in arm64-big-endian because the __regex_word involved in mask operation is not changed based on the platform endianness, while the character mask does change.
-
Simon Pilgrim authored
-
Nhat Nguyen authored
Fixes #62433 Co-authored-by:Louis Dionne <ldionne.2@gmail.com>
-
Nikita Popov authored
When I originally added this fold, it did not actually fix my motivation case, where the add was represented as an or. Now that we have the disjoint flag this can finally be cleanly supported.
-
Nikita Popov authored
-
Utkarsh Saxena authored
-
Nikita Popov authored
This matches either a plain "add" or an "or disjoint" that can be converted into an add. The AddLike terminology is adopted from the SDAG layer.
-
Krzysztof Parzyszek authored
Replace explicit calls to ``` op = builder.create<SectionOp>(...) createBodyOfOp<SectionOp>(op, ...) ``` with a single call to ``` createOpWithBody<SectionOp>(...) ``` This is NFC, that's what the `createOpWithBody` function does.
-
Nikita Popov authored
This test contains an annoying mix of generated and hand-written check lines. Generate the whole test.
-
Aaron Ballman authored
This code was added 17 years ago but never enabled or tested. GCC warns that -I- is deprecated for them, and Clang gives an error when passed -I-, so we may as well remove this code rather than hook it up to the driver and maintain it.
-
Nikita Popov authored
I'm not sure whether it's possible to cause a miscompile due to the missing check right now, as the affected values mechanism effectively protects us against this. This becomes a problem for an upcoming patch though.
-
Shengchen Kan authored
-
wanglei authored
Mark ISD::SETCC node as legal, and add handling for the vector types condition codes.
-
Pablo Antonio Martinez authored
Test was failing due to a different transform sequence declaration (transform sequence were used, while now it should be named transform sequence). Test is now fixed.
-
Duo Wang authored
lld string tail merging interacts badly with ASAN on Windows, as is reported in https://github.com/llvm/llvm-project/issues/62078. A similar error was found when building LLVM with `-DLLVM_USE_SANITIZER=Address`: ```console [2/2] Building GenVT.inc... FAILED: include/llvm/CodeGen/GenVT.inc C:/Dev/llvm-project/Build_asan/include/llvm/CodeGen/GenVT.inc cmd.exe /C "cd /D C:\Dev\llvm-project\Build_asan && C:\Dev\llvm-project\Build_asan\bin\llvm-min-tblgen.exe -gen-vt -I C:/Dev/llvm-project/llvm/include/llvm/CodeGen -IC:/Dev/llvm-project/Build_asan/include -IC:/Dev/llvm-project/llvm/include C:/Dev/llvm-project/llvm/include/llvm/CodeGen/ValueTypes.td --write-if-changed -o include/llvm/CodeGen/GenVT.inc -d include/llvm/CodeGen/GenVT.inc.d" ================================================================= ==31944==ERROR: AddressSanitizer: global-buffer-overflow on address 0x7ff6cff80d20 at pc 0x7ff6cfcc7378 bp 0x00e8bcb8e990 sp 0x00e8bcb8e9d8 READ of size 1 at 0x7ff6cff80d20 thread T0 #0 0x7ff6cfcc7377 in strlen (C:\Dev\llvm-project\Build_asan\bin\llvm-min-tblgen.exe+0x1400a7377) #1 0x7ff6cfde50c2 in operator delete(void *, unsigned __int64) (C:\Dev\llvm-project\Build_asan\bin\llvm-min-tblgen.exe+0x1401c50c2) #2 0x7ff6cfdd75ef in operator delete(void *, unsigned __int64) (C:\Dev\llvm-project\Build_asan\bin\llvm-min-tblgen.exe+0x1401b75ef) #3 0x7ff6cfde59f9 in operator delete(void *, unsigned __int64) (C:\Dev\llvm-project\Build_asan\bin\llvm-min-tblgen.exe+0x1401c59f9) #4 0x7ff6cff03f6c in operator delete(void *, unsigned __int64) (C:\Dev\llvm-project\Build_asan\bin\llvm-min-tblgen.exe+0x1402e3f6c) #5 0x7ff6cfefbcbc in operator delete(void *, unsigned __int64) (C:\Dev\llvm-project\Build_asan\bin\llvm-min-tblgen.exe+0x1402dbcbc) #6 0x7ffb7f247343 (C:\WINDOWS\System32\KERNEL32.DLL+0x180017343) #7 0x7ffb800826b0 (C:\WINDOWS\SYSTEM32\ntdll.dll+0x1800526b0) 0x7ff6cff80d20 is located 31 bytes after global variable '"#error \"ArgKind is not defined\"\n"...' defined in 'C:\Dev\llvm-project\llvm\utils\TableGen\IntrinsicEmitter.cpp' (0x7ff6cff80ce0) of size 33 '"#error \"ArgKind is not defined\"\n"...' is ascii string '#error "ArgKind is not defined" ' 0x7ff6cff80d20 is located 0 bytes inside of global variable '""' defined in 'C:\Dev\llvm-project\llvm\utils\TableGen\IntrinsicEmitter.cpp' (0x7ff6cff80d20) of size 1 '""' is ascii string '' SUMMARY: AddressSanitizer: global-buffer-overflow (C:\Dev\llvm-project\Build_asan\bin\llvm-min-tblgen.exe+0x1400a7377) in strlen Shadow bytes around the buggy address: 0x7ff6cff80a80: 01 f9 f9 f9 f9 f9 f9 f9 00 00 00 00 01 f9 f9 f9 0x7ff6cff80b00: f9 f9 f9 f9 00 00 00 00 00 00 00 00 01 f9 f9 f9 0x7ff6cff80b80: f9 f9 f9 f9 00 00 00 00 01 f9 f9 f9 f9 f9 f9 f9 0x7ff6cff80c00: 00 00 00 00 01 f9 f9 f9 f9 f9 f9 f9 00 00 00 00 0x7ff6cff80c80: 00 00 00 00 01 f9 f9 f9 f9 f9 f9 f9 00 00 00 00 =>0x7ff6cff80d00: 01 f9 f9 f9[f9]f9 f9 f9 00 00 00 00 00 00 00 00 0x7ff6cff80d80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x7ff6cff80e00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x7ff6cff80e80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x7ff6cff80f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x7ff6cff80f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe Left alloca redzone: ca Right alloca redzone: cb ==31944==ABORTING ``` This is reproducible with the 17.0.3 release: ```console $ clang-cl --version clang version 17.0.3 Target: x86_64-pc-windows-msvc Thread model: posix InstalledDir: C:\Program Files\LLVM\bin $ cmake -S llvm -B Build -G Ninja -DLLVM_USE_SANITIZER=Address -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded -DCMAKE_BUILD_TYPE=Release $ cd Build $ ninja all ```
-
Michael Buch authored
-
Martin Storsjö authored
Whenever linking with -nodefaultlibs for a MinGW target, we manually need to specify a bunch of libraries - listed in ${MINGW_LIBRARIES}; the same is already done for sanitizers and libunwind/libcxxabi/libcxx. Practically speaking, linking with -nodefaultlibs but manually passing the libraries in ${MINGW_LIBRARIES} restores most of the libraries that are linked by default, except for the potential compiler builtins and unwind library; i.e. it has essentially the same effect as linking with "--unwindlib=none -rtlib=none", except that -rtlib doesn't accept such a value. When building only compiler-rt/lib/builtins, not all of compiler-rt, ${MINGW_LIBRARIES} is unset - set it manually here for that case. This matches what is set in compiler-rt/cmake/config-ix.cmake, except that the builtins (libgcc or compiler-rt builtins) is omitted; the only use within lib/buitlins is for the standalone libatomic, which explicitly already links against the just-built builtins. -
Mehdi Amini authored
Fixes #74611
-
Harald van Dijk authored
`llvm/test/CodeGen/RISCV/llvm.frexp.ll` and `llvm/test/CodeGen/X86/llvm.frexp.ll` contain a number of disabled tests for unimplemented functionality. This implements one missing part of it.
-
DonatNagyE authored
...that is causing the bug report when it's converted to the enum type. This commit only improves the diagnostics and does not affect the set of reports.
-
Tom Eccles authored
The implementation of these are modeled after the existing fastmath flags for floating point arithmetic.
-
Simon Pilgrim authored
If the target can generate a specific fp immediate constant, then don't split the store into 2 x i32 stores Another cleanup step for #74304
-
Jay Foad authored
-
Jay Foad authored
In GFX12 the exp instruction is renamed to export, but exp is still accepted as an alias. Co-authored-by:Mateja Marjanovic <mateja.marjanovic@amd.com>
-
Matt Arsenault authored
I don't believe this makes any practical difference. Fixes #64013
-
Nikita Popov authored
AST checks aliasing with MustAlias sets by only checking the representative pointer (getSomePointer). This is only correct if the Size and AATags information of that pointer also includes the Size/AATags of all other pointers in the set. When we add a new pointer to the AliasSet, we do perform this update (see the code in AliasSet::addPointer). However, if a pointer already in the MustAlias set is used with a new size, we currently do not update the representative pointer, resulting in miscompilations. Fix this by adding the missing update. This is a targeted fix using the current representation. There are a couple of alternatives: * For MustAlias sets, don't store per-pointer Size/AATags at all. This would make it clear that there is only one set of common Size/AATags for all pointers. * Check against all pointers in the set even for MustAlias. This is what https://github.com/llvm/llvm-project/pull/65731 proposes to do as part of a larger change to AST representation. Fixes https://github.com/llvm/llvm-project/issues/64897.
-