https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70184
--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> --- With TER we delay expanding of (unsigned b) until you require its expansion during asm op expansion (and thus may be interleaved with asm expansion code). I believe we had this issue in the past for other archs and libcalls. Don't remember what the solution there was though ;) IIRC it was libcalls expanded during libcall expansion or so like for a + (b * c) and both + and * resulting in a libcall.