[HLSL] Remove variables that are used only in assert (#107299)
Changes the assert to test the same condition without using the
variables.
This change is done in response to a comment
[here](https://github.com/llvm/llvm-project/pull/106657#issuecomment-2327493439).