LLVM Verifier error out when there's NoAlias on ptr type

Why is LLVM error out if adding noalias for ptr argument? I found that noalias was defined as incompatible with pointer type in Attributor.cpp but I’m curious about the rational. (https://github.com/llvm/llvm-project/blob/main/llvm/lib/IR/Attributes.cpp#L1958)

Code generated from my compiler frontend:

define hidden i32 @fib_(ptr noalias %n)

Error message:

Attribute 'noalias' applied to incompatible type!
ptr @fib_
LLVM ERROR: Broken module found, compilation aborted!

No, it is incompatible with non-ptr types.

This is not all of the code. Are you sure there is not a second no alias that causes the issue?

You’re right, I think there’s some issue in my codegen. Thanks for your quick reply!