Skip to content

Conversation

@shrikardongre
Copy link
Contributor

No description provided.

@github-actions
Copy link

github-actions bot commented Mar 23, 2025

✅ With the latest revision this PR passed the C/C++ code formatter.

@shrikardongre
Copy link
Contributor Author

shrikardongre commented Mar 24, 2025

@bcardosolopes @FantasqueX can you please review this PR as I am getting the test fails due to the filecheck issue , Can you help me understand how exactly i have to modify the rdtsc test case . The CIR that I am able to generate is :

  cir.func no_proto @test_rdtsc() -> !s32i extra(#fn_attr) {
    %0 = cir.alloca !s32i, !cir.ptr<!s32i>, ["__retval"] {alignment = 4 : i64} loc(#loc23)
    %1 = cir.get_global @_rdtsc : !cir.ptr<!cir.func<(...) -> !s32i>> loc(#loc35)
    %2 = cir.cast(bitcast, %1 : !cir.ptr<!cir.func<(...) -> !s32i>>), !cir.ptr<!cir.func<() -> !s32i>> loc(#loc35)
    %3 = cir.call %2() : (!cir.ptr<!cir.func<() -> !s32i>>) -> !s32i loc(#loc24)
    cir.store %3, %0 : !s32i, !cir.ptr<!s32i> loc(#loc36)
    %4 = cir.load %0 : !cir.ptr<!s32i>, !s32i loc(#loc36)
    cir.return %4 : !s32i loc(#loc36)
  } loc(#loc34)

Thank you.

@bcardosolopes
Copy link
Member

how exactly i have to modify the rdtsc test case

if that's causing confusion, perhaps remove it from this PR and land first the other intrinsics?

@shrikardongre
Copy link
Contributor Author

shrikardongre commented Mar 24, 2025

#1523 for BI__rdtsc

@bcardosolopes
Copy link
Member

Please rename the PR to be consistent with the new content

Copy link
Member

@bcardosolopes bcardosolopes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM after changing the title!

@shrikardongre shrikardongre changed the title [CIR][CodeGen] Add support for x86 memory fence and timestamp counter [CIR][CodeGen] Add support for x86 memory fence Mar 25, 2025
@shrikardongre
Copy link
Contributor Author

done 👍🏻

@bcardosolopes bcardosolopes merged commit 6d19a97 into llvm:main Mar 25, 2025
9 checks passed
terapines-osc-cir pushed a commit to Terapines/clangir that referenced this pull request Sep 2, 2025
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.

2 participants