Total supports 4 x M.2 slots, 2 x SlimSAS ports and 4 x SATA 6Gb/s ports*
AMD Ryzen™ Threadripper™ PRO 9000 & 7000 WX-Series Processors*
M.2_1 slot (Key M), type 2242/2260/2280/22110 (supports PCIe 5.0 x4 mode)
M.2_2 slot (Key M), type 2242/2260/2280/22110 (supports PCIe 5.0 x4 mode)
M.2_3 slot (Key M), type 2242/2260/2280 (supports PCIe 5.0 x4 mode)
M.2_4 slot (Key M), type 2242/2260/2280 (supports PCIe 5.0 x4 mode)
AMD WRX90 Chipset
2 x SlimSAS slots support PCIe 4.0 x4 mode NVMe device
4 x SATA 6Gb/s ports
Newer gen PCIE devices should always be backward compatible with older gen speeds.
Assuming you meant the SlimSAS connector on the motherboard, the SSD will work at Gen4 speeds at most since that's what the slot is limited to.
If you meant M.2 (Gen5) -> SlimSAS -> SSD, it may/may not work depending on the insertion loss from the cable. SlimSAS is officially rated for 24 Gbps SAS 4.0 and 16GT/s for PCIE Gen4, whereas PCIE Gen5 requires 32GT/s. Even if the M.2 adapter had a retimer, there will probably be significant retransmissions on that cable to cause noticeable performance degradation.
In both cases, the SSD might not even be detectable at lower than Gen5 speeds, if it's particularly sensitive to signal quality. (Samsung PM9A3 is one example which had issues being detected if a Gen3-rated cable was used, but would do so with a Gen4-rated cable)