Lint callish MachOps in Cmm lint, and add type annotations to AtomicFetch_cmm.cmm
There were missing type annotations for literals in AtomicFetch_cmm.cmm
, which lead the LLVM backend to confusion. It assumed the literals were 64 bits wide, which made us emit invalid LLVM, for example:
error: atomicrmw value and pointer type do not match
%ln1R = atomicrmw add i16* %ln1Q, i64 %ln1P seq_cst
This MR fixes the test, but also adds a new check to Cmm lint to ensure we catch such invalid Cmm at the source.
Edited by sheaf