If you write down one call to getXY()getXY() in your code, and I read your code, then I know what happens: There is one call to getXY()getXY(), and if the result is either xx or yy then DoSomething()DoSomething() gets called.
If you write down two calls to getXY()getXY() in your code, and I read your code, then things are more complicated: There is one call to getXY()getXY() first. If the result is xx, then DoSomething()DoSomething() gets called. Otherwise, there is another call to getXY()getXY(), and if the result is yy, then DoSomething()DoSomething() gets called.
Now without reading the source code for getXY()getXY(), I don't know if calling getXY()getXY() twice has any side effects. For example, getXY()getXY() might increment a static variable and return it. In that case, I can't swap the order of the comparisons with xx and yy. Or xx or yy might be a static variable, and calling getXY()getXY() increases it. It has nothing to do with efficiency, but with code complexity. If one call is enough, use one call.