@pkhuong GCC even has an IR for this specific thing, called exact divide. It is used for pointer subtraction.