InstCombine: Stop applying nofpclass from use nofpclass attribute
Functionally reverts a80d4329ce96856a02bd279c800c3d08619da4c9, with new test.
This should be applied somewhere, but this is the wrong place.
Fixes regression reported after #182444
[WebAseembly] Fix -Wunused-variable in #181755
This variable ends up being unused in builds without assertions. Mark it
[[maybe_unused]] per the coding standards.
[BOLT][AArch64] Add a unittest for compare-and-branch inversion. (#181177)
Checks that isReversibleBranch() returns false
- when the immediate value is 63 and needs +1 adjustment
- when the immediate value is 0 and needs -1 adjustment
Checks that reverseBranchCondition() adjusts
- the opcode
- the immediate operand if necessary (+/-1)
- the register operands if necessary (swap)
[mlir][cf] Fix crash in simplifyBrToBlockWithSinglePred when branch operand is a block argument of its successor (#183797)
When `simplifyBrToBlockWithSinglePred` merges a block into its sole
predecessor, it calls `inlineBlockBefore` which replaces each block
argument with the corresponding value passed by the branch. If one of
those values is itself a block argument of the successor block, the call
`replaceAllUsesWith(arg, arg)` is a no-op. Any uses of that argument
outside the block (e.g. in a downstream block) are therefore not
replaced, and when the successor block is erased the argument is
destroyed while those uses are still live, triggering the assertion
`use_empty() && "Cannot destroy a value that still has uses\!"` in
`IRObjectWithUseList::~IRObjectWithUseList`.
Guard against this by returning early when any branch operand is a block
argument owned by the destination block.
Fixes #126213
[clang][modulemap] Lazily load module maps by header name (#181916)
After header search has found a header it looks for module maps that
cover that header. This patch uses the parsed representation of module
maps to do this search instead of relying on FileEntryRef lookups after
stating headers in module maps.
This behavior is currently gated behind the
`-fmodules-lazy-load-module-maps` `-cc1` flag.
[clang] fix crash when casting a parenthesized unresolved template-id (#183633)
this fix uses ignoreparens() in checkplaceholderexpr to prevent a crash
when an unresolved template-id is wrapped in parentheses. fixes #183505
Revert "[Metal][HLSL] Add support for dumping reflection" (#183818)
Reverts llvm/llvm-project#181258
`env PATH=""` will prevent finding any binary run by `env`.
[ASan] Document limitations of container overflow checks (#183590)
Mention that partially poisoning stack objects can
lead to false positives and negatives.
See #182720.
---------
Co-authored-by: Saleem Abdulrasool <compnerd at compnerd.org>
[clang] Backport: fix transformation of substituted constant template parameters of partial specializations
This fixes a helper so it implements retrieval of the argument replaced
for a template parameter for partial spcializations.
This was left out of the original patch, since it's quite hard to actually test.
This helper implements the retrieval for variable templates, but only for
completeness sake, as no current users rely on this, and I don't think a similar
test case is possible to implement with variable templates.
This fixes a regression introduced in #161029 which will be backported to llvm-22,
so there are no release notes.
Backport from #183348
Fixes #181062
Fixes #181410
[clang] Backport: allow canonicalizing assumed template names
Assumed template names are part of error recovery and encode just a
declaration name, making them always canonical. This patch allows
them to be canonicalized, which is trivial.
Backport from #183222
Fixes #183075
[clang] Backport: NestedNameSpecifier typo correction fix
This stops typo correction from considering template parameters
as candidates for a NestedNameSpecifier when it has a prefix itself.
I think this is better than the alternative of accepting these candidates,
but otherwise droping the prefix, because it seems more far-fetched that
someone would actually try to refer to a template parameter this way.
Since this regression was never released, there are no release notes.
Backport from #181239
Fixes #167120
[clang] Backport: stop error recovery in SFINAE for narrowing in converted constant expressions
A narrowing conversion in a converted constant expression should produce an
invalid expression so that [temp.deduct.general]p7 is satisfied, by stopping
substitution at this point.
Fixes #167709
[AMDGPU] Handle GFX1250 hazards between WMMA and VOPD (#183573)
Hazards between WMMA and VALU were handled in #149865 but this only
worked for regular VOP* VALU encodings, not for VOPD.
Fixes: #183546
[clang] create local instantiation scope for matching template template parameters
This fixes a bug where a partial substitution from the enclosing scope
is used to prepopulate an unrelated template argument deduction.
Backport from #183219
Fixes #181166
[alpha.webkit.NoDeleteChecker] Check if each field is trivially destructive (#183711)
This PR fixes the bug that NoDeleteChecker and trivial function analysis
were not detecting any non-trivial destruction of class member
variables.
When evaluating a delete expression or calling a destructor directly for
triviality, check if each field in the class and its base classes is
trivially destructive.
[libc][math] Refactor bf16sub family to header-only (#182115)
Refactors the bf16sub math family to be header-only.
Closes https://github.com/llvm/llvm-project/issues/182114
Target Functions:
- bf16sub
- bf16subf
- bf16subf128
[clang] stop error recovery in SFINAE for narrowing in converted constant expressions (#183614)
A narrowing conversion in a converted constant expression should produce
an invalid expression so that [temp.deduct.general]p7 is satisfied, by
stopping substitution at this point.
This regression was introduced in #164703, and this will be backported
to clang-22, so no release notes.
Fixes #167709
[flang] Fix explanatory messages for generic resolution error (#183565)
The compiler emits messages to explain why each of a generic procedure's
specific procedures is not a match for a given set of actual arguments.
In the case of specific procedures with PASS arguments in derived type
procedure bindings or procedure components, these explanatory messages
are often bogus, because the re-analysis didn't adjust the actual
arguments to account for the PASS argument. Fix.
[Driver][SYCL] Add tests for -Xarch_<arch> option forwarding to SYCL JIT compilation. (#178025)
This change adds test coverage to verify that options passed via
`-Xarch_<arch> <option>` are correctly forwarded to SYCL JIT
compilations.
[clang-format] Fix SpaceBeforeParens with explicit template instantiations (#183183)
This fixes explicit template instantiated functions not having spaces
added/removed based on the value of `SpaceBeforeParens`.
Attribution Note - I have been authorized to contribute this change on
behalf of my company: ArenaNet LLC