Swim speed for those without an actual Swim Speed is calculated at 2:1 if not in difficult terrain. If you have multiple movement speeds, such as the Pegasus with a 60 walk/90 fly - what is their swim speed? Is it 30 or is it 45?
A pegasus would get 45 feet of swimming movement
Movement not speed
There is no way to calculate the swim speed (as asked in the question) for a creature without one. You can however, calculate how far the creature would be able to move while swimming using other (non-swim) speeds.
Creatures can swim using any speed they have
The rules for swimming and climbing say:
While climbing or swimming, each foot of movement costs 1 extra foot (2 extra feet in difficult terrain), unless a creature has a climbing or swimming speed. (PHB p. 182)
Note that no speed is specified. In fact, only movement matters at all, not speed. Since you can turn any of your speeds into movement, there is no reason why you would be forced to use one speed over another. Thus, you can use any speed to swim.
This has been confirmed by Jeremy Crawford:
The rule on swimming doesn't specify that you're using your walking speed. You use whatever speed you can to paddle, kick, and otherwise swim.
Since you can use any speeds you have, you can of course use your fly speed. Swimming with a fly speed of 90 would allow you to move 45 feet swimming.