[SPIRV] add pre legalization instruction combine (#122839)

- Add the boilerplate to support instcombine in SPIRV
- instcombine length(X-Y) to distance(X,Y)
- switch HLSL's distance intrinsic to not special case for SPIRV.
- fixes #122766
- This RFC we were requested to add in the infra for pattern matching:
https://discourse.llvm.org/t/rfc-add-targetbuiltins-for-spirv-to-support-hlsl/83329/13

GitOrigin-RevId: eddeb36cf1ced0e14e17ac90f60922366e382100
10 files changed