Canon EF-S 10-22 vs. EF-M 11-22

Which lens is optically better? Reason I'm asking is now that the EOS M body can be had for so cheap and the 11-22 is smaller, cheaper, and has IS, is it worth it just get the EOS M + 11-22 combo as opposed to picking up a 10-22 for my T4i/650D?