aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGen/Mips
diff options
context:
space:
mode:
authorEric Christopher <echristo@apple.com>2011-06-09 16:03:19 +0000
committerEric Christopher <echristo@apple.com>2011-06-09 16:03:19 +0000
commit6f3661fdcd10a33d225502f8b112dc5b7968ef74 (patch)
treee01354844c840ab6580d055e2aad1e75cac573aa /test/CodeGen/Mips
parent622ab4ab505a8f07d648d7e15016a56bacdaddd1 (diff)
downloadexternal_llvm-6f3661fdcd10a33d225502f8b112dc5b7968ef74.zip
external_llvm-6f3661fdcd10a33d225502f8b112dc5b7968ef74.tar.gz
external_llvm-6f3661fdcd10a33d225502f8b112dc5b7968ef74.tar.bz2
Speculatively revert 132758 and 132768 to try to fix the Windows buildbots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132777 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/Mips')
-rw-r--r--test/CodeGen/Mips/alloca.ll81
-rw-r--r--test/CodeGen/Mips/inlineasmmemop.ll23
2 files changed, 6 insertions, 98 deletions
diff --git a/test/CodeGen/Mips/alloca.ll b/test/CodeGen/Mips/alloca.ll
index ff503ec..50eeecf 100644
--- a/test/CodeGen/Mips/alloca.ll
+++ b/test/CodeGen/Mips/alloca.ll
@@ -4,15 +4,15 @@ define i32 @twoalloca(i32 %size) nounwind {
entry:
; CHECK: subu $[[T0:[0-9]+]], $sp, $[[SZ:[0-9]+]]
; CHECK: addu $sp, $zero, $[[T0]]
-; CHECK: addiu $[[T1:[0-9]+]], $sp, [[OFF:[0-9]+]]
-; CHECK: subu $[[T2:[0-9]+]], $sp, $[[SZ]]
-; CHECK: addu $sp, $zero, $[[T2]]
-; CHECK: addiu $[[T3:[0-9]+]], $sp, [[OFF]]
+; CHECK: addu $[[SP1:[0-9]+]], $zero, $sp
+; CHECK: subu $[[T1:[0-9]+]], $sp, $[[SZ]]
+; CHECK: addu $sp, $zero, $[[T1]]
+; CHECK: addu $[[SP2:[0-9]+]], $zero, $sp
; CHECK: lw $25, %call16(foo)($gp)
-; CHECK: addu $4, $zero, $[[T1]]
+; CHECK: addiu $4, $[[SP1]], 24
; CHECK: jalr $25
; CHECK: lw $25, %call16(foo)($gp)
-; CHECK: addu $4, $zero, $[[T3]]
+; CHECK: addiu $4, $[[SP2]], 24
; CHECK: jalr $25
%tmp1 = alloca i8, i32 %size, align 4
%add.ptr = getelementptr inbounds i8* %tmp1, i32 5
@@ -29,72 +29,3 @@ declare void @foo2(double, double, i32)
declare i32 @foo(i8*)
-@.str = private unnamed_addr constant [22 x i8] c"%d %d %d %d %d %d %d\0A\00", align 1
-
-define i32 @alloca2(i32 %size) nounwind {
-entry:
-; dynamic allocated stack area and $gp restore slot have the same offsets
-; relative to $sp.
-;
-; CHECK: alloca2
-; CHECK: .cprestore [[OFF:[0-9]+]]
-; CHECK: subu $[[T0:[0-9]+]], $sp, $[[SZ:[0-9]+]]
-; CHECK: addu $sp, $zero, $[[T0]]
-; CHECK: addiu $[[T1:[0-9]+]], $sp, [[OFF]]
-
- %tmp1 = alloca i8, i32 %size, align 4
- %0 = bitcast i8* %tmp1 to i32*
- %cmp = icmp sgt i32 %size, 10
- br i1 %cmp, label %if.then, label %if.else
-
-if.then: ; preds = %entry
-; CHECK: addiu $4, $[[T1]], 40
-
- %add.ptr = getelementptr inbounds i8* %tmp1, i32 40
- %1 = bitcast i8* %add.ptr to i32*
- call void @foo3(i32* %1) nounwind
- %arrayidx15.pre = getelementptr inbounds i8* %tmp1, i32 12
- %.pre = bitcast i8* %arrayidx15.pre to i32*
- br label %if.end
-
-if.else: ; preds = %entry
-; CHECK: addiu $4, $[[T1]], 12
-
- %add.ptr5 = getelementptr inbounds i8* %tmp1, i32 12
- %2 = bitcast i8* %add.ptr5 to i32*
- call void @foo3(i32* %2) nounwind
- br label %if.end
-
-if.end: ; preds = %if.else, %if.then
-; CHECK: lw $5, 0($[[T1]])
-; CHECK: lw $25, %call16(printf)
-
- %.pre-phi = phi i32* [ %2, %if.else ], [ %.pre, %if.then ]
- %tmp7 = load i32* %0, align 4, !tbaa !0
- %arrayidx9 = getelementptr inbounds i8* %tmp1, i32 4
- %3 = bitcast i8* %arrayidx9 to i32*
- %tmp10 = load i32* %3, align 4, !tbaa !0
- %arrayidx12 = getelementptr inbounds i8* %tmp1, i32 8
- %4 = bitcast i8* %arrayidx12 to i32*
- %tmp13 = load i32* %4, align 4, !tbaa !0
- %tmp16 = load i32* %.pre-phi, align 4, !tbaa !0
- %arrayidx18 = getelementptr inbounds i8* %tmp1, i32 16
- %5 = bitcast i8* %arrayidx18 to i32*
- %tmp19 = load i32* %5, align 4, !tbaa !0
- %arrayidx21 = getelementptr inbounds i8* %tmp1, i32 20
- %6 = bitcast i8* %arrayidx21 to i32*
- %tmp22 = load i32* %6, align 4, !tbaa !0
- %arrayidx24 = getelementptr inbounds i8* %tmp1, i32 24
- %7 = bitcast i8* %arrayidx24 to i32*
- %tmp25 = load i32* %7, align 4, !tbaa !0
- %call = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([22 x i8]* @.str, i32 0, i32 0), i32 %tmp7, i32 %tmp10, i32 %tmp13, i32 %tmp16, i32 %tmp19, i32 %tmp22, i32 %tmp25) nounwind
- ret i32 0
-}
-
-declare void @foo3(i32*)
-
-declare i32 @printf(i8* nocapture, ...) nounwind
-
-!0 = metadata !{metadata !"int", metadata !1}
-!1 = metadata !{metadata !"omnipotent char", metadata !2}
-!2 = metadata !{metadata !"Simple C/C++ TBAA", null}
diff --git a/test/CodeGen/Mips/inlineasmmemop.ll b/test/CodeGen/Mips/inlineasmmemop.ll
deleted file mode 100644
index c565892..0000000
--- a/test/CodeGen/Mips/inlineasmmemop.ll
+++ /dev/null
@@ -1,23 +0,0 @@
-; RUN: llc -march=mipsel -mcpu=4ke < %s | FileCheck %s
-
-@g1 = external global i32
-
-define i32 @f1(i32 %x) nounwind {
-entry:
-; CHECK: addiu $[[T0:[0-9]+]], $sp
-; CHECK: #APP
-; CHECK: sw $4, 0($[[T0]])
-; CHECK: #NO_APP
-; CHECK: lw $[[T1:[0-9]+]], %got(g1)($gp)
-; CHECK: #APP
-; CHECK: lw $[[T3:[0-9]+]], 0($[[T0]])
-; CHECK: #NO_APP
-; CHECK: sw $[[T3]], 0($[[T1]])
-
- %l1 = alloca i32, align 4
- call void asm "sw $1, $0", "=*m,r"(i32* %l1, i32 %x) nounwind
- %0 = call i32 asm "lw $0, $1", "=r,*m"(i32* %l1) nounwind
- store i32 %0, i32* @g1, align 4
- ret i32 %0
-}
-