This question is basically: can a new use for a known substance be patented?
The answer depends on whether the claim to the new use is novel and non-obvious (as with all patent claims). In the example case, I can see three types of claims which might be used.
A giraffe food product comprising the known dog food.
This is not novel, since the known dog food ...
The overall field is called patent analytics. Academics do quite a bit of it. One site that has some useful tools is see-the-forest. I am including a chart I just made there. Unfortunately to get really useful data you need to be a paid user.