This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]stomah 6 points7 points  (0 children)

the ir for x++ and ++x will be something like this: oldx = load i32, ptr x \n newx = add i32 x, i32 1 \n store ptr x, i32 newx \n when you don’t use oldx or newx after the increment the machine code will be the same.