This is a very tough problem. Diabetes is rampent in my family and I have been unable to tolerate sugar for 20 years now without getting dizzy spells even though I am not yet "officially" diabetic.
The trouble with IBS is that insoluble fibre (unrefined fibre like whole wheat bread or brown rice) can trigger IBS attacks. Soluble fibre (refined foods like white bread and white rice) are usually fine for IBS, but they are very bad for diabetics because of the high sugar content in refined foods
I think this is something you would need to consult a doctor on. You obviously can't eat a food that shoots your blood sugar too high, but, on the other hand, you can't eat a food that's good for your blood sugar but triggers painful IBS attacks. This is such a terrible dilemma.
You might have to stay away from refined foods and work with the IBS safe foods that remain. Or maybe you might need to increase your diabetes medication (if you are taking medication) to cope with the extra sugar.
As I say, this is a very difficult dilemma. I'm hoping I won't be facing the same situation myself one day. My heart goes out to you.