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
This is the same issue reported at https://github.com/dotnet/source-build/issues/4902, right?
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).
(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.
> 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.
(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.
This should be fixed now that clang-20 has landed in Fedora, so I think we can close this issue.