Skip to content

Conversation

@lanza
Copy link
Member

@lanza lanza commented Nov 18, 2025

Stack from ghstack (oldest at bottom):

Handle implicit casts from _Atomic T to T by treating them the
same as NonAtomicToAtomic casts - just visit the subexpression.

This matches the traditional CodeGen approach and enables the
cast infrastructure for C11/C++11 _Atomic types.

Note: Full atomic load/store support remains NYI and will be
addressed in follow-up work. This commit only implements the
cast operation itself.

Test: clang/test/CIR/CodeGen/atomic-type-casts.cpp

[ghstack-poisoned]
lanza added a commit that referenced this pull request Nov 18, 2025
Handle implicit casts from _Atomic T to T by treating them the
same as NonAtomicToAtomic casts - just visit the subexpression.

This matches the traditional CodeGen approach and enables the
cast infrastructure for C11/C++11 _Atomic types.

Note: Full atomic load/store support remains NYI and will be
addressed in follow-up work. This commit only implements the
cast operation itself.

Test: clang/test/CIR/CodeGen/atomic-type-casts.cpp
ghstack-source-id: 84163bb
Pull-Request: #1989
[ghstack-poisoned]
lanza added a commit that referenced this pull request Nov 18, 2025
Handle implicit casts from _Atomic T to T by treating them the
same as NonAtomicToAtomic casts - just visit the subexpression.

This matches the traditional CodeGen approach and enables the
cast infrastructure for C11/C++11 _Atomic types.

Note: Full atomic load/store support remains NYI and will be
addressed in follow-up work. This commit only implements the
cast operation itself.

Test: clang/test/CIR/CodeGen/atomic-type-casts.cpp
ghstack-source-id: b642356
Pull-Request: #1989
[ghstack-poisoned]
lanza added a commit that referenced this pull request Nov 18, 2025
Handle implicit casts from _Atomic T to T by treating them the
same as NonAtomicToAtomic casts - just visit the subexpression.

This matches the traditional CodeGen approach and enables the
cast infrastructure for C11/C++11 _Atomic types.

Note: Full atomic load/store support remains NYI and will be
addressed in follow-up work. This commit only implements the
cast operation itself.

Test: clang/test/CIR/CodeGen/atomic-type-casts.cpp
ghstack-source-id: f250ebe
Pull-Request: #1989
[ghstack-poisoned]
lanza added a commit that referenced this pull request Nov 18, 2025
Handle implicit casts from _Atomic T to T by treating them the
same as NonAtomicToAtomic casts - just visit the subexpression.

This matches the traditional CodeGen approach and enables the
cast infrastructure for C11/C++11 _Atomic types.

Note: Full atomic load/store support remains NYI and will be
addressed in follow-up work. This commit only implements the
cast operation itself.

Test: clang/test/CIR/CodeGen/atomic-type-casts.cpp
ghstack-source-id: 0a3695b
Pull-Request: #1989
[ghstack-poisoned]
lanza added a commit that referenced this pull request Nov 18, 2025
Handle implicit casts from _Atomic T to T by treating them the
same as NonAtomicToAtomic casts - just visit the subexpression.

This matches the traditional CodeGen approach and enables the
cast infrastructure for C11/C++11 _Atomic types.

Note: Full atomic load/store support remains NYI and will be
addressed in follow-up work. This commit only implements the
cast operation itself.

Test: clang/test/CIR/CodeGen/atomic-type-casts.cpp
ghstack-source-id: 861fee0
Pull-Request: #1989
[ghstack-poisoned]
lanza added a commit that referenced this pull request Nov 18, 2025
Handle implicit casts from _Atomic T to T by treating them the
same as NonAtomicToAtomic casts - just visit the subexpression.

This matches the traditional CodeGen approach and enables the
cast infrastructure for C11/C++11 _Atomic types.

Note: Full atomic load/store support remains NYI and will be
addressed in follow-up work. This commit only implements the
cast operation itself.

Test: clang/test/CIR/CodeGen/atomic-type-casts.cpp
ghstack-source-id: a07a388
Pull-Request: #1989
lanza added a commit that referenced this pull request Nov 18, 2025
Handle implicit casts from _Atomic T to T by treating them the
same as NonAtomicToAtomic casts - just visit the subexpression.

This matches the traditional CodeGen approach and enables the
cast infrastructure for C11/C++11 _Atomic types.

Note: Full atomic load/store support remains NYI and will be
addressed in follow-up work. This commit only implements the
cast operation itself.

Test: clang/test/CIR/CodeGen/atomic-type-casts.cpp
ghstack-source-id: a07a388
Pull-Request: #1989
[ghstack-poisoned]
lanza added a commit that referenced this pull request Nov 18, 2025
Handle implicit casts from _Atomic T to T by treating them the
same as NonAtomicToAtomic casts - just visit the subexpression.

This matches the traditional CodeGen approach and enables the
cast infrastructure for C11/C++11 _Atomic types.

Note: Full atomic load/store support remains NYI and will be
addressed in follow-up work. This commit only implements the
cast operation itself.

Test: clang/test/CIR/CodeGen/atomic-type-casts.cpp
ghstack-source-id: 9e8d538
Pull-Request: #1989
[ghstack-poisoned]
lanza added a commit that referenced this pull request Nov 18, 2025
Handle implicit casts from _Atomic T to T by treating them the
same as NonAtomicToAtomic casts - just visit the subexpression.

This matches the traditional CodeGen approach and enables the
cast infrastructure for C11/C++11 _Atomic types.

Note: Full atomic load/store support remains NYI and will be
addressed in follow-up work. This commit only implements the
cast operation itself.

Test: clang/test/CIR/CodeGen/atomic-type-casts.cpp
ghstack-source-id: 99fc577
Pull-Request: #1989
[ghstack-poisoned]
lanza added a commit that referenced this pull request Nov 18, 2025
Handle implicit casts from _Atomic T to T by treating them the
same as NonAtomicToAtomic casts - just visit the subexpression.

This matches the traditional CodeGen approach and enables the
cast infrastructure for C11/C++11 _Atomic types.

Note: Full atomic load/store support remains NYI and will be
addressed in follow-up work. This commit only implements the
cast operation itself.

Test: clang/test/CIR/CodeGen/atomic-type-casts.cpp
ghstack-source-id: 7c9efcf
Pull-Request: #1989
@bcardosolopes
Copy link
Member

Same nits from other PR: LLVM and OGCG missing in the testcase

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.

3 participants