Confusion: dyn_cast for intrinsic function

Hi,
Following is my piece of code:

Instruction * ins = /* something */;
CallInst * callInst = NULL;
if(callInst = dyn_cast(ins)) {
// non-related code omitted
}

What the code try to do is interpreting LLVM IR and do some operation.
dyn_cast returns the expected pointer to CallInst for function calling instruction like strcpy.
However, it returns NULL when the instruction calls memset, memcpy or memmove.
I know LLVM has its own intrinsic for memmove, memset and memcpy, in format like, llvm.memcpy.*.

My question is: doesn`t dyn_cast works for calling instructions for memmove, memset? Or should I
invoke some other API in LLVM to obtain a pointer to CallInst type?

Thanks,
Yongchao

IntrinsicInst is a subclass of CallInst, so your code should work just fine on intrinsics. It would be helpful if you can upload your (reduced) IR.