prevent frontend from emitting i64

Is there a way to make clang create an IR file that doesn’t use 64 bit integers? My C code doesn’t use any 64bit types but still “clang –c –emit-llvm …” emits code that contains i64’s.


LLVM contains some optimization pass that will generate instructions operate on i64 or even i128 and more. The upstream backend utilize the legalize stage that can break it into instructions with smaller integer types if the target machine does not support that large integer type. There seems no way to prevent clang generate i64 instruction. Are you developing a new backend?