move tests that depend on the x86 backend out of codegen/generic,
authorChris Lattner <sabre@nondot.org>
Tue, 9 Feb 2010 06:41:03 +0000 (06:41 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 9 Feb 2010 06:41:03 +0000 (06:41 +0000)
and remove a few old and unreduced ones.  Fixes PR5624.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95656 91177308-0d34-0410-b5e6-96231b3b80d8

15 files changed:
test/CodeGen/Generic/2006-04-11-vecload.ll [deleted file]
test/CodeGen/Generic/2006-11-06-MemIntrinsicExpand.ll [deleted file]
test/CodeGen/Generic/2006-12-16-InlineAsmCrash.ll [deleted file]
test/CodeGen/Generic/2007-02-23-DAGCombine-Miscompile.ll [deleted file]
test/CodeGen/Generic/2007-04-14-BitTestsBadMask.ll [deleted file]
test/CodeGen/Generic/2007-04-27-BitTestsBadMask.ll [deleted file]
test/CodeGen/Generic/2007-05-03-EHTypeInfo.ll
test/CodeGen/Generic/SwitchLowering.ll [deleted file]
test/CodeGen/Generic/phi-immediate-factoring.ll [deleted file]
test/CodeGen/Generic/switch-crit-edge-constant.ll [deleted file]
test/CodeGen/X86/2006-12-16-InlineAsmCrash.ll [new file with mode: 0644]
test/CodeGen/X86/2007-02-23-DAGCombine-Miscompile.ll [new file with mode: 0644]
test/CodeGen/X86/SwitchLowering.ll [new file with mode: 0644]
test/CodeGen/X86/phi-immediate-factoring.ll [new file with mode: 0644]
test/CodeGen/X86/switch-crit-edge-constant.ll [new file with mode: 0644]

diff --git a/test/CodeGen/Generic/2006-04-11-vecload.ll b/test/CodeGen/Generic/2006-04-11-vecload.ll
deleted file mode 100644 (file)
index a68ed83..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-; RUN: llc < %s -march=x86 -mcpu=yonah
-
-; The vload was getting memoized to the previous scalar load!
-
-define void @VertexProgram2() {
-        %xFloat0.688 = load float* null         ; <float> [#uses=0]
-        %loadVector37.712 = load <4 x float>* null              ; <<4 x float>> [#uses=1]
-        %inFloat3.713 = insertelement <4 x float> %loadVector37.712, float 0.000000e+00, i32 3          ; <<4 x float>> [#uses=1]
-        store <4 x float> %inFloat3.713, <4 x float>* null
-        unreachable
-}
-
diff --git a/test/CodeGen/Generic/2006-11-06-MemIntrinsicExpand.ll b/test/CodeGen/Generic/2006-11-06-MemIntrinsicExpand.ll
deleted file mode 100644 (file)
index ad3e49f..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-; RUN: llc < %s -march=x86 | not grep adc
-; PR987
-
-declare void @llvm.memcpy.i64(i8*, i8*, i64, i32)
-
-define void @foo(i64 %a) {
-        %b = add i64 %a, 1              ; <i64> [#uses=1]
-        call void @llvm.memcpy.i64( i8* null, i8* null, i64 %b, i32 1 )
-        ret void
-}
-
diff --git a/test/CodeGen/Generic/2006-12-16-InlineAsmCrash.ll b/test/CodeGen/Generic/2006-12-16-InlineAsmCrash.ll
deleted file mode 100644 (file)
index 50a244b..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-; RUN: llc < %s -march=x86
-; PR1049
-target datalayout = "e-p:32:32"
-target triple = "i686-pc-linux-gnu"
-       %struct.QBasicAtomic = type { i32 }
-       %struct.QByteArray = type { %"struct.QByteArray::Data"* }
-       %"struct.QByteArray::Data" = type { %struct.QBasicAtomic, i32, i32, i8*, [1 x i8] }
-       %struct.QFactoryLoader = type { %struct.QObject }
-       %struct.QImageIOHandler = type { i32 (...)**, %struct.QImageIOHandlerPrivate* }
-       %struct.QImageIOHandlerPrivate = type opaque
-       %struct.QImageWriter = type { %struct.QImageWriterPrivate* }
-       %struct.QImageWriterPrivate = type { %struct.QByteArray, %struct.QFactoryLoader*, i1, %struct.QImageIOHandler*, i32, float, %struct.QString, %struct.QString, i32, %struct.QString, %struct.QImageWriter* }
-       %"struct.QList<QByteArray>" = type { %"struct.QList<QByteArray>::._20" }
-       %"struct.QList<QByteArray>::._20" = type { %struct.QListData }
-       %struct.QListData = type { %"struct.QListData::Data"* }
-       %"struct.QListData::Data" = type { %struct.QBasicAtomic, i32, i32, i32, i8, [1 x i8*] }
-       %struct.QObject = type { i32 (...)**, %struct.QObjectData* }
-       %struct.QObjectData = type { i32 (...)**, %struct.QObject*, %struct.QObject*, %"struct.QList<QByteArray>", i8, [3 x i8], i32, i32 }
-       %struct.QString = type { %"struct.QString::Data"* }
-       %"struct.QString::Data" = type { %struct.QBasicAtomic, i32, i32, i16*, i8, i8, [1 x i16] }
-
-define i1 @_ZNK12QImageWriter8canWriteEv() {
-       %tmp62 = load %struct.QImageWriterPrivate** null                ; <%struct.QImageWriterPrivate*> [#uses=1]
-       %tmp = getelementptr %struct.QImageWriterPrivate* %tmp62, i32 0, i32 9          ; <%struct.QString*> [#uses=1]
-       %tmp75 = call %struct.QString* @_ZN7QStringaSERKS_( %struct.QString* %tmp, %struct.QString* null )              ; <%struct.QString*> [#uses=0]
-       call void asm sideeffect "lock\0Adecl $0\0Asetne 1", "=*m"( i32* null )
-       ret i1 false
-}
-
-declare %struct.QString* @_ZN7QStringaSERKS_(%struct.QString*, %struct.QString*)
diff --git a/test/CodeGen/Generic/2007-02-23-DAGCombine-Miscompile.ll b/test/CodeGen/Generic/2007-02-23-DAGCombine-Miscompile.ll
deleted file mode 100644 (file)
index a8f0e57..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-; PR1219
-; RUN: llc < %s -march=x86 | grep {movl        \$1, %eax}
-
-define i32 @test(i1 %X) {
-old_entry1:
-        %hvar2 = zext i1 %X to i32
-       %C = icmp sgt i32 %hvar2, -1
-       br i1 %C, label %cond_true15, label %cond_true
-cond_true15:
-        ret i32 1
-cond_true:
-        ret i32 2
-}
diff --git a/test/CodeGen/Generic/2007-04-14-BitTestsBadMask.ll b/test/CodeGen/Generic/2007-04-14-BitTestsBadMask.ll
deleted file mode 100644 (file)
index 00337b9..0000000
+++ /dev/null
@@ -1,160 +0,0 @@
-; RUN: llc < %s -march=x86 | grep 8388635
-; RUN: llc < %s -march=x86-64 | grep 4294981120
-; PR 1325
-
-; ModuleID = 'bugpoint.test.bc'
-target datalayout = "E-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64"
-target triple = "powerpc-apple-darwin8.8.0"
-;target triple = "i686-linux-gnu"
-       %struct.FILE = type { i8*, i32, i32, i16, i16, %struct.__sbuf, i32, i8*, i32 (i8*)*, i32 (i8*, i8*, i32)*, i64 (i8*, i64, i32)*, i32 (i8*, i8*, i32)*, %struct.__sbuf, %struct.__sFILEX*, i32, [3 x i8], [1 x i8], %struct.__sbuf, i32, i64 }
-       %struct.__sFILEX = type opaque
-       %struct.__sbuf = type { i8*, i32 }
-@PL_rsfp = external global %struct.FILE*               ; <%struct.FILE**> [#uses=1]
-@PL_bufend = external global i8*               ; <i8**> [#uses=1]
-@PL_in_eval = external global i32              ; <i32*> [#uses=1]
-
-declare fastcc void @incline(i8*)
-
-define i16 @Perl_skipspace_bb60(i8* %s, i8** %s_addr.4.out) {
-newFuncRoot:
-       %tmp138.loc = alloca i8*                ; <i8**> [#uses=2]
-       %s_addr.4.loc = alloca i8*              ; <i8**> [#uses=2]
-       %tmp274.loc = alloca i8*                ; <i8**> [#uses=2]
-       br label %bb60
-
-cond_next154.UnifiedReturnBlock_crit_edge.exitStub:            ; preds = %codeRepl
-       store i8* %s_addr.4.reload, i8** %s_addr.4.out
-       ret i16 0
-
-cond_next161.UnifiedReturnBlock_crit_edge.exitStub:            ; preds = %codeRepl
-       store i8* %s_addr.4.reload, i8** %s_addr.4.out
-       ret i16 1
-
-cond_next167.UnifiedReturnBlock_crit_edge.exitStub:            ; preds = %codeRepl
-       store i8* %s_addr.4.reload, i8** %s_addr.4.out
-       ret i16 2
-
-cond_false29.i.cond_true190_crit_edge.exitStub:                ; preds = %codeRepl
-       store i8* %s_addr.4.reload, i8** %s_addr.4.out
-       ret i16 3
-
-cond_next.i.cond_true190_crit_edge.exitStub:           ; preds = %codeRepl
-       store i8* %s_addr.4.reload, i8** %s_addr.4.out
-       ret i16 4
-
-cond_true19.i.cond_true190_crit_edge.exitStub:         ; preds = %codeRepl
-       store i8* %s_addr.4.reload, i8** %s_addr.4.out
-       ret i16 5
-
-bb60:          ; preds = %bb60.backedge, %newFuncRoot
-       %s_addr.2 = phi i8* [ %s, %newFuncRoot ], [ %s_addr.2.be, %bb60.backedge ]              ; <i8*> [#uses=3]
-       %tmp61 = load i8** @PL_bufend           ; <i8*> [#uses=1]
-       %tmp63 = icmp ult i8* %s_addr.2, %tmp61         ; <i1> [#uses=1]
-       br i1 %tmp63, label %bb60.cond_next67_crit_edge, label %bb60.bb101_crit_edge
-
-bb37:          ; preds = %cond_next67.bb37_crit_edge5, %cond_next67.bb37_crit_edge4, %cond_next67.bb37_crit_edge3, %cond_next67.bb37_crit_edge2, %cond_next67.bb37_crit_edge
-       %tmp40 = icmp eq i8 %tmp69, 10          ; <i1> [#uses=1]
-       %tmp43 = getelementptr i8* %s_addr.27.2, i32 1          ; <i8*> [#uses=5]
-       br i1 %tmp40, label %cond_true45, label %bb37.bb60_crit_edge
-
-cond_true45:           ; preds = %bb37
-       %tmp46 = volatile load i32* @PL_in_eval         ; <i32> [#uses=1]
-       %tmp47 = icmp eq i32 %tmp46, 0          ; <i1> [#uses=1]
-       br i1 %tmp47, label %cond_true45.bb60_crit_edge, label %cond_true50
-
-cond_true50:           ; preds = %cond_true45
-       %tmp51 = volatile load %struct.FILE** @PL_rsfp          ; <%struct.FILE*> [#uses=1]
-       %tmp52 = icmp eq %struct.FILE* %tmp51, null             ; <i1> [#uses=1]
-       br i1 %tmp52, label %cond_true55, label %cond_true50.bb60_crit_edge
-
-cond_true55:           ; preds = %cond_true50
-       tail call fastcc void @incline( i8* %tmp43 )
-       br label %bb60.backedge
-
-cond_next67:           ; preds = %Perl_newSV.exit.cond_next67_crit_edge, %cond_true148.cond_next67_crit_edge, %bb60.cond_next67_crit_edge
-       %s_addr.27.2 = phi i8* [ %s_addr.2, %bb60.cond_next67_crit_edge ], [ %tmp274.reload, %Perl_newSV.exit.cond_next67_crit_edge ], [ %tmp138.reload, %cond_true148.cond_next67_crit_edge ]          ; <i8*> [#uses=3]
-       %tmp69 = load i8* %s_addr.27.2          ; <i8> [#uses=2]
-       switch i8 %tmp69, label %cond_next67.bb101_crit_edge [
-                i8 32, label %cond_next67.bb37_crit_edge
-                i8 9, label %cond_next67.bb37_crit_edge2
-                i8 10, label %cond_next67.bb37_crit_edge3
-                i8 13, label %cond_next67.bb37_crit_edge4
-                i8 12, label %cond_next67.bb37_crit_edge5
-       ]
-
-codeRepl:              ; preds = %bb101.preheader
-       %targetBlock = call i16 @Perl_skipspace_bb60_bb101( i8* %s_addr.27.3.ph, i8** %tmp274.loc, i8** %s_addr.4.loc, i8** %tmp138.loc )               ; <i16> [#uses=1]
-       %tmp274.reload = load i8** %tmp274.loc          ; <i8*> [#uses=4]
-       %s_addr.4.reload = load i8** %s_addr.4.loc              ; <i8*> [#uses=6]
-       %tmp138.reload = load i8** %tmp138.loc          ; <i8*> [#uses=1]
-       switch i16 %targetBlock, label %cond_true19.i.cond_true190_crit_edge.exitStub [
-                i16 0, label %cond_next271.bb60_crit_edge
-                i16 1, label %cond_true290.bb60_crit_edge
-                i16 2, label %cond_true295.bb60_crit_edge
-                i16 3, label %Perl_newSV.exit.cond_next67_crit_edge
-                i16 4, label %cond_true148.cond_next67_crit_edge
-                i16 5, label %cond_next154.UnifiedReturnBlock_crit_edge.exitStub
-                i16 6, label %cond_next161.UnifiedReturnBlock_crit_edge.exitStub
-                i16 7, label %cond_next167.UnifiedReturnBlock_crit_edge.exitStub
-                i16 8, label %cond_false29.i.cond_true190_crit_edge.exitStub
-                i16 9, label %cond_next.i.cond_true190_crit_edge.exitStub
-       ]
-
-bb37.bb60_crit_edge:           ; preds = %bb37
-       br label %bb60.backedge
-
-cond_true45.bb60_crit_edge:            ; preds = %cond_true45
-       br label %bb60.backedge
-
-cond_true50.bb60_crit_edge:            ; preds = %cond_true50
-       br label %bb60.backedge
-
-bb60.cond_next67_crit_edge:            ; preds = %bb60
-       br label %cond_next67
-
-bb60.bb101_crit_edge:          ; preds = %bb60
-       br label %bb101.preheader
-
-cond_next67.bb101_crit_edge:           ; preds = %cond_next67
-       br label %bb101.preheader
-
-cond_next67.bb37_crit_edge:            ; preds = %cond_next67
-       br label %bb37
-
-cond_next67.bb37_crit_edge2:           ; preds = %cond_next67
-       br label %bb37
-
-cond_next67.bb37_crit_edge3:           ; preds = %cond_next67
-       br label %bb37
-
-cond_next67.bb37_crit_edge4:           ; preds = %cond_next67
-       br label %bb37
-
-cond_next67.bb37_crit_edge5:           ; preds = %cond_next67
-       br label %bb37
-
-cond_true148.cond_next67_crit_edge:            ; preds = %codeRepl
-       br label %cond_next67
-
-cond_next271.bb60_crit_edge:           ; preds = %codeRepl
-       br label %bb60.backedge
-
-cond_true290.bb60_crit_edge:           ; preds = %codeRepl
-       br label %bb60.backedge
-
-cond_true295.bb60_crit_edge:           ; preds = %codeRepl
-       br label %bb60.backedge
-
-Perl_newSV.exit.cond_next67_crit_edge:         ; preds = %codeRepl
-       br label %cond_next67
-
-bb101.preheader:               ; preds = %cond_next67.bb101_crit_edge, %bb60.bb101_crit_edge
-       %s_addr.27.3.ph = phi i8* [ %s_addr.27.2, %cond_next67.bb101_crit_edge ], [ %s_addr.2, %bb60.bb101_crit_edge ]          ; <i8*> [#uses=1]
-       br label %codeRepl
-
-bb60.backedge:         ; preds = %cond_true295.bb60_crit_edge, %cond_true290.bb60_crit_edge, %cond_next271.bb60_crit_edge, %cond_true50.bb60_crit_edge, %cond_true45.bb60_crit_edge, %bb37.bb60_crit_edge, %cond_true55
-       %s_addr.2.be = phi i8* [ %tmp43, %cond_true55 ], [ %tmp43, %bb37.bb60_crit_edge ], [ %tmp43, %cond_true45.bb60_crit_edge ], [ %tmp43, %cond_true50.bb60_crit_edge ], [ %tmp274.reload, %cond_next271.bb60_crit_edge ], [ %tmp274.reload, %cond_true290.bb60_crit_edge ], [ %tmp274.reload, %cond_true295.bb60_crit_edge ]               ; <i8*> [#uses=1]
-       br label %bb60
-}
-
-declare i16 @Perl_skipspace_bb60_bb101(i8*, i8**, i8**, i8**)
diff --git a/test/CodeGen/Generic/2007-04-27-BitTestsBadMask.ll b/test/CodeGen/Generic/2007-04-27-BitTestsBadMask.ll
deleted file mode 100644 (file)
index 3e8857f..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-; RUN: llc < %s -march=x86 | grep je | count 3
-; RUN: llc < %s -march=x86-64 | grep 4297064449
-; PR 1325+
-
-define i32 @foo(i8 %bar) {
-entry:
-       switch i8 %bar, label %bb1203 [
-                i8 117, label %bb1204
-                i8 85, label %bb1204
-                i8 106, label %bb1204
-       ]
-
-bb1203:                ; preds = %entry
-       ret i32 1
-
-bb1204:                ; preds = %entry, %entry, %entry
-       ret i32 2
-}
index 533aa4a8d9b0820a6aa60491d9c326786fddc941..bb774b45d8ee7daae8c0ea820a50759694756664 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: llc < %s -enable-eh -march=x86
+; RUN: llc < %s -enable-eh
 
        %struct.exception = type { i8, i8, i32, i8*, i8*, i32, i8* }
 @program_error = external global %struct.exception             ; <%struct.exception*> [#uses=1]
diff --git a/test/CodeGen/Generic/SwitchLowering.ll b/test/CodeGen/Generic/SwitchLowering.ll
deleted file mode 100644 (file)
index 29a0e82..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-; RUN: llc < %s -march=x86 | grep cmp | count 1
-; PR964
-
-define i8* @FindChar(i8* %CurPtr) {
-entry:
-        br label %bb
-
-bb:             ; preds = %bb, %entry
-        %indvar = phi i32 [ 0, %entry ], [ %indvar.next, %bb ]          ; <i32> [#uses=3]
-        %CurPtr_addr.0.rec = bitcast i32 %indvar to i32         ; <i32> [#uses=1]
-        %gep.upgrd.1 = zext i32 %indvar to i64          ; <i64> [#uses=1]
-        %CurPtr_addr.0 = getelementptr i8* %CurPtr, i64 %gep.upgrd.1            ; <i8*> [#uses=1]
-        %tmp = load i8* %CurPtr_addr.0          ; <i8> [#uses=3]
-        %tmp2.rec = add i32 %CurPtr_addr.0.rec, 1               ; <i32> [#uses=1]
-        %tmp2 = getelementptr i8* %CurPtr, i32 %tmp2.rec                ; <i8*> [#uses=1]
-        %indvar.next = add i32 %indvar, 1               ; <i32> [#uses=1]
-        switch i8 %tmp, label %bb [
-                 i8 0, label %bb7
-                 i8 120, label %bb7
-        ]
-
-bb7:            ; preds = %bb, %bb
-        tail call void @foo( i8 %tmp )
-        ret i8* %tmp2
-}
-
-declare void @foo(i8)
-
diff --git a/test/CodeGen/Generic/phi-immediate-factoring.ll b/test/CodeGen/Generic/phi-immediate-factoring.ll
deleted file mode 100644 (file)
index 9f9f921..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-; PR1296
-; RUN: llc < %s -march=x86 | grep {movl        \$1} | count 1
-
-target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64"
-target triple = "i686-apple-darwin8"
-
-define i32 @foo(i32 %A, i32 %B, i32 %C) {
-entry:
-       switch i32 %A, label %out [
-                i32 1, label %bb
-                i32 0, label %bb13
-                i32 2, label %bb35
-       ]
-
-bb:            ; preds = %cond_next, %entry
-       %i.144.1 = phi i32 [ 0, %entry ], [ %tmp7, %cond_next ]         ; <i32> [#uses=2]
-       %tmp4 = and i32 %i.144.1, %B            ; <i32> [#uses=1]
-       icmp eq i32 %tmp4, 0            ; <i1>:0 [#uses=1]
-       br i1 %0, label %cond_next, label %out
-
-cond_next:             ; preds = %bb
-       %tmp7 = add i32 %i.144.1, 1             ; <i32> [#uses=2]
-       icmp slt i32 %tmp7, 1000                ; <i1>:1 [#uses=1]
-       br i1 %1, label %bb, label %out
-
-bb13:          ; preds = %cond_next18, %entry
-       %i.248.1 = phi i32 [ 0, %entry ], [ %tmp20, %cond_next18 ]              ; <i32> [#uses=2]
-       %tmp16 = and i32 %i.248.1, %C           ; <i32> [#uses=1]
-       icmp eq i32 %tmp16, 0           ; <i1>:2 [#uses=1]
-       br i1 %2, label %cond_next18, label %out
-
-cond_next18:           ; preds = %bb13
-       %tmp20 = add i32 %i.248.1, 1            ; <i32> [#uses=2]
-       icmp slt i32 %tmp20, 1000               ; <i1>:3 [#uses=1]
-       br i1 %3, label %bb13, label %out
-
-bb27:          ; preds = %bb35
-       %tmp30 = and i32 %i.3, %C               ; <i32> [#uses=1]
-       icmp eq i32 %tmp30, 0           ; <i1>:4 [#uses=1]
-       br i1 %4, label %cond_next32, label %out
-
-cond_next32:           ; preds = %bb27
-       %indvar.next = add i32 %i.3, 1          ; <i32> [#uses=1]
-       br label %bb35
-
-bb35:          ; preds = %entry, %cond_next32
-       %i.3 = phi i32 [ %indvar.next, %cond_next32 ], [ 0, %entry ]            ; <i32> [#uses=3]
-       icmp slt i32 %i.3, 1000         ; <i1>:5 [#uses=1]
-       br i1 %5, label %bb27, label %out
-
-out:           ; preds = %bb27, %bb35, %bb13, %cond_next18, %bb, %cond_next, %entry
-       %result.0 = phi i32 [ 0, %entry ], [ 1, %bb ], [ 0, %cond_next ], [ 1, %bb13 ], [ 0, %cond_next18 ], [ 1, %bb27 ], [ 0, %bb35 ]         ; <i32> [#uses=1]
-       ret i32 %result.0
-}
diff --git a/test/CodeGen/Generic/switch-crit-edge-constant.ll b/test/CodeGen/Generic/switch-crit-edge-constant.ll
deleted file mode 100644 (file)
index 1f2ab0d..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-; PR925
-; RUN: llc < %s -march=x86 | \
-; RUN:   grep mov.*str1 | count 1
-
-target datalayout = "e-p:32:32"
-target triple = "i686-apple-darwin8.7.2"
-@str1 = internal constant [5 x i8] c"bonk\00"          ; <[5 x i8]*> [#uses=1]
-@str2 = internal constant [5 x i8] c"bork\00"          ; <[5 x i8]*> [#uses=1]
-@str = internal constant [8 x i8] c"perfwap\00"                ; <[8 x i8]*> [#uses=1]
-
-define void @foo(i32 %C) {
-entry:
-       switch i32 %C, label %bb2 [
-                i32 1, label %blahaha
-                i32 2, label %blahaha
-                i32 3, label %blahaha
-                i32 4, label %blahaha
-                i32 5, label %blahaha
-                i32 6, label %blahaha
-                i32 7, label %blahaha
-                i32 8, label %blahaha
-                i32 9, label %blahaha
-                i32 10, label %blahaha
-       ]
-
-bb2:           ; preds = %entry
-       %tmp5 = and i32 %C, 123         ; <i32> [#uses=1]
-       %tmp = icmp eq i32 %tmp5, 0             ; <i1> [#uses=1]
-       br i1 %tmp, label %blahaha, label %cond_true
-
-cond_true:             ; preds = %bb2
-       br label %blahaha
-
-blahaha:               ; preds = %cond_true, %bb2, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry
-       %s.0 = phi i8* [ getelementptr ([8 x i8]* @str, i32 0, i64 0), %cond_true ], [ getelementptr ([5 x i8]* @str1, i32 0, i64 0), %entry ], [ getelementptr ([5 x i8]* @str1, i32 0, i64 0), %entry ], [ getelementptr ([5 x i8]* @str1, i32 0, i64 0), %entry ], [ getelementptr ([5 x i8]* @str1, i32 0, i64 0), %entry ], [ getelementptr ([5 x i8]* @str1, i32 0, i64 0), %entry ], [ getelementptr ([5 x i8]* @str1, i32 0, i64 0), %entry ], [ getelementptr ([5 x i8]* @str1, i32 0, i64 0), %entry ], [ getelementptr ([5 x i8]* @str1, i32 0, i64 0), %entry ], [ getelementptr ([5 x i8]* @str1, i32 0, i64 0), %entry ], [ getelementptr ([5 x i8]* @str1, i32 0, i64 0), %entry ], [ getelementptr ([5 x i8]* @str2, i32 0, i64 0), %bb2 ]              ; <i8*> [#uses=13]
-       %tmp8 = tail call i32 (i8*, ...)* @printf( i8* %s.0 )           ; <i32> [#uses=0]
-       %tmp10 = tail call i32 (i8*, ...)* @printf( i8* %s.0 )          ; <i32> [#uses=0]
-       %tmp12 = tail call i32 (i8*, ...)* @printf( i8* %s.0 )          ; <i32> [#uses=0]
-       %tmp14 = tail call i32 (i8*, ...)* @printf( i8* %s.0 )          ; <i32> [#uses=0]
-       %tmp16 = tail call i32 (i8*, ...)* @printf( i8* %s.0 )          ; <i32> [#uses=0]
-       %tmp18 = tail call i32 (i8*, ...)* @printf( i8* %s.0 )          ; <i32> [#uses=0]
-       %tmp20 = tail call i32 (i8*, ...)* @printf( i8* %s.0 )          ; <i32> [#uses=0]
-       %tmp22 = tail call i32 (i8*, ...)* @printf( i8* %s.0 )          ; <i32> [#uses=0]
-       %tmp24 = tail call i32 (i8*, ...)* @printf( i8* %s.0 )          ; <i32> [#uses=0]
-       %tmp26 = tail call i32 (i8*, ...)* @printf( i8* %s.0 )          ; <i32> [#uses=0]
-       %tmp28 = tail call i32 (i8*, ...)* @printf( i8* %s.0 )          ; <i32> [#uses=0]
-       %tmp30 = tail call i32 (i8*, ...)* @printf( i8* %s.0 )          ; <i32> [#uses=0]
-       %tmp32 = tail call i32 (i8*, ...)* @printf( i8* %s.0 )          ; <i32> [#uses=0]
-       ret void
-}
-
-declare i32 @printf(i8*, ...)
diff --git a/test/CodeGen/X86/2006-12-16-InlineAsmCrash.ll b/test/CodeGen/X86/2006-12-16-InlineAsmCrash.ll
new file mode 100644 (file)
index 0000000..50a244b
--- /dev/null
@@ -0,0 +1,30 @@
+; RUN: llc < %s -march=x86
+; PR1049
+target datalayout = "e-p:32:32"
+target triple = "i686-pc-linux-gnu"
+       %struct.QBasicAtomic = type { i32 }
+       %struct.QByteArray = type { %"struct.QByteArray::Data"* }
+       %"struct.QByteArray::Data" = type { %struct.QBasicAtomic, i32, i32, i8*, [1 x i8] }
+       %struct.QFactoryLoader = type { %struct.QObject }
+       %struct.QImageIOHandler = type { i32 (...)**, %struct.QImageIOHandlerPrivate* }
+       %struct.QImageIOHandlerPrivate = type opaque
+       %struct.QImageWriter = type { %struct.QImageWriterPrivate* }
+       %struct.QImageWriterPrivate = type { %struct.QByteArray, %struct.QFactoryLoader*, i1, %struct.QImageIOHandler*, i32, float, %struct.QString, %struct.QString, i32, %struct.QString, %struct.QImageWriter* }
+       %"struct.QList<QByteArray>" = type { %"struct.QList<QByteArray>::._20" }
+       %"struct.QList<QByteArray>::._20" = type { %struct.QListData }
+       %struct.QListData = type { %"struct.QListData::Data"* }
+       %"struct.QListData::Data" = type { %struct.QBasicAtomic, i32, i32, i32, i8, [1 x i8*] }
+       %struct.QObject = type { i32 (...)**, %struct.QObjectData* }
+       %struct.QObjectData = type { i32 (...)**, %struct.QObject*, %struct.QObject*, %"struct.QList<QByteArray>", i8, [3 x i8], i32, i32 }
+       %struct.QString = type { %"struct.QString::Data"* }
+       %"struct.QString::Data" = type { %struct.QBasicAtomic, i32, i32, i16*, i8, i8, [1 x i16] }
+
+define i1 @_ZNK12QImageWriter8canWriteEv() {
+       %tmp62 = load %struct.QImageWriterPrivate** null                ; <%struct.QImageWriterPrivate*> [#uses=1]
+       %tmp = getelementptr %struct.QImageWriterPrivate* %tmp62, i32 0, i32 9          ; <%struct.QString*> [#uses=1]
+       %tmp75 = call %struct.QString* @_ZN7QStringaSERKS_( %struct.QString* %tmp, %struct.QString* null )              ; <%struct.QString*> [#uses=0]
+       call void asm sideeffect "lock\0Adecl $0\0Asetne 1", "=*m"( i32* null )
+       ret i1 false
+}
+
+declare %struct.QString* @_ZN7QStringaSERKS_(%struct.QString*, %struct.QString*)
diff --git a/test/CodeGen/X86/2007-02-23-DAGCombine-Miscompile.ll b/test/CodeGen/X86/2007-02-23-DAGCombine-Miscompile.ll
new file mode 100644 (file)
index 0000000..a8f0e57
--- /dev/null
@@ -0,0 +1,13 @@
+; PR1219
+; RUN: llc < %s -march=x86 | grep {movl        \$1, %eax}
+
+define i32 @test(i1 %X) {
+old_entry1:
+        %hvar2 = zext i1 %X to i32
+       %C = icmp sgt i32 %hvar2, -1
+       br i1 %C, label %cond_true15, label %cond_true
+cond_true15:
+        ret i32 1
+cond_true:
+        ret i32 2
+}
diff --git a/test/CodeGen/X86/SwitchLowering.ll b/test/CodeGen/X86/SwitchLowering.ll
new file mode 100644 (file)
index 0000000..29a0e82
--- /dev/null
@@ -0,0 +1,28 @@
+; RUN: llc < %s -march=x86 | grep cmp | count 1
+; PR964
+
+define i8* @FindChar(i8* %CurPtr) {
+entry:
+        br label %bb
+
+bb:             ; preds = %bb, %entry
+        %indvar = phi i32 [ 0, %entry ], [ %indvar.next, %bb ]          ; <i32> [#uses=3]
+        %CurPtr_addr.0.rec = bitcast i32 %indvar to i32         ; <i32> [#uses=1]
+        %gep.upgrd.1 = zext i32 %indvar to i64          ; <i64> [#uses=1]
+        %CurPtr_addr.0 = getelementptr i8* %CurPtr, i64 %gep.upgrd.1            ; <i8*> [#uses=1]
+        %tmp = load i8* %CurPtr_addr.0          ; <i8> [#uses=3]
+        %tmp2.rec = add i32 %CurPtr_addr.0.rec, 1               ; <i32> [#uses=1]
+        %tmp2 = getelementptr i8* %CurPtr, i32 %tmp2.rec                ; <i8*> [#uses=1]
+        %indvar.next = add i32 %indvar, 1               ; <i32> [#uses=1]
+        switch i8 %tmp, label %bb [
+                 i8 0, label %bb7
+                 i8 120, label %bb7
+        ]
+
+bb7:            ; preds = %bb, %bb
+        tail call void @foo( i8 %tmp )
+        ret i8* %tmp2
+}
+
+declare void @foo(i8)
+
diff --git a/test/CodeGen/X86/phi-immediate-factoring.ll b/test/CodeGen/X86/phi-immediate-factoring.ll
new file mode 100644 (file)
index 0000000..9f9f921
--- /dev/null
@@ -0,0 +1,54 @@
+; PR1296
+; RUN: llc < %s -march=x86 | grep {movl        \$1} | count 1
+
+target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64"
+target triple = "i686-apple-darwin8"
+
+define i32 @foo(i32 %A, i32 %B, i32 %C) {
+entry:
+       switch i32 %A, label %out [
+                i32 1, label %bb
+                i32 0, label %bb13
+                i32 2, label %bb35
+       ]
+
+bb:            ; preds = %cond_next, %entry
+       %i.144.1 = phi i32 [ 0, %entry ], [ %tmp7, %cond_next ]         ; <i32> [#uses=2]
+       %tmp4 = and i32 %i.144.1, %B            ; <i32> [#uses=1]
+       icmp eq i32 %tmp4, 0            ; <i1>:0 [#uses=1]
+       br i1 %0, label %cond_next, label %out
+
+cond_next:             ; preds = %bb
+       %tmp7 = add i32 %i.144.1, 1             ; <i32> [#uses=2]
+       icmp slt i32 %tmp7, 1000                ; <i1>:1 [#uses=1]
+       br i1 %1, label %bb, label %out
+
+bb13:          ; preds = %cond_next18, %entry
+       %i.248.1 = phi i32 [ 0, %entry ], [ %tmp20, %cond_next18 ]              ; <i32> [#uses=2]
+       %tmp16 = and i32 %i.248.1, %C           ; <i32> [#uses=1]
+       icmp eq i32 %tmp16, 0           ; <i1>:2 [#uses=1]
+       br i1 %2, label %cond_next18, label %out
+
+cond_next18:           ; preds = %bb13
+       %tmp20 = add i32 %i.248.1, 1            ; <i32> [#uses=2]
+       icmp slt i32 %tmp20, 1000               ; <i1>:3 [#uses=1]
+       br i1 %3, label %bb13, label %out
+
+bb27:          ; preds = %bb35
+       %tmp30 = and i32 %i.3, %C               ; <i32> [#uses=1]
+       icmp eq i32 %tmp30, 0           ; <i1>:4 [#uses=1]
+       br i1 %4, label %cond_next32, label %out
+
+cond_next32:           ; preds = %bb27
+       %indvar.next = add i32 %i.3, 1          ; <i32> [#uses=1]
+       br label %bb35
+
+bb35:          ; preds = %entry, %cond_next32
+       %i.3 = phi i32 [ %indvar.next, %cond_next32 ], [ 0, %entry ]            ; <i32> [#uses=3]
+       icmp slt i32 %i.3, 1000         ; <i1>:5 [#uses=1]
+       br i1 %5, label %bb27, label %out
+
+out:           ; preds = %bb27, %bb35, %bb13, %cond_next18, %bb, %cond_next, %entry
+       %result.0 = phi i32 [ 0, %entry ], [ 1, %bb ], [ 0, %cond_next ], [ 1, %bb13 ], [ 0, %cond_next18 ], [ 1, %bb27 ], [ 0, %bb35 ]         ; <i32> [#uses=1]
+       ret i32 %result.0
+}
diff --git a/test/CodeGen/X86/switch-crit-edge-constant.ll b/test/CodeGen/X86/switch-crit-edge-constant.ll
new file mode 100644 (file)
index 0000000..1f2ab0d
--- /dev/null
@@ -0,0 +1,52 @@
+; PR925
+; RUN: llc < %s -march=x86 | \
+; RUN:   grep mov.*str1 | count 1
+
+target datalayout = "e-p:32:32"
+target triple = "i686-apple-darwin8.7.2"
+@str1 = internal constant [5 x i8] c"bonk\00"          ; <[5 x i8]*> [#uses=1]
+@str2 = internal constant [5 x i8] c"bork\00"          ; <[5 x i8]*> [#uses=1]
+@str = internal constant [8 x i8] c"perfwap\00"                ; <[8 x i8]*> [#uses=1]
+
+define void @foo(i32 %C) {
+entry:
+       switch i32 %C, label %bb2 [
+                i32 1, label %blahaha
+                i32 2, label %blahaha
+                i32 3, label %blahaha
+                i32 4, label %blahaha
+                i32 5, label %blahaha
+                i32 6, label %blahaha
+                i32 7, label %blahaha
+                i32 8, label %blahaha
+                i32 9, label %blahaha
+                i32 10, label %blahaha
+       ]
+
+bb2:           ; preds = %entry
+       %tmp5 = and i32 %C, 123         ; <i32> [#uses=1]
+       %tmp = icmp eq i32 %tmp5, 0             ; <i1> [#uses=1]
+       br i1 %tmp, label %blahaha, label %cond_true
+
+cond_true:             ; preds = %bb2
+       br label %blahaha
+
+blahaha:               ; preds = %cond_true, %bb2, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry
+       %s.0 = phi i8* [ getelementptr ([8 x i8]* @str, i32 0, i64 0), %cond_true ], [ getelementptr ([5 x i8]* @str1, i32 0, i64 0), %entry ], [ getelementptr ([5 x i8]* @str1, i32 0, i64 0), %entry ], [ getelementptr ([5 x i8]* @str1, i32 0, i64 0), %entry ], [ getelementptr ([5 x i8]* @str1, i32 0, i64 0), %entry ], [ getelementptr ([5 x i8]* @str1, i32 0, i64 0), %entry ], [ getelementptr ([5 x i8]* @str1, i32 0, i64 0), %entry ], [ getelementptr ([5 x i8]* @str1, i32 0, i64 0), %entry ], [ getelementptr ([5 x i8]* @str1, i32 0, i64 0), %entry ], [ getelementptr ([5 x i8]* @str1, i32 0, i64 0), %entry ], [ getelementptr ([5 x i8]* @str1, i32 0, i64 0), %entry ], [ getelementptr ([5 x i8]* @str2, i32 0, i64 0), %bb2 ]              ; <i8*> [#uses=13]
+       %tmp8 = tail call i32 (i8*, ...)* @printf( i8* %s.0 )           ; <i32> [#uses=0]
+       %tmp10 = tail call i32 (i8*, ...)* @printf( i8* %s.0 )          ; <i32> [#uses=0]
+       %tmp12 = tail call i32 (i8*, ...)* @printf( i8* %s.0 )          ; <i32> [#uses=0]
+       %tmp14 = tail call i32 (i8*, ...)* @printf( i8* %s.0 )          ; <i32> [#uses=0]
+       %tmp16 = tail call i32 (i8*, ...)* @printf( i8* %s.0 )          ; <i32> [#uses=0]
+       %tmp18 = tail call i32 (i8*, ...)* @printf( i8* %s.0 )          ; <i32> [#uses=0]
+       %tmp20 = tail call i32 (i8*, ...)* @printf( i8* %s.0 )          ; <i32> [#uses=0]
+       %tmp22 = tail call i32 (i8*, ...)* @printf( i8* %s.0 )          ; <i32> [#uses=0]
+       %tmp24 = tail call i32 (i8*, ...)* @printf( i8* %s.0 )          ; <i32> [#uses=0]
+       %tmp26 = tail call i32 (i8*, ...)* @printf( i8* %s.0 )          ; <i32> [#uses=0]
+       %tmp28 = tail call i32 (i8*, ...)* @printf( i8* %s.0 )          ; <i32> [#uses=0]
+       %tmp30 = tail call i32 (i8*, ...)* @printf( i8* %s.0 )          ; <i32> [#uses=0]
+       %tmp32 = tail call i32 (i8*, ...)* @printf( i8* %s.0 )          ; <i32> [#uses=0]
+       ret void
+}
+
+declare i32 @printf(i8*, ...)