Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LLVM lowering for cmpxchg might use different alignment from OG #1275

Open
bcardosolopes opened this issue Jan 9, 2025 · 1 comment
Open
Labels
good first issue Good for newcomers IR difference A difference in ClangIR-generated LLVM IR that could complicate reusing original CodeGen tests

Comments

@bcardosolopes
Copy link
Member

cmpxchg OG codegen gets 8 bytes versus 4 bytes through CIR, see https://godbolt.org/z/TbM8ToPWc

// Through CIR
%14 = cmpxchg weak ptr %9, i32 %12, i32 %13 seq_cst seq_cst, align 4

vs

// Traditional LLVM codegen
%14 = cmpxchg weak ptr %9, i32 %12, i32 %13 seq_cst seq_cst, align 8
@bcardosolopes bcardosolopes added good first issue Good for newcomers IR difference A difference in ClangIR-generated LLVM IR that could complicate reusing original CodeGen tests labels Jan 9, 2025
@moar55
Copy link

moar55 commented Jan 9, 2025

I would like to take this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers IR difference A difference in ClangIR-generated LLVM IR that could complicate reusing original CodeGen tests
Projects
None yet
Development

No branches or pull requests

2 participants