From e4cfa89915b7e16a095272f6603a3df83b982d38 Mon Sep 17 00:00:00 2001 From: Florian Hahn Date: Thu, 30 May 2019 05:03:12 +0000 Subject: [LV] Inform about exactly reason of loop illegality Currently, only the following information is provided by LoopVectorizer in the case when the CF of the loop is not legal for vectorization: LV: Can't vectorize the instructions or CFG LV: Not vectorizing: Cannot prove legality. But this information is not enough for the root cause analysis; what is exactly wrong with the loop should also be printed: LV: Not vectorizing: The exiting block is not the loop latch. Patch by Pavel Samolysov. Reviewers: mkuper, hsaito, rengolin, fhahn Reviewed By: fhahn Differential Revision: https://reviews.llvm.org/D62311 llvm-svn: 362056 --- .../LoopVectorize/legal_preheader_check.ll | 27 ---------------------- 1 file changed, 27 deletions(-) delete mode 100644 llvm/test/Transforms/LoopVectorize/legal_preheader_check.ll (limited to 'llvm/test/Transforms/LoopVectorize/legal_preheader_check.ll') diff --git a/llvm/test/Transforms/LoopVectorize/legal_preheader_check.ll b/llvm/test/Transforms/LoopVectorize/legal_preheader_check.ll deleted file mode 100644 index 32aa796394d..00000000000 --- a/llvm/test/Transforms/LoopVectorize/legal_preheader_check.ll +++ /dev/null @@ -1,27 +0,0 @@ -; RUN: opt < %s -loop-vectorize -debug -S -o /dev/null 2>&1 | FileCheck %s -; REQUIRES: asserts - -; D40973 -; Make sure LV legal bails out when the loop doesn't have a legal pre-header. - -; CHECK: LV: Loop doesn't have a legal pre-header. - -define void @inc(i32 %n, i8* %P) { - %1 = icmp sgt i32 %n, 0 - br i1 %1, label %BB1, label %BB2 - -BB1: - indirectbr i8* %P, [label %.lr.ph] - -BB2: - br label %.lr.ph - -.lr.ph: - %indvars.iv = phi i32 [ %indvars.iv.next, %.lr.ph ], [ 0, %BB1 ], [ 0, %BB2 ] - %indvars.iv.next = add i32 %indvars.iv, 1 - %exitcond = icmp eq i32 %indvars.iv.next, %n - br i1 %exitcond, label %._crit_edge, label %.lr.ph - -._crit_edge: - ret void -} -- cgit v1.2.3