diff options
author | Sanjoy Das <sanjoy@playingwithpointers.com> | 2016-06-05 18:01:12 +0000 |
---|---|---|
committer | Sanjoy Das <sanjoy@playingwithpointers.com> | 2016-06-05 18:01:12 +0000 |
commit | fa9013b737181180f67ef6bbf7fdf8e99e184dc2 (patch) | |
tree | 4f933298456bc03af581b2b1157f03b05c2f02e2 /test | |
parent | 7ae69db1938f508593d470798ad3c96ce5ea1960 (diff) |
[IndVars] Remove -liv-reduce
It is an off-by-default option that no one seems to use[0], and given
that SCEV directly understands the overflow instrinsics there is no real
need for it anymore.
[0]: http://lists.llvm.org/pipermail/llvm-dev/2016-April/098181.html
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271845 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/Transforms/IndVarSimplify/overflowcheck.ll | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/test/Transforms/IndVarSimplify/overflowcheck.ll b/test/Transforms/IndVarSimplify/overflowcheck.ll deleted file mode 100644 index c3c033dfaec..00000000000 --- a/test/Transforms/IndVarSimplify/overflowcheck.ll +++ /dev/null @@ -1,56 +0,0 @@ -; RUN: opt < %s -indvars -liv-reduce -S | FileCheck %s -target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128" -target triple = "x86_64-apple-macosx" - -; CHECK-LABEL: @addwithoverflow -; CHECK-LABEL: loop1: -; CHECK-NOT: zext -; CHECK: add nsw -; CHECK: @llvm.sadd.with.overflow -; CHECK-LABEL: loop2: -; CHECK-NOT: extractvalue -; CHECK: add nuw -; CHECK: @llvm.sadd.with.overflow -; CHECK-LABEL: loop3: -; CHECK-NOT: extractvalue -; CHECK: ret -define i64 @addwithoverflow(i32 %n, i64* %a) { -entry: - br label %loop0 - -loop0: - %i = phi i32 [ 0, %entry ], [ %i1val, %loop3 ] - %s = phi i32 [ 0, %entry ], [ %addsval, %loop3 ] - %bc = icmp ult i32 %i, %n - br i1 %bc, label %loop1, label %exit - -loop1: - %zxt = zext i32 %i to i64 - %ofs = shl nuw nsw i64 %zxt, 3 - %gep = getelementptr i64, i64* %a, i64 %zxt - %v = load i64, i64* %gep, align 8 - %truncv = trunc i64 %v to i32 - %adds = call { i32, i1 } @llvm.sadd.with.overflow.i32(i32 %s, i32 %truncv) - %ovflows = extractvalue { i32, i1 } %adds, 1 - br i1 %ovflows, label %exit, label %loop2 - -loop2: - %addsval = extractvalue { i32, i1 } %adds, 0 - %i1 = call { i32, i1 } @llvm.sadd.with.overflow.i32(i32 %i, i32 1) - %i1check = extractvalue { i32, i1 } %i1, 1 - br i1 %i1check, label %exit, label %loop3 - -loop3: - %i1val = extractvalue { i32, i1 } %i1, 0 - %test = icmp slt i32 %i1val, %n - br i1 %test, label %return, label %loop0 - -return: - %ret = zext i32 %addsval to i64 - ret i64 %ret - -exit: - unreachable -} - -declare { i32, i1 } @llvm.sadd.with.overflow.i32(i32, i32) |