diff options
author | dim <dim@FreeBSD.org> | 2012-08-15 19:34:23 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2012-08-15 19:34:23 +0000 |
commit | 721c201bd55ffb73cb2ba8d39e0570fa38c44e15 (patch) | |
tree | eacfc83d988e4b9d11114387ae7dc41243f2a363 /test/Transforms/LICM/speculate.ll | |
parent | 2b2816e083a455f7a656ae88b0fd059d1688bb36 (diff) | |
download | FreeBSD-src-721c201bd55ffb73cb2ba8d39e0570fa38c44e15.zip FreeBSD-src-721c201bd55ffb73cb2ba8d39e0570fa38c44e15.tar.gz |
Vendor import of llvm trunk r161861:
http://llvm.org/svn/llvm-project/llvm/trunk@161861
Diffstat (limited to 'test/Transforms/LICM/speculate.ll')
-rw-r--r-- | test/Transforms/LICM/speculate.ll | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test/Transforms/LICM/speculate.ll b/test/Transforms/LICM/speculate.ll index 507b193..4c4d036 100644 --- a/test/Transforms/LICM/speculate.ll +++ b/test/Transforms/LICM/speculate.ll @@ -165,3 +165,25 @@ for.inc: ; preds = %if.then, %for.body for.end: ; preds = %for.inc, %entry ret void } + +; SDiv is unsafe to speculate inside an infinite loop. + +define void @unsafe_sdiv_c(i64 %a, i64 %b, i64* %p) { +entry: +; CHECK: entry: +; CHECK-NOT: sdiv +; CHECK: br label %for.body + br label %for.body + +for.body: + %c = icmp eq i64 %b, 0 + br i1 %c, label %backedge, label %if.then + +if.then: + %d = sdiv i64 %a, %b + store i64 %d, i64* %p + br label %backedge + +backedge: + br label %for.body +} |