The compiler analyzed it, optimized it, and emitted precisely the machine instructions you expected. Same input, same output.
See the table, sourced from Microsoft, at the end of this post for errors that can be returned by a DXGI function. The solutions offered in this post apply to any of ...