Loop optimization

I am kind of new to pytorch. If I have a loop like following:
steps = 10
for i in range(steps):
c = torch.mm(a, b) # this line is indented
results = c

How many torch.mm will be executed ? 10, or 1 ?
Can pytorch figure out it only need to execute 1 time to get the results ?

The matrix multiplication will be executed 10 times.
I don’t know, if the JIT would have the ability to remove redundant operations.