[PATCH] D13417: [MachineCombiner] make slack optional in critical path cost calculation (PR25016)

Gerolf Hoflehner via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 21 20:39:35 PDT 2015


Gerolf added a comment.

That is still the same test case and the outcome should be independent of compiler revisions.  W/o reassoc the fill after the last call is not removed, but you get more ILP out of the 3 vadds. W reassoc there is no fill, but less ILP. You can’t get both higher ILP *and* a correct program, since in your proposed faster sequence xmm1 would not be initialized:

vaddsd  16(%rsp), %xmm1, %xmm1     <--- c + d
 vaddsd  (%rsp), %xmm0, %xmm0       <--- a + b              [independent]
 vaddsd  %xmm0, %xmm1, %xmm0        <--- (a + b) + (c + d)

What value do you expect in xmm1 in the first vaddsd?

-Gerolf


http://reviews.llvm.org/D13417





More information about the llvm-commits mailing list