Bug 2346439 - DotNet9.0 fails to build with clang-20 on ppc64le
Summary: DotNet9.0 fails to build with clang-20 on ppc64le
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: clang
Version: rawhide
Hardware: ppc64le
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Tom Stellard
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2025-02-19 01:55 UTC by Tom Stellard
Modified: 2025-03-21 23:13 UTC (History)
15 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2025-03-21 23:13:35 UTC
Type: ---
Embargoed:
tstellar: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github llvm llvm-project pull 111553 0 None Merged [NFC][PowerPC] Use tablegen's MatchRegisterName() 2025-02-19 04:39:39 UTC
Red Hat Issue Tracker FC-1489 0 None None None 2025-02-19 02:00:35 UTC

Description Tom Stellard 2025-02-19 01:55:00 UTC
This was a regression from clang-19 to clang-20 introduced by this upstream PR: https://github.com/llvm/llvm-project/pull/111553 (More details in the PR comments).

I think we should consider reverting this patch in our clang-20 builds if it's not fixed upstream before the clang-20 upstream release.


Reproducible: Always

Comment 1 Omair Majid 2025-02-20 00:03:42 UTC
This is the same issue reported at https://github.com/dotnet/source-build/issues/4902, right?

Comment 2 Nikita Popov 2025-02-20 08:17:01 UTC
Yes, it's the same issue. Ideally this would be fixed *both* in LLVM and DotNot. LLVM should accept it, but at the same time this is clearly just a typo in the DotNot assembly (it's one use of %R3 in a long list of %r3's).

Comment 3 Tulio Magno Quites Machado Filho 2025-02-20 12:55:37 UTC
(In reply to Nikita Popov from comment #2)
> Ideally this would be fixed *both* in LLVM and DotNot.

Nikita, why is it ideal to change DotNet too?
This code is valid in other assemblers.
I have the impression the change of behavior was unintentional.

Comment 4 Nikita Popov 2025-02-20 13:17:23 UTC
> Nikita, why is it ideal to change DotNet too?

See https://github.com/dotnet/runtime/blob/da4f0a33ecec67908327138bfa0f153c3821fa78/src/coreclr/pal/src/arch/ppc64le/context2.S#L140.

There is one use of %R3 among ~150 uses of %r3. It's a typo, not an intentional style choice.

Comment 5 Tulio Magno Quites Machado Filho 2025-02-20 13:28:53 UTC
(In reply to Nikita Popov from comment #4)
> There is one use of %R3 among ~150 uses of %r3. It's a typo, not an
> intentional style choice.

It may break DotNet's coding style, but this is still valid code AFAIK.
Projects with a coding style where GPRs are higher case are also valid.
LLVM is missing a test to guarantee this regression won't happen again.

Comment 6 Tom Stellard 2025-03-17 20:29:33 UTC
This should be fixed now that clang-20 has landed in Fedora, so I think we can close this issue.


Note You need to log in before you can comment on or make changes to this bug.