Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
cmd/compile: optimize loop invariant #24324
The following code
is compiled to
However the sub expression a*b (MUL R0, R3, R5) is a loop invariant, which should be calculated outside, not be calculated for 8 times.