[libc][GPU] Enable scalbn/ldexp, rand, remainder for SPIR-V (#242212)
This PR is a follow up of
https://github.com/llvm/llvm-project/pull/236324 to fix more build
issues for SPIR-V compiler-rt builtin tests. "Undefined symbols" from
libc and libm still lead to a bunch of build failures such as rand,
srand, scalbn/f, remainder/f. Before the fix, building results:
Total Discovered Tests: 275
Unsupported: 125 (45.45%)
Passed : 128 (46.55%)
Failed : 22 (8.00%)
After the fix:
Total Discovered Tests: 275
Unsupported: 125 (45.45%)
Passed : 136 (49.45%)
Failed : 14 (5.09%)
8 more tests can build pass now.
All of the enabled functions are simple without RPC mechanism. For
srand, rand, scalbn and scalbnf, the exact same implementations have
been used in downstream compiler for SYCL and OpenMP offloading on Intel
GPU for years covering both Linux and Windows. The remainder/f aligns
with AMD and NV approach to use generic version and also verified on
Intel GPU + L0 for both Linux and Windows.
Signed-off-by: jinge90 <ge.jin@intel.com>