Skip to content

Get a CGM.getIntrinsic-like for LLVMIntrinsicCallOp #1692

Open
@bcardosolopes

Description

@bcardosolopes

Not for this PR, but something to note here: in OG CGM.getIntrinsic seems to be able to figure out the type of the intrinsic, we should do the same in CIR to make writing these easier:

  case X86::BI__builtin_ia32_rdtscp: {
    Value *Call = Builder.CreateCall(CGM.getIntrinsic(Intrinsic::x86_rdtscp));
    Builder.CreateDefaultAlignedStore(Builder.CreateExtractValue(Call, 1),
                                      Ops[0]);
    return Builder.CreateExtractValue(Call, 0);
  }

Originally posted by @bcardosolopes in #1686 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions