Skip to content

LangRef llvm.expect / llvm.expect.with.probability clarification. #154570

@Chobbes

Description

@Chobbes

In the LangRef both of these intrinsics have return values:

https://llvm.org/docs/LangRef.html#llvm-expect-intrinsic
https://llvm.org/docs/LangRef.html#llvm-expect-with-probability-intrinsic

I'm a little unclear about what these intrinsics are supposed to return.

The documentation for both of these intrinsics says:

This intrinsic is lowered to the val.

val is the first argument to both of these intrinsics, so am I correct in assuming that both of these intrinsics just return their first value?

Thanks!

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