Skip to content

Conversation

@z1-cciauto
Copy link
Collaborator

No description provided.

nga888 and others added 30 commits October 29, 2025 10:35
Fix manifest `trustInfo` to use the `urn:schemas-microsoft-com:asm.v3`
namespace.

Fixes llvm#120394.
Occasionally this test fails in CI. There are two possible races that
can occur, one of which is rare. Both are supposed to be handled, but
because the test matches "read-only" and the runtime outputs "Read-only"
(note the capital letter), the FileCheck fails.

This patch fixes the miscapitalisation of the FileCheck string in the
test.

rdar://163398219
…ported (llvm#165410)

This test is currently failing on some macOS CI nodes due to an issue
with the system symbolizer.

This patch marks this test unsupported while we wait for all CI nodes to
be updated to a newer OS.

rdar://160409885
…htest ABI (llvm#113152)

Most ptrauth flags are ABI-affecting, so usually we do not want them to
be
exposed to end users. Allow them only in the following cases:

- ARM64 Darwin (under certain conditions, some ptrauth driver flags are
  intended to be used in this case);
- pauthtest ABI (it's intended to be used for experimenting with signing
schema
and the signing schema is explicitly encoded in the pauth elf marking).

Leave `-faarch64-jump-table-hardening` available for all AArch64 targets
since it's not ABI-affecting.
)

This commit adds support for the OCP-MX INT8 type. This includes the
following operations: MATMUL_T_BLOCK_SCALED, CAST_FROM_BLOCK_SCALED,
CAST_TO_BLOCK_SCALED and CONST.

The support is added via a custom TOSA type "!tosa.mxint8" due to the
fact it is not yet a builtin type in mlir. This may change in the
future, depending on how this type is used by other frameworks/dialects.
Conversions to/from this type have not yet been implemented for the same
reasoning.

Co-authored-by: Tat Wai Chong <tatwai.chong@arm.com>
…lvm#165256)

Flang also uses non-gtest based unittests, which don't go through the
usual add_unittest() helper. These currently do not use the usual linker
flags for unit tests. This means that in LTO builds, they do not disable
LTO when building unit tests, which increases the build time.
…#165538)

I added some logs to see the difference between C++ mode and C mode and
I see this

In C++ mode
```
clang-repl> struct S1{} s1; s1
[convertExprToValue] original Expr: DeclRefExpr | type: struct S1
[convertExprToValue] Ty: struct S1
[convertExprToValue] DesugaredTy: struct S1
[convertExprToValue] Treating lvalue record as reference (enters block 540)
[convertExprToValue] Ty: struct S1 & (after block 540)
[convertExprToValue] DesugaredTy: struct S1 & (after block 540)
[computeInterfaceKind] Expr class: DeclRefExpr | isLValue: 1
(S1 &) @0x10c9ac058
```
in C mode
```
(base) anutosh491@Anutoshs-MacBook-Air bin % ./clang-repl --Xcc=-xc --Xcc=-std=c23
clang-repl> struct S1{} s1; s1
[convertExprToValue] original Expr: ImplicitCastExpr | type: struct S1
[convertExprToValue] Ty: struct S1
[convertExprToValue] DesugaredTy: struct S1
[convertExprToValue] Ty: struct S1 (after block 540)
[convertExprToValue] DesugaredTy: struct S1 (after block 540)
[computeInterfaceKind] Expr class: ImplicitCastExpr | isLValue: 0
Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
s0  clang-repl               0x0000000103cca03c llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 88
1  clang-repl               0x0000000103cca61c PrintStackTraceSignalHandler(void*) + 28
2  clang-repl               0x0000000103cc7ee8 llvm::sys::RunSignalHandlers() + 152
3  clang-repl               0x0000000103ccbb54 SignalHandler(int, __siginfo*, void*) + 284
4  libsystem_platform.dylib 0x00000001887f4624 _sigtramp + 56
5  clang-repl               0x00000001079bee18 clang::Sema::CheckArgsForPlaceholders(llvm::MutableArrayRef<clang::Expr*>) + 120
6  clang-repl               0x00000001079bee18 clang::Sema::CheckArgsForPlaceholders(llvm::MutableArrayRef<clang::Expr*>) + 120
7  clang-repl               0x0000000107b823dc clang::Sema::BuildCXXNew(clang::SourceRange, bool, clang::SourceLocation, llvm::MutableArrayRef<clang::Expr*>, clang::SourceLocation, clang::SourceRange, clang::QualType, clang::TypeSourceInfo*, std::__1::optional<clang::Expr*>, clang::SourceRange, clang::Expr*) + 5672
8  clang-repl               0x000000010538c560 clang::Interpreter::convertExprToValue(clang::Expr*) + 2580
9  clang-repl               0x0000000105360774 clang::InProcessPrintingASTConsumer::HandleTopLevelDecl(clang::DeclGroupRef) + 252
10 clang-repl               0x000000010536a82c clang::IncrementalParser::ParseOrWrapTopLevelDecl() + 676
11 clang-repl               0x000000010536b554 clang::IncrementalParser::Parse(llvm::StringRef) + 712
12 clang-repl               0x000000010537e6b4 clang::Interpreter::Parse(llvm::StringRef) + 588
13 clang-repl               0x000000010537d73c clang::Interpreter::ParseAndExecute(llvm::StringRef, clang::Value*) + 72
14 clang-repl               0x000000010022db38 main + 3660
15 dyld                     0x000000018841ab98 start + 6076
```

So basically C mode wasn't entering block 540 as expressions like `s1`
(where `s1` is a struct variable) are wrapped in an `ImplicitCastExpr`,
which masks the underlying `DeclRefExpr` that is actually an
`lvalue`.This patch unwraps the implicit cast with E->IgnoreImpCasts()
before checking isLValue(), restoring correct detection of lvalue
structs.
See
llvm#165419 (comment)
for details.

The extra annotation `"; Has predicate info"` does not provide any extra
information and might poison the UTC-generated checks introduced by
llvm#165419.
Fails with:
```
******************** TEST 'LLVM :: DebugInfo/Generic/objc-property.ll' FAILED ********************
Exit Code: 2
Command Output (stdout):
--
RUN: at line 1
ome/llvm/llvm-external-buildbots/workers/aix-ppc64/clang-ppc64-aix/build/bin/llc -filetype=obj -o - /home/llvm/llvm-external-buildbots/workers/aix-ppc64/clang-ppc64-aix/llvm-project/llvm/test/DebugInfo/Generic/objc-property.ll | /home/llvm/llvm-external-buildbots/workers/aix-ppc64/clang-ppc64-aix/build/bin/llvm-dwarfdump --debug-info - | /home/llvm/llvm-external-buildbots/workers/aix-ppc64/clang-ppc64-aix/build/bin/FileCheck /home/llvm/llvm-external-buildbots/workers/aix-ppc64/clang-ppc64-aix/llvm-project/llvm/test/DebugInfo/Generic/objc-property.ll
executed command: /home/llvm/llvm-external-buildbots/workers/aix-ppc64/clang-ppc64-aix/build/bin/llc -filetype=obj -o - /home/llvm/llvm-external-buildbots/workers/aix-ppc64/clang-ppc64-aix/llvm-project/llvm/test/DebugInfo/Generic/objc-property.ll
.---command stderr------------
| Assertion failed: Section && "Cannot switch to a null section!", file  /home/llvm/llvm-external-buildbots/workers/aix-ppc64/clang-ppc64-aix/llvm-project/llvm/lib/MC/MCStreamer.cpp, line 1364, virtual void llvm::MCStreamer::switchSection(MCSection *, uint32_t)()
| PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace and instructions to reproduce the bug.
| Stack dump:
| 0.	Program arguments: /home/llvm/llvm-external-buildbots/workers/aix-ppc64/clang-ppc64-aix/build/bin/llc -filetype=obj -o - /home/llvm/llvm-external-buildbots/workers/aix-ppc64/clang-ppc64-aix/llvm-project/llvm/test/DebugInfo/Generic/objc-property.ll
`-----------------------------
error: command failed with exit status: -6
executed command: /home/llvm/llvm-external-buildbots/workers/aix-ppc64/clang-ppc64-aix/build/bin/llvm-dwarfdump --debug-info -
.---command stderr------------
| error: -: The file was not recognized as a valid object file
`-----------------------------
error: command failed with exit status: 1
executed command: /home/llvm/llvm-external-buildbots/workers/aix-ppc64/clang-ppc64-aix/build/bin/FileCheck /home/llvm/llvm-external-buildbots/workers/aix-ppc64/clang-ppc64-aix/llvm-project/llvm/test/DebugInfo/Generic/objc-property.ll
.---command stderr------------
| FileCheck error: '<stdin>' is empty.
| FileCheck command line:  /home/llvm/llvm-external-buildbots/workers/aix-ppc64/clang-ppc64-aix/build/bin/FileCheck /home/llvm/llvm-external-buildbots/workers/aix-ppc64/clang-ppc64-aix/llvm-project/llvm/test/DebugInfo/Generic/objc-property.ll
`-----------------------------
error: command failed with exit status: 2
```

Presumably due to unsupported debug-info section (see
llvm#71814)
…tence (llvm#154123)

[lldb][DWARFASTParserClang] Added a check for the specialization
existence

While debugging an application with incorrect dwarf information, where
    DW_TAG_template_value_parameter was lost, I found that lldb does not
check that the corresponding specialization exists. As a result, at the
stage when ASTImporter works, the type is completed in such a way that
    it inherits from itself. And during the calculation of layout, an
infinite recursion occurs. To catch this error, I added a corresponding
check
at the stage of restoring the type from dwarf information. I also added
a
trivial assert in clang to check that the class does not inherit from
itself.
…operty constructor (llvm#165421)

Depends on:
* llvm#165401

We weren't testing `DIObjCProperty` roundtripping. So this was never
caught.

The consequence of this is that the `setter:` would have the getter name
and `getter:` would have the setter name.
…vm#165420)

Remove insertion point in rewriteAsPaddedOp. There is no gurantee that
the sizes provided by the user are before the operation to pad. It's
better to let the user handle where to insert the newly created
operations, as long as they are after the origin operation to pad.
Implemented IGNORE_TKR(P), which allows ignoring pointer and allocatable
matching (can pass an allocatable array to routine with pointer array
argument and vice versa). Updated documentation.
This patch enables NEON EOR3 instruction to be emitted even for 64 bit
vectors.
… improve reuse and fix missing AVX2/AVX512 checks (llvm#165552)

-mcpu=x86-64 is still SSE codegen, and there were missing AVX2/AVX512 checks where the common CHECK-AVX prefix clashed

Noticed while reviewing llvm#148897
…te from tests (llvm#165553)

Unnecessary copy+paste inclusion from some other BMI tests
Fixes llvm#165184

In OMPIRBuilder::createAtomicRead() and createAtomicWrite(), the size
parameter for __atomic_load/__atomic_store was incorrectly computed
from the pointer type instead of the pointee (element) type.

On 64-bit systems, this resulted in only 8 bytes being transferred
regardless of the actual struct size.

Changed both functions to use XElemTy (element type) instead of the
pointer type when computing LoadSize. This ensures the full struct
is transferred.
ShiftAmt is already of type int.
Changed the function arguments to take `const Twine&` instead of `const
char*`. This will avoid converting StringRef's to C strings too soon (or
ever).
…ariables (llvm#164442)

This patch adds an option named `AllowThreadLocal` to the
`cppcoreguidelines-avoid-non-const-global-variables` check. When set to
true, the option suppresses warnings generated for non-const global
variables with thread-local storage duration. By default, the option is
set to false.
When an option that is only available in `flang -fc1` is provided to
`flang`, emit a diagnostic with a suggestion containing "did you mean
-Xflang '-foo'".

Partially addresses llvm#163550.
Similar to the m_BinOp/m_c_BinOp matchers, this patch introduces generic matchers for SelectionDAG nodes with three operands.

This includes:
- Adding m_TernaryOp() and m_c_TernaryOp() templates in SDPatternMatch.h.
- Adding comprehensive test coverage in SelectionDAGPatternMatchTest.cpp.

Fixes llvm#165378
…Int types (llvm#164372)

DW_TAG_base_type DIEs are permitted to have both byte_size and bit_size
attributes "If the value of an object of the given type does not fully
occupy the storage described by a byte size attribute"

* Add DataSizeInBits to DIBasicType (`DIBasicType(... dataSize: n ...)` in IR).
* Change Clang to add DataSizeInBits to _BitInt type metadata.
* Change LLVM to add DW_AT_bit_size to base_type DIEs that have non-zero
  DataSizeInBits.

TODO: Do we need to emit DW_AT_data_bit_offset for big endian targets?
See discussion on the PR.

Fixes [llvm#61952](llvm#61952)

---------

Co-authored-by: David Stenberg <david.stenberg@ericsson.com>
Passing -pie to flang will pass the flag on to the linker. Passing
-no-pie will ensure that -pie is *not* passed to the linker. This
behavior is consistent with both clang and gfortran.

Fixes llvm#159970
…fTwo (llvm#165335)

A recent commit 00f5a1e modified simplifySwitchOfPowersOfTwo to
generate a branch to handle the non-power-of-2 case when appropriate,
but does not set a DebugLoc on the new branch instruction; this patch
propagates the switch's DebugLoc to the new branch, as for the other
instructions generated in the same block.

Found using llvm#107279.
All PDB tests now pass when compiled without DIA on Windows, so they
pass with the native reader.

With this PR, the default reader changes to the native reader.
The plan is to eventually remove the DIA reader (see
https://discourse.llvm.org/t/rfc-removing-the-dia-pdb-plugin-from-lldb/87827
and llvm#114906).

For now, DIA can be used by setting `plugin.symbol-file.pdb.reader` to
`dia` or by setting `LLDB_USE_NATIVE_PDB_READER=0` (mostly undocumented,
but used in tests).
For every threadable path `B1 -> B2 -> ... -> Bn`, we need to insert phi
nodes into every unduplicated successor of `Bi` if there are outer uses
of duplicated definitions in `B_i`. To prevent the booming of phi nodes,
this patch adds a threshold for the maximum number of unduplicated
successors that may contain outer uses. This threshold makes sense
especially when multi-target branches like switch/indirectbr/callbr are
duplicated.

Note that the O3 statistics in llvm-test-suite are not influenced.
Prince781 and others added 2 commits October 29, 2025 09:46
…2368)

For an insertelt with a dynamic index, the default handling in
DAGTypeLegalizer and LegalizeDAG will reserve a stack slot for the
vector, lower the insertelt to a store, then load the modified vector
back into temporaries. The vector store and load may be legalized into a
sequence of smaller operations depending on the target.

Let V = the vector size and L = the length of a chain of insertelts with
dynamic indices. In the worse case, this chain will lower to O(VL)
operations, which can increase code size dramatically.

Instead, identify such chains, reserve one stack slot for the vector,
and lower all of the insertelts to stores at once. This requires only
O(V + L) operations. This change only affects the default lowering
behavior.
@z1-cciauto z1-cciauto requested a review from a team October 29, 2025 16:46
@z1-cciauto
Copy link
Collaborator Author

@skganesan008
Copy link
Collaborator

!PSDB

@z1-cciauto
Copy link
Collaborator Author

@ronlieb ronlieb merged commit 9f4fb8d into amd-staging Oct 29, 2025
7 checks passed
@ronlieb ronlieb deleted the upstream_merge_202510291246 branch October 29, 2025 22:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.