summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/PowerPC
diff options
context:
space:
mode:
authorAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>2015-02-13 14:15:48 +0000
committerAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>2015-02-13 14:15:48 +0000
commitb14ae8692dcce69aab032af9476e36de15f6490d (patch)
treed4d8da6c61c5f65ccbe63f60e6bb6a19c008a72b /llvm/test/CodeGen/PowerPC
parentf5f2ace2111ee6ec6781a497b7f0ec82a224db89 (diff)
downloadbcm5719-llvm-b14ae8692dcce69aab032af9476e36de15f6490d.tar.gz
bcm5719-llvm-b14ae8692dcce69aab032af9476e36de15f6490d.zip
[CodeGenPrepare] Removed duplicate logic. SimplifyCFG already knows how to speculate calls to cttz/ctlz.
SimplifyCFG now knows how to speculate calls to intrinsic cttz/ctlz that are 'cheap' for the target. Therefore, some of the logic in CodeGenPrepare that was originally added at revision 224899 can now be removed. This patch is basically a no functional change. It removes the duplicated logic in CodeGenPrepare and converts all the existing target specific tests for cttz/ctlz into SimplifyCFG tests. Differential Revision: http://reviews.llvm.org/D7608 llvm-svn: 229105
Diffstat (limited to 'llvm/test/CodeGen/PowerPC')
-rw-r--r--llvm/test/CodeGen/PowerPC/cttz-ctlz-spec.ll41
1 files changed, 0 insertions, 41 deletions
diff --git a/llvm/test/CodeGen/PowerPC/cttz-ctlz-spec.ll b/llvm/test/CodeGen/PowerPC/cttz-ctlz-spec.ll
deleted file mode 100644
index 13b017a746e..00000000000
--- a/llvm/test/CodeGen/PowerPC/cttz-ctlz-spec.ll
+++ /dev/null
@@ -1,41 +0,0 @@
-; RUN: opt -S -codegenprepare < %s | FileCheck %s
-target datalayout = "E-m:e-i64:64-n32:64"
-target triple = "powerpc64-unknown-linux-gnu"
-
-define i64 @test1(i64 %A) {
-; CHECK-LABEL: @test1(
-; CHECK: [[CTLZ:%[A-Za-z0-9]+]] = call i64 @llvm.ctlz.i64(i64 %A, i1 false)
-; CHECK-NEXT: ret i64 [[CTLZ]]
-entry:
- %tobool = icmp eq i64 %A, 0
- br i1 %tobool, label %cond.end, label %cond.true
-
-cond.true: ; preds = %entry
- %0 = tail call i64 @llvm.ctlz.i64(i64 %A, i1 true)
- br label %cond.end
-
-cond.end: ; preds = %entry, %cond.true
- %cond = phi i64 [ %0, %cond.true ], [ 64, %entry ]
- ret i64 %cond
-}
-
-define i64 @test1b(i64 %A) {
-; CHECK-LABEL: @test1b(
-; CHECK: [[CTTZ:%[A-Za-z0-9]+]] = call i64 @llvm.cttz.i64(i64 %A, i1 false)
-; CHECK-NEXT: ret i64 [[CTTZ]]
-entry:
- %tobool = icmp eq i64 %A, 0
- br i1 %tobool, label %cond.end, label %cond.true
-
-cond.true: ; preds = %entry
- %0 = tail call i64 @llvm.cttz.i64(i64 %A, i1 true)
- br label %cond.end
-
-cond.end: ; preds = %entry, %cond.true
- %cond = phi i64 [ %0, %cond.true ], [ 64, %entry ]
- ret i64 %cond
-}
-
-declare i64 @llvm.ctlz.i64(i64, i1)
-declare i64 @llvm.cttz.i64(i64, i1)
-
OpenPOWER on IntegriCloud