[PATCH] D13417: [MachineCombiner] make slack optional in critical path cost calculation (PR25016)
Gerolf Hoflehner via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 20 20:05:53 PDT 2015
Gerolf added a comment.
Perhaps there is another change in your tree. We are looking at different code and/or I don’t know how your reference sequence for your test case. With fast-math and reassociation turned off I’m getting:
vmovsd 8(%rsp), %xmm1 # 8-byte Reload
# xmm1 = mem[0],zero
vaddsd 16(%rsp), %xmm1, %xmm1 # 8-byte Folded Reload
vaddsd (%rsp), %xmm0, %xmm0 # 8-byte Folded Reload
vaddsd %xmm0, %xmm1, %xmm0
Which is happens to be the same code I get w/o fast-math.
That should not be faster than fast-math with reassociation.
I don’t understand why the equation *holds* although you measure a performance loss. I very much prefer a single equation that holds for all pattern.
-Gerolf
PS:
reassoc.ll
declare double @bar()
define double @foo4_reassociated() {
%a = call double @bar()
%b = call double @bar()
%c = call double @bar()
%d = call double @bar()
%t0 = fadd double %a, %b
%t1 = fadd double %c, %d
%t2 = fadd double %t0, %t1
ret double %t2
}
http://reviews.llvm.org/D13417
More information about the llvm-commits
mailing list