mirror of
https://github.com/RPCS3/llvm.git
synced 2026-01-31 01:25:19 +01:00
------------------------------------------------------------------------ r278573 | timshen | 2016-08-12 15:47:13 -0700 (Fri, 12 Aug 2016) | 8 lines [LoopVectorize] Detect loops in the innermost loop before creating InnerLoopVectorizer InnerLoopVectorizer shouldn't handle a loop with cycles inside the loop body, even if that cycle isn't a natural loop. Fixes PR28541. Differential Revision: https://reviews.llvm.org/D22952 ------------------------------------------------------------------------ ------------------------------------------------------------------------ r277399 | timshen | 2016-08-01 15:32:20 -0700 (Mon, 01 Aug 2016) | 9 lines [ADT] NFC: Generalize GraphTraits requirement of "NodeType *" in interfaces to "NodeRef", and migrate SCCIterator.h to use NodeRef Summary: By generalize the interface, users are able to inject more flexible Node token into the algorithm, for example, a pair of vector<Node>* and index integer. Currently I only migrated SCCIterator to use NodeRef, but more is coming. It's a NFC. Reviewers: dblaikie, chandlerc Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D22937 ------------------------------------------------------------------------ ------------------------------------------------------------------------ r278157 | timshen | 2016-08-09 13:23:13 -0700 (Tue, 09 Aug 2016) | 7 lines [ADT] Change iterator_adaptor_base's default template arguments to forward more underlying typedefs Reviewers: chandlerc Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D23217 ------------------------------------------------------------------------ ------------------------------------------------------------------------ r278569 | timshen | 2016-08-12 15:03:28 -0700 (Fri, 12 Aug 2016) | 3 lines [ADT] Add filter_iterator for filtering elements Differential Revision: https://reviews.llvm.org/D22951 ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_39@278674 91177308-0d34-0410-b5e6-96231b3b80d8
72 lines
2.1 KiB
LLVM
72 lines
2.1 KiB
LLVM
; RUN: opt -loop-vectorize -pass-remarks=loop-vectorize -S < %s 2>&1 | FileCheck %s
|
|
|
|
; FIXME: Check for -pass-remarks-missed and -pass-remarks-analysis output when
|
|
; addAcyclicInnerLoop emits analysis.
|
|
|
|
; Check that opt does not crash on such input:
|
|
;
|
|
; a, b, c;
|
|
; fn1() {
|
|
; while (b--) {
|
|
; c = a;
|
|
; switch (a & 3)
|
|
; case 0:
|
|
; do
|
|
; case 3:
|
|
; case 2:
|
|
; case 1:
|
|
; ;
|
|
; while (--c)
|
|
; ;
|
|
; }
|
|
; }
|
|
|
|
@b = common global i32 0, align 4
|
|
@a = common global i32 0, align 4
|
|
@c = common global i32 0, align 4
|
|
|
|
; CHECK-NOT: vectorized loop
|
|
; CHECK-LABEL: fn1
|
|
|
|
define i32 @fn1() {
|
|
entry:
|
|
%tmp2 = load i32, i32* @b, align 4
|
|
%dec3 = add nsw i32 %tmp2, -1
|
|
store i32 %dec3, i32* @b, align 4
|
|
%tobool4 = icmp eq i32 %tmp2, 0
|
|
br i1 %tobool4, label %while.end, label %while.body.lr.ph
|
|
|
|
while.body.lr.ph: ; preds = %entry
|
|
%tmp1 = load i32, i32* @a, align 4
|
|
%and = and i32 %tmp1, 3
|
|
%switch = icmp eq i32 %and, 0
|
|
br label %while.body
|
|
|
|
while.cond: ; preds = %do.cond
|
|
%dec = add nsw i32 %dec7, -1
|
|
%tobool = icmp eq i32 %dec7, 0
|
|
br i1 %tobool, label %while.cond.while.end_crit_edge, label %while.body
|
|
|
|
while.body: ; preds = %while.body.lr.ph, %while.cond
|
|
%dec7 = phi i32 [ %dec3, %while.body.lr.ph ], [ %dec, %while.cond ]
|
|
br i1 %switch, label %do.body, label %do.cond
|
|
|
|
do.body: ; preds = %do.cond, %while.body
|
|
%dec25 = phi i32 [ %dec2, %do.cond ], [ %tmp1, %while.body ]
|
|
br label %do.cond
|
|
|
|
do.cond: ; preds = %do.body, %while.body
|
|
%dec26 = phi i32 [ %dec25, %do.body ], [ %tmp1, %while.body ]
|
|
%dec2 = add nsw i32 %dec26, -1
|
|
%tobool3 = icmp eq i32 %dec2, 0
|
|
br i1 %tobool3, label %while.cond, label %do.body
|
|
|
|
while.cond.while.end_crit_edge: ; preds = %while.cond
|
|
store i32 0, i32* @c, align 4
|
|
store i32 -1, i32* @b, align 4
|
|
br label %while.end
|
|
|
|
while.end: ; preds = %while.cond.while.end_crit_edge, %entry
|
|
ret i32 undef
|
|
}
|