tree-ssa-math-opts.c
113 KB
-
widening_mul: restrict ops to be defined in the same basic-block when convert plusminus to widen · d21dff5b
In the testcase for PR94269, widening_mul moves two multiply instructions from outside the loop to inside the loop, merging with two add instructions separately. This increases the cost of the loop. Like FMA detection in the same pass, simply restrict ops to be defined in the same basic-block to avoid possibly moving multiply to a different block with a higher execution frequency. 2020-03-26 Felix Yang <felix.yang@huawei.com> PR tree-optimization/94269 * tree-ssa-math-opts.c (convert_plusminus_to_widen): Restrict this operation to single basic block. * gcc.dg/pr94269.c: New test.
Richard Biener committed