summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorPhilip Reames <listmail@philipreames.com>2018-03-20 23:00:54 +0000
committerPhilip Reames <listmail@philipreames.com>2018-03-20 23:00:54 +0000
commit37a1a29fcb434f22f79be2d3d403edb9d0b879da (patch)
tree05220dfd6c6ee23b23ca1cb160e3133495693d4e /llvm/test
parent73a98f5eea43943726ec37e01e6daf13cfce4c39 (diff)
downloadbcm5719-llvm-37a1a29fcb434f22f79be2d3d403edb9d0b879da.tar.gz
bcm5719-llvm-37a1a29fcb434f22f79be2d3d403edb9d0b879da.zip
[MustExecute] Shwo the effect of using full loop info variant
Most basic possible test for the logic used by LICM. Also contains a speculative build fix for compiles which complain about a definition of a stuct K; followed by a declaration as class K; llvm-svn: 328058
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/Analysis/MustExecute/loop-header.ll7
1 files changed, 6 insertions, 1 deletions
diff --git a/llvm/test/Analysis/MustExecute/loop-header.ll b/llvm/test/Analysis/MustExecute/loop-header.ll
index 4d4c1ff90fc..3e729993d42 100644
--- a/llvm/test/Analysis/MustExecute/loop-header.ll
+++ b/llvm/test/Analysis/MustExecute/loop-header.ll
@@ -88,9 +88,14 @@ exit:
; FIXME: handled by loop safety info, test it
define i1 @nothrow_loop(i32* noalias %p, i32 %high) {
; CHECK-LABEL: @nothrow_loop(
-; CHECK-LABEL: loop:
+; CHECK-LABEL: loop:
; CHECK: %iv = phi i32 [ 0, %entry ], [ %iv.next, %next ] ; (mustexec in: loop)
; CHECK: br label %next ; (mustexec in: loop)
+; CHECK-LABEL: next:
+; CHECK: %v = load i32, i32* %p ; (mustexec in: loop)
+; CHECK: %iv.next = add nuw nsw i32 %iv, 1 ; (mustexec in: loop)
+; CHECK: %exit.test = icmp slt i32 %iv, %high ; (mustexec in: loop)
+; CHECK: br i1 %exit.test, label %exit, label %loop ; (mustexec in: loop)
; CHECK-NOT: mustexec
entry:
OpenPOWER on IntegriCloud