I don&#x27;t see how signed overflow is hard: whenever you see a signed arithmetic operation you just emit, e.g., `add_i32(a, b)` instead of `a + b`, and then include definitions of those functions for each signed integer type (all 4 of them) which are 1-4 lines long.<p>Strict aliasing and pointer rules, on the other hand, definitely are hard if you want to produce truly standard C code: you have to completely bypass C&#x27;s type system, using `char *` or `uintptr_t` for everything, and while this can be done, the resulting code is likely to look pretty ugly.  However, a reasonable alternative is to depend on nonstandard annotations to disable TBAA: `__attribute__((may_alias))` for every popular compiler other than MSVC, which I believe doesn&#x27;t do TBAA at all.  (If MSVC ever adds it, the generated C code would need updating, but that&#x27;s not the end of the world.)<p>As for MIR - while I said AST, I suspect it would be fine to do it on MIR, at the cost of having to reconstruct some control flow.  The biggest problem with doing it on LLVM IR is the simplified type info, while the full info is still there for MIR, right?  Not an expert.  Anyway, it&#x27;s just an idea.