llvm-project/llvm/test/Transforms/LoopVectorize/X86
Balaram Makam b05a55787a [SimplifyCFG] Defer folding unconditional branches to LateSimplifyCFG if it can destroy canonical loop structure.
Summary:
When simplifying unconditional branches from empty blocks, we pre-test if the
BB belongs to a set of loop headers and keep the block to prevent passes from
destroying canonical loop structure. However, the current algorithm fails if
the destination of the branch is a loop header. Especially when such a loop's
latch block is folded into loop header it results in additional backedges and
LoopSimplify turns it into a nested loop which prevent later optimizations
from being applied (e.g., loop  unrolling and loop interleaving).

This patch augments the existing algorithm by further checking if the
destination of the branch belongs to a set of loop headers and defer
eliminating it if yes to LateSimplifyCFG.

Fixes PR33605: https://bugs.llvm.org/show_bug.cgi?id=33605

Reviewers: efriedma, mcrosier, pacxx, hsung, davidxl

Reviewed By: efriedma

Subscribers: ashutosh.nema, gberry, javed.absar, llvm-commits

Differential Revision: https://reviews.llvm.org/D35411

llvm-svn: 308422
2017-07-19 08:53:34 +00:00
..
already-vectorized.ll
assume.ll
avx1.ll
avx512.ll [AVX-512] Fix the execution domain for AVX-512 integer broadcasts. 2017-02-26 06:45:51 +00:00
consecutive-ptr-uniforms.ll Support arbitrary address space pointers in masked gather/scatter intrinsics. 2017-05-03 12:28:54 +00:00
constant-vector-operand.ll
conversion-cost.ll
cost-model.ll
float-induction-x86.ll [SimplifyCFG] Defer folding unconditional branches to LateSimplifyCFG if it can destroy canonical loop structure. 2017-07-19 08:53:34 +00:00
force-ifcvt.ll
fp32_to_uint32-cost-model.ll
fp64_to_uint32-cost-model.ll Revert "r306473 - re-commit r306336: Enable vectorizer-maximize-bandwidth by default." 2017-07-01 03:24:09 +00:00
fp_to_sint8-cost-model.ll
funclet.ll
gather-cost.ll Second attempt at r285517. 2016-10-31 13:17:31 +00:00
gather-vs-interleave.ll [Loop Vectorizer] Cost-based decision for vectorization form of memory instruction. 2017-02-08 19:25:23 +00:00
gather_scatter.ll Support arbitrary address space pointers in masked gather/scatter intrinsics. 2017-05-03 12:28:54 +00:00
gcc-examples.ll Revert "r306473 - re-commit r306336: Enable vectorizer-maximize-bandwidth by default." 2017-07-01 03:24:09 +00:00
illegal-parallel-loop-uniform-write.ll
imprecise-through-phis.ll
int128_no_gather.ll [X86] Remove PCOMMIT instruction support since Intel has deprecated this instruction with no plans to release products with it. 2017-02-08 05:45:39 +00:00
interleaving.ll [X86] enable memory interleaving for X86\SLM arch. 2017-01-25 09:14:48 +00:00
lit.local.cfg
masked_load_store.ll Revert "r306473 - re-commit r306336: Enable vectorizer-maximize-bandwidth by default." 2017-07-01 03:24:09 +00:00
max-mstore.ll
metadata-enable.ll Increases full-unroll threshold. 2017-02-18 03:46:51 +00:00
min-trip-count-switch.ll
mul_slm_16bit.ll [X86] fixing failed test in commit: r291657 2017-01-11 09:03:11 +00:00
no-vector.ll
no_fpmath.ll Revert "r306473 - re-commit r306336: Enable vectorizer-maximize-bandwidth by default." 2017-07-01 03:24:09 +00:00
no_fpmath_with_hotness.ll Revert "r306473 - re-commit r306336: Enable vectorizer-maximize-bandwidth by default." 2017-07-01 03:24:09 +00:00
parallel-loops-after-reg2mem.ll
parallel-loops.ll
powof2div.ll
propagate-metadata.ll
ptr-indvar-crash.ll
rauw-bug.ll
reduction-crash.ll Revert "r306473 - re-commit r306336: Enable vectorizer-maximize-bandwidth by default." 2017-07-01 03:24:09 +00:00
reg-usage-debug.ll [LoopVectorizer] When estimating reg usage, unused insts may "end" another use 2016-11-15 14:27:33 +00:00
reg-usage.ll [LoopVectorizer] When estimating reg usage, unused insts may "end" another use 2016-11-15 14:27:33 +00:00
register-assumption.ll
scatter_crash.ll Support arbitrary address space pointers in masked gather/scatter intrinsics. 2017-05-03 12:28:54 +00:00
slm-no-vectorize.ll llvm/test/Transforms/LoopVectorize/X86/slm-no-vectorize.ll: -debug is available in +Asserts. 2017-07-02 14:25:27 +00:00
small-size.ll Improve profile-guided heuristics to use estimated trip count. 2017-06-19 18:48:58 +00:00
strided_load_cost.ll Currently isLikelyComplexAddressComputation tries to figure out if the given stride seems to be 'complex' and need some extra cost for address computation handling. 2017-01-05 14:03:41 +00:00
struct-store.ll
svml-calls-finite.ll [TLI] Add mapping for various '__<func>_finite' forms of the math routines to SVML routines 2017-05-12 22:11:26 +00:00
svml-calls.ll
tripcount.ll
uint64_to_fp64-cost-model.ll
uniform-phi.ll
uniform_load.ll
uniformshift.ll
unroll-pm.ll
unroll-small-loops.ll
unroll_selection.ll
veclib-calls.ll
vect.omp.force.ll
vect.omp.force.small-tc.ll [LV] Optimize for size when vectorizing loops with tiny trip count 2017-06-30 08:02:35 +00:00
vector-scalar-select-cost.ll
vector_max_bandwidth.ll [X86][AVX] Fixed v16i16/v32i8 ADD/SUB costs on AVX1 subtargets 2016-11-14 14:45:16 +00:00
vector_ptr_load_store.ll
vectorization-remarks-loopid-dbg.ll Revert "r306473 - re-commit r306336: Enable vectorizer-maximize-bandwidth by default." 2017-07-01 03:24:09 +00:00
vectorization-remarks-missed.ll [LV] Report multiple reasons for not vectorizing under allowExtraAnalysis 2017-05-23 07:08:02 +00:00
vectorization-remarks-profitable.ll [LV] These remark should have been missed remarks 2017-03-01 04:31:15 +00:00
vectorization-remarks.ll Revert "r306473 - re-commit r306336: Enable vectorizer-maximize-bandwidth by default." 2017-07-01 03:24:09 +00:00
vectorize-only-for-real.ll
x86-predication.ll [LV] Scalarize operands of predicated instructions 2016-12-07 15:03:32 +00:00
x86_fp80-vector-store.ll