[pull] main from llvm:main#1421
Merged
Merged
Conversation
…98185) Noticed while working on cleaning up VECREDUCE_ADD handling
The AArch64 backend was silently ignoring inline assembly clobbers when
numeric register names (x29, x30) were used instead of their
architectural aliases (fp, lr). I found this bug via inline assembly
in Zig, which not normalize the register names the way clang does.
There is an incoplete workaround for this in Rust, but that only
handles `x30/lr`, not `x29/fp`. I thought it would make
sense to fix this properly rather than adding a workaround to Zig.
This patch adds explicit handling in getRegForInlineAsmConstraint() to
map both numeric and alias forms to the correct physical registers,
following the same pattern used by the RISC-V backend.
I've left `x31/sp` without changes, it would nice to have to have
warning when trying to clobber `x31`, just like there is for `sp`,
but that register needs different handling, so it's best done
separately.
If you have code like this:
define void @clobber_x30() nounwind {
tail call void asm sideeffect "nop", "~{x30}"()
ret void
}
Here is the generated assembly before:
clobber_x30: // @clobber_x30
//APP
nop
//NO_APP
ret
And after:
clobber_x30: // @clobber_x30
str x30, [sp, #-16]! // 8-byte Folded Spill
//APP
nop
//NO_APP
ldr x30, [sp], #16 // 8-byte Folded Reload
ret
…198164) When switching `clang++` to the default Solaris 11.4 compilation environment, XPG7 + extensions, two tests `FAIL`: ``` AddressSanitizer-i386-sunos :: TestCases/Posix/coverage-module-unloaded.cpp AddressSanitizer-i386-sunos-dynamic :: TestCases/Posix/coverage-module-unloaded.cpp SanitizerCommon-asan-i386-SunOS :: get_module_and_offset_for_pc.cpp SanitizerCommon-ubsan-i386-SunOS :: get_module_and_offset_for_pc.cpp SanitizerCommon-ubsan-x86_64-SunOS :: get_module_and_offset_for_pc.cpp ``` The failure mode is the same in both cases: the tests fail to link with `main` undefined. This happens because `<sys/mman.h>` defines ``` #define SHARED 0x10 ``` for the benefit of the Solaris-specific `memcntl(2)`. This was previously hidden since `clang++` defined `_XOPEN_SOURCE=600`. This interferes with the use of `SHARED` in the tests. While I'm the first to admit that such a generic identifier is highly unfortunate, this is also true for the tests. The interface goes all the way back to Solaris 1.0/SunOS 4, thus isn't going to change. This patch fixes this by following the lead of other tests that use `SHARED_LIB` instead of `SHARED` for this purpose. Tested on `amd64-pc-solaris2.11` and `sparcv9-sun-solaris2.11`.
…ion (#198158) When switching `clang++` to the default Solaris 11.4 compilation environment, XPG7 + extensions, `sanitizer_platform_limits_solaris.cpp` fails to compile: ``` compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_solaris.cpp:93:53: error: use of undeclared identifier 'ucontext_t'; did you mean 'ucontext_t_sz'? 93 | unsigned ucontext_t_sz(void *ctx) { return sizeof(ucontext_t); } | ^~~~~~~~~~ | ucontext_t_sz compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_solaris.cpp:93:12: note: 'ucontext_t_sz' declared here 93 | unsigned ucontext_t_sz(void *ctx) { return sizeof(ucontext_t); } | ^ compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_solaris.cpp:93:52: error: invalid application of 'sizeof' to a function type 93 | unsigned ucontext_t_sz(void *ctx) { return sizeof(ucontext_t); } | ^~~~~~~~~~~~ ``` Previously, `<sys/signal.h>` would include `<sys/ucontext.h>` due to a XPG4v2 requirement. Now the latter needs to be included directly. Tested on `amd64-pc-solaris2.11` and `sparcv9-sun-solaris2.11`.
…e ops (#198178) if it is know that `trunc nuw to i1 ` can not be poison logical and/or can be folded to bitwise ops. proof https://alive2.llvm.org/ce/z/xQ2Sj-
Now that VP metadata has been cleaned up a little bit, we can reenable this assertion. Reviewers: alexander-shaposhnikov, mtrofin Pull Request: #198141
#198203) Extract the repeated edge-redirect + DomTree update pattern into a RedirectEdge lambda, and convert the separate removeIncomingValue calls for check blocks into a loop.
#198210) Use ResumeForEpilogue to look up the vector trip count instead of plain IR lookup. Also prepares for non-phi resume values.
…riate flags/pragmas (#187860) Fixes #128239 The implementation adds warnings for floating-point exception function calls (fenv.h) made without enabling floating-point exception behavior via `-ffp-exception-behavior=maytrap/strict` or `#pragma STDC FENV_ACCESS ON`. To support recognition of all fenv.h builtins, `fexcept_t` and `fenv_t` were added as builtin types.
Add test cases showing functional change for #194729.
Use Param.Threads (number of worker threads) as barrier threshold instead of Param.UniqueThreads (boolean that controls input generation). This also silences [-Wbool-integral-comparison](#194180) warning I'm working on.
This commit fixes `misc-static-initialization-cycle` crashing on `catch (...)`. Catch-all handlers have no exception declaration, so traversal of `CXXCatchStmt` can call `TraverseDecl(nullptr)`. The check previously passed that null pointer to `DeclContext::containsDecl`. This commit fixes the problem by adding a null guard. Closes #198150
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )