Unless you have a particular reason for wanting to go via Bristol and Bath, that doesn't look like an attractive option.
After crossing the Severn Bridge, if you keep the motorway (M48 initially, then M4) on your right, you can quickly be up into the Cotswolds. I think the main road from Chipping Sodbury is probably the easiest ascent, but that means passing through Yate. There are other options but they'll mean a stiffer climb.
Once into the Cotswolds the countryside opens up and there are many excellent roads which will take you where you want to go. You can pass Swindon either to the north or south. My preference would be to bend round to the north, aiming for the village of Ashbury, from where you can ride the full length of the Lambourn valley to Newbury - a personal favourite.
Alternatively, after the climb out of Chipping Sodbury you could head for Chippenham via Castle Combe and pick up the A4 from there. During the 1980s I used to ride along the A4 a lot. Much of it is so wide that bikes and motor vehicles barely trouble each other, and with the M4 running in parallel it was never too busy. I doubt it's physically changed, but maybe the traffic's heavier nowadays. A lot of the A4 is very pretty, especially between Calne and Hungerford, and there's just one stiff climb, immediately after Marlborough.
Beyond Newbury any knowledge I may once have had will be totally out of date.