Any significant weight loss (~10% of your body weight; so if you're 150 pounds, anything more than 10-15 pounds, as an example) should be investigated by your physician. It might turn out to be something benign, but it's a "red flag" sign. IBS can cause weight loss in some people simply because people get nervous about
eating, since that will tend to hasten trips to the bathroom. So people don't eat as much (either consciously or unconsciously) and they lose weight. Either way, a food diary, complete with your total caloric intake recorded on there, might be helpful for your doctor. Hope that helps.