You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is crazy weird. The essential problem is that LICM got slightly more powerful in r200067 and started sinking loads out of the loop body in a corner case. When it does so, we mysteriously stop being able to DSE stores in a separate function!
The code for this is heavily reduced from Adobe-C++/loop_unroll.cpp. To reproduce the weird behavior, take an "opt" binary from trunk and "old opt" from r200066, and compare:
Extended Description
This is crazy weird. The essential problem is that LICM got slightly more powerful in r200067 and started sinking loads out of the loop body in a corner case. When it does so, we mysteriously stop being able to DSE stores in a separate function!
The code for this is heavily reduced from Adobe-C++/loop_unroll.cpp. To reproduce the weird behavior, take an "opt" binary from trunk and "old opt" from r200066, and compare:
% opt < loop_unroll.reduced.ll -std-link-opts | llc -O3 -o loop_unroll.new.s
% clang++ -lm -o loop_unroll.new loop_unroll.new.s
vs.
% old_opt < loop_unroll.reduced.ll -std-link-opts | llc -O3 -o loop_unroll.old.s
% clang++ -lm -o loop_unroll.old loop_unroll.old.s
When I benchmark these on my sandybridge machine I get:
% perf stat -r5 ./loop_unroll.new && perf stat -r5 ./loop_unroll.old
Performance counter stats for './loop_unroll.new' (5 runs):
Performance counter stats for './loop_unroll.old' (5 runs):
Note the 50% stalled cycles on the new one!!!
I'm working on getting two A/B inputs to trunk 'opt' that exhibit the behavior, lacking any good ideas about why its actually happening.
Note that I've checked -- top of tree and r200067 behave exactly the same. The change is only in the patch committed with r200067.
The text was updated successfully, but these errors were encountered: