From 7a1b9bdd2b837b15c9213cdaf89cacc977e4600e Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 17 Jun 2011 06:36:20 +0000 Subject: Remove support for using "foo" as symbols instead of %"foo". This is ancient syntax and has been long obsolete. As usual, updating the tests is the nasty part of this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133242 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/Analysis/BasicAA/2004-12-08-BasicAACrash.ll | 22 ---------------------- test/Analysis/BasicAA/2004-12-08-BasicAACrash2.ll | 20 -------------------- .../ScalarEvolution/SolveQuadraticEquation.ll | 2 +- test/Analysis/ScalarEvolution/trip-count.ll | 1 - test/Analysis/ScalarEvolution/trip-count2.ll | 1 - test/CodeGen/ARM/2007-05-07-tailmerge-1.ll | 1 - test/CodeGen/ARM/2007-05-09-tailmerge-2.ll | 1 - test/CodeGen/ARM/2007-05-22-tailmerge-3.ll | 1 - test/CodeGen/ARM/vargs_align.ll | 1 - .../Generic/2007-04-30-LandingPadBranchFolding.ll | 12 ++++++------ test/CodeGen/PowerPC/2007-01-15-AsmDialect.ll | 1 - test/CodeGen/PowerPC/2007-05-22-tailmerge-3.ll | 1 - test/CodeGen/X86/2007-03-16-InlineAsm.ll | 1 - test/CodeGen/X86/mmx-shuffle.ll | 8 ++++---- test/Transforms/InstCombine/call2.ll | 2 -- test/Transforms/LoopRotate/PhiRename-1.ll | 1 - 16 files changed, 11 insertions(+), 65 deletions(-) delete mode 100644 test/Analysis/BasicAA/2004-12-08-BasicAACrash.ll delete mode 100644 test/Analysis/BasicAA/2004-12-08-BasicAACrash2.ll (limited to 'test') diff --git a/test/Analysis/BasicAA/2004-12-08-BasicAACrash.ll b/test/Analysis/BasicAA/2004-12-08-BasicAACrash.ll deleted file mode 100644 index 50fb222..0000000 --- a/test/Analysis/BasicAA/2004-12-08-BasicAACrash.ll +++ /dev/null @@ -1,22 +0,0 @@ -; RUN: opt < %s -basicaa -licm - -%"java/lang/Object" = type { %struct.llvm_java_object_base } -%"java/lang/StringBuffer" = type { "java/lang/Object", i32, { "java/lang/Object", i32, [0 x i8] }*, i1 } -%struct.llvm_java_object_base = type opaque - -define void @"java/lang/StringBuffer/setLength(I)V"(%struct.llvm_java_object_base*) { -bc0: - br i1 false, label %bc40, label %bc65 - -bc65: ; preds = %bc0, %bc40 - ret void - -bc40: ; preds = %bc0, %bc40 - %tmp75 = bitcast %struct.llvm_java_object_base* %0 to %"java/lang/StringBuffer"* ; <"java/lang/StringBuffer"*> [#uses=1] - %tmp76 = getelementptr %"java/lang/StringBuffer"* %tmp75, i32 0, i32 1 ; [#uses=1] - store i32 0, i32* %tmp76 - %tmp381 = bitcast %struct.llvm_java_object_base* %0 to %"java/lang/StringBuffer"* ; <"java/lang/StringBuffer"*> [#uses=1] - %tmp392 = getelementptr %"java/lang/StringBuffer"* %tmp381, i32 0, i32 1 ; [#uses=1] - %tmp403 = load i32* %tmp392 ; [#uses=0] - br i1 false, label %bc40, label %bc65 -} diff --git a/test/Analysis/BasicAA/2004-12-08-BasicAACrash2.ll b/test/Analysis/BasicAA/2004-12-08-BasicAACrash2.ll deleted file mode 100644 index cc84314..0000000 --- a/test/Analysis/BasicAA/2004-12-08-BasicAACrash2.ll +++ /dev/null @@ -1,20 +0,0 @@ -; RUN: opt < %s -basicaa -dse - -%"java/lang/Object" = type { %struct.llvm_java_object_base } -%"java/lang/StringBuffer" = type { "java/lang/Object", i32, { "java/lang/Object", i32, [0 x i8] }*, i1 } -%struct.llvm_java_object_base = type opaque - -define void @"java/lang/StringBuffer/ensureCapacity_unsynchronized(I)V"() { -bc0: - %tmp = getelementptr %"java/lang/StringBuffer"* null, i32 0, i32 3 ; [#uses=1] - br i1 false, label %bc16, label %bc7 - -bc16: ; preds = %bc0 - %tmp91 = getelementptr %"java/lang/StringBuffer"* null, i32 0, i32 2 ; <{ "java/lang/Object", i32, [0 x i8] }**> [#uses=1] - store { %"java/lang/Object", i32, [0 x i8] }* null, { %"java/lang/Object", i32, [0 x i8] }** %tmp91 - store i1 false, i1* %tmp - ret void - -bc7: ; preds = %bc0 - ret void -} diff --git a/test/Analysis/ScalarEvolution/SolveQuadraticEquation.ll b/test/Analysis/ScalarEvolution/SolveQuadraticEquation.ll index 9573aed..ec95141 100644 --- a/test/Analysis/ScalarEvolution/SolveQuadraticEquation.ll +++ b/test/Analysis/ScalarEvolution/SolveQuadraticEquation.ll @@ -7,7 +7,7 @@ define void @test(i32 %N) { entry: - "alloca point" = bitcast i32 0 to i32 ; [#uses=0] + %"alloca point" = bitcast i32 0 to i32 ; [#uses=0] br label %bb3 bb: ; preds = %bb3 diff --git a/test/Analysis/ScalarEvolution/trip-count.ll b/test/Analysis/ScalarEvolution/trip-count.ll index d750d4a..cb4e267 100644 --- a/test/Analysis/ScalarEvolution/trip-count.ll +++ b/test/Analysis/ScalarEvolution/trip-count.ll @@ -7,7 +7,6 @@ define void @test(i32 %N) { entry: - "alloca point" = bitcast i32 0 to i32 ; [#uses=0] br label %bb3 bb: ; preds = %bb3 diff --git a/test/Analysis/ScalarEvolution/trip-count2.ll b/test/Analysis/ScalarEvolution/trip-count2.ll index 79f3161..e26cbea 100644 --- a/test/Analysis/ScalarEvolution/trip-count2.ll +++ b/test/Analysis/ScalarEvolution/trip-count2.ll @@ -7,7 +7,6 @@ define void @test(i32 %N) { entry: - "alloca point" = bitcast i32 0 to i32 ; [#uses=0] br label %bb3 bb: ; preds = %bb3 diff --git a/test/CodeGen/ARM/2007-05-07-tailmerge-1.ll b/test/CodeGen/ARM/2007-05-07-tailmerge-1.ll index 52937c1..55cea3a 100644 --- a/test/CodeGen/ARM/2007-05-07-tailmerge-1.ll +++ b/test/CodeGen/ARM/2007-05-07-tailmerge-1.ll @@ -12,7 +12,6 @@ entry: %i_addr = alloca i32 ; [#uses=2] %q_addr = alloca i32 ; [#uses=2] %retval = alloca i32, align 4 ; [#uses=1] - "alloca point" = bitcast i32 0 to i32 ; [#uses=0] store i32 %i, i32* %i_addr store i32 %q, i32* %q_addr %tmp = load i32* %i_addr ; [#uses=1] diff --git a/test/CodeGen/ARM/2007-05-09-tailmerge-2.ll b/test/CodeGen/ARM/2007-05-09-tailmerge-2.ll index c925fa8..4894116 100644 --- a/test/CodeGen/ARM/2007-05-09-tailmerge-2.ll +++ b/test/CodeGen/ARM/2007-05-09-tailmerge-2.ll @@ -12,7 +12,6 @@ entry: %i_addr = alloca i32 ; [#uses=2] %q_addr = alloca i32 ; [#uses=2] %retval = alloca i32, align 4 ; [#uses=1] - "alloca point" = bitcast i32 0 to i32 ; [#uses=0] store i32 %i, i32* %i_addr store i32 %q, i32* %q_addr %tmp = load i32* %i_addr ; [#uses=1] diff --git a/test/CodeGen/ARM/2007-05-22-tailmerge-3.ll b/test/CodeGen/ARM/2007-05-22-tailmerge-3.ll index 9df5af5..acbab8a 100644 --- a/test/CodeGen/ARM/2007-05-22-tailmerge-3.ll +++ b/test/CodeGen/ARM/2007-05-22-tailmerge-3.ll @@ -14,7 +14,6 @@ entry: %i_addr = alloca i32 ; [#uses=2] %q_addr = alloca i32 ; [#uses=2] %retval = alloca i32, align 4 ; [#uses=1] - "alloca point" = bitcast i32 0 to i32 ; [#uses=0] store i32 %i, i32* %i_addr store i32 %q, i32* %q_addr %tmp = load i32* %i_addr ; [#uses=1] diff --git a/test/CodeGen/ARM/vargs_align.ll b/test/CodeGen/ARM/vargs_align.ll index e4ef9e3..e390cf0 100644 --- a/test/CodeGen/ARM/vargs_align.ll +++ b/test/CodeGen/ARM/vargs_align.ll @@ -6,7 +6,6 @@ entry: %a_addr = alloca i32 ; [#uses=1] %retval = alloca i32, align 4 ; [#uses=2] %tmp = alloca i32, align 4 ; [#uses=2] - "alloca point" = bitcast i32 0 to i32 ; [#uses=0] store i32 %a, i32* %a_addr store i32 0, i32* %tmp %tmp1 = load i32* %tmp ; [#uses=1] diff --git a/test/CodeGen/Generic/2007-04-30-LandingPadBranchFolding.ll b/test/CodeGen/Generic/2007-04-30-LandingPadBranchFolding.ll index 568b88f..2a2cf6c 100644 --- a/test/CodeGen/Generic/2007-04-30-LandingPadBranchFolding.ll +++ b/test/CodeGen/Generic/2007-04-30-LandingPadBranchFolding.ll @@ -1,13 +1,13 @@ ; RUN: llc < %s ; PR1228 - "struct.std::basic_string,std::allocator >::_Alloc_hider" = type { i8* } - "struct.std::locale" = type { "struct.std::locale::_Impl"* } - "struct.std::locale::_Impl" = type { i32, "struct.std::locale::facet"**, i32, "struct.std::locale::facet"**, i8** } - "struct.std::locale::facet" = type { i32 (...)**, i32 } - "struct.std::string" = type { "struct.std::basic_string,std::allocator >::_Alloc_hider" } + %"struct.std::basic_string,std::allocator >::_Alloc_hider" = type { i8* } + %"struct.std::locale" = type { %"struct.std::locale::_Impl"* } + %"struct.std::locale::_Impl" = type { i32, %"struct.std::locale::facet"**, i32, %"struct.std::locale::facet"**, i8** } + %"struct.std::locale::facet" = type { i32 (...)**, i32 } + %"struct.std::string" = type { %"struct.std::basic_string,std::allocator >::_Alloc_hider" } -define void @_ZNKSt6locale4nameEv("struct.std::string"* %agg.result) { +define void @_ZNKSt6locale4nameEv(%"struct.std::string"* %agg.result) { entry: %tmp105 = icmp eq i8* null, null ; [#uses=1] br i1 %tmp105, label %cond_true, label %cond_true222 diff --git a/test/CodeGen/PowerPC/2007-01-15-AsmDialect.ll b/test/CodeGen/PowerPC/2007-01-15-AsmDialect.ll index 7b00ac6..c779288 100644 --- a/test/CodeGen/PowerPC/2007-01-15-AsmDialect.ll +++ b/test/CodeGen/PowerPC/2007-01-15-AsmDialect.ll @@ -7,7 +7,6 @@ entry: %temp = alloca i32, align 4 ; [#uses=2] %ctz_x = alloca i32, align 4 ; [#uses=3] %ctz_c = alloca i32, align 4 ; [#uses=2] - "alloca point" = bitcast i32 0 to i32 ; [#uses=0] store i32 61440, i32* %ctz_x %tmp = load i32* %ctz_x ; [#uses=1] %tmp1 = sub i32 0, %tmp ; [#uses=1] diff --git a/test/CodeGen/PowerPC/2007-05-22-tailmerge-3.ll b/test/CodeGen/PowerPC/2007-05-22-tailmerge-3.ll index 42f2152..c141551 100644 --- a/test/CodeGen/PowerPC/2007-05-22-tailmerge-3.ll +++ b/test/CodeGen/PowerPC/2007-05-22-tailmerge-3.ll @@ -13,7 +13,6 @@ entry: %i_addr = alloca i32 ; [#uses=2] %q_addr = alloca i32 ; [#uses=2] %retval = alloca i32, align 4 ; [#uses=1] - "alloca point" = bitcast i32 0 to i32 ; [#uses=0] store i32 %i, i32* %i_addr store i32 %q, i32* %q_addr %tmp = load i32* %i_addr ; [#uses=1] diff --git a/test/CodeGen/X86/2007-03-16-InlineAsm.ll b/test/CodeGen/X86/2007-03-16-InlineAsm.ll index 9580726..3bd6d59 100644 --- a/test/CodeGen/X86/2007-03-16-InlineAsm.ll +++ b/test/CodeGen/X86/2007-03-16-InlineAsm.ll @@ -9,7 +9,6 @@ entry: %retval = alloca i32, align 4 ; [#uses=2] %tmp = alloca i32, align 4 ; [#uses=2] %ret = alloca i32, align 4 ; [#uses=2] - "alloca point" = bitcast i32 0 to i32 ; [#uses=0] store i32 %A, i32* %A_addr store i32 %B, i32* %B_addr %tmp1 = load i32* %A_addr ; [#uses=1] diff --git a/test/CodeGen/X86/mmx-shuffle.ll b/test/CodeGen/X86/mmx-shuffle.ll index 9f7501e..869f32b 100644 --- a/test/CodeGen/X86/mmx-shuffle.ll +++ b/test/CodeGen/X86/mmx-shuffle.ll @@ -5,12 +5,12 @@ target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f3 target triple = "i686-pc-linux-gnu" %struct.DrawHelper = type { void (i32, %struct.QT_FT_Span*, i8*)*, void (i32, %struct.QT_FT_Span*, i8*)*, void (%struct.QRasterBuffer*, i32, i32, i32, i8*, i32, i32, i32)*, void (%struct.QRasterBuffer*, i32, i32, i32, i8*, i32, i32, i32)*, void (%struct.QRasterBuffer*, i32, i32, i32, i32, i32)* } %struct.QBasicAtomic = type { i32 } - %struct.QClipData = type { i32, "struct.QClipData::ClipLine"*, i32, i32, %struct.QT_FT_Span*, i32, i32, i32, i32 } - "struct.QClipData::ClipLine" = type { i32, %struct.QT_FT_Span* } + %struct.QClipData = type { i32, %"struct.QClipData::ClipLine"*, i32, i32, %struct.QT_FT_Span*, i32, i32, i32, i32 } + %"struct.QClipData::ClipLine" = type { i32, %struct.QT_FT_Span* } %struct.QRasterBuffer = type { %struct.QRect, %struct.QRegion, %struct.QClipData*, %struct.QClipData*, i8, i32, i32, %struct.DrawHelper*, i32, i32, i32, i8* } %struct.QRect = type { i32, i32, i32, i32 } - %struct.QRegion = type { "struct.QRegion::QRegionData"* } - "struct.QRegion::QRegionData" = type { %struct.QBasicAtomic, %struct._XRegion*, i8*, %struct.QRegionPrivate* } + %struct.QRegion = type { %"struct.QRegion::QRegionData"* } + %"struct.QRegion::QRegionData" = type { %struct.QBasicAtomic, %struct._XRegion*, i8*, %struct.QRegionPrivate* } %struct.QRegionPrivate = type opaque %struct.QT_FT_Span = type { i16, i16, i16, i8 } %struct._XRegion = type opaque diff --git a/test/Transforms/InstCombine/call2.ll b/test/Transforms/InstCombine/call2.ll index 3a6bd67..1f45c7a 100644 --- a/test/Transforms/InstCombine/call2.ll +++ b/test/Transforms/InstCombine/call2.ll @@ -4,7 +4,6 @@ define i32 @bar() { entry: %retval = alloca i32, align 4 ; [#uses=1] - "alloca point" = bitcast i32 0 to i32 ; [#uses=0] %tmp = call i32 (...)* bitcast (i32 (i8*)* @f to i32 (...)*)( double 3.000000e+00 ) ; [#uses=0] br label %return @@ -17,7 +16,6 @@ define i32 @f(i8* %p) { entry: %p_addr = alloca i8* ; [#uses=1] %retval = alloca i32, align 4 ; [#uses=1] - "alloca point" = bitcast i32 0 to i32 ; [#uses=0] store i8* %p, i8** %p_addr br label %return diff --git a/test/Transforms/LoopRotate/PhiRename-1.ll b/test/Transforms/LoopRotate/PhiRename-1.ll index 74426a8..9cb55b4 100644 --- a/test/Transforms/LoopRotate/PhiRename-1.ll +++ b/test/Transforms/LoopRotate/PhiRename-1.ll @@ -33,7 +33,6 @@ entry: %c = alloca i32, align 4 ; [#uses=4] %l = alloca %struct.list*, align 4 ; <%struct.list**> [#uses=5] %op = alloca %struct.operator*, align 4 ; <%struct.operator**> [#uses=3] - "alloca point" = bitcast i32 0 to i32 ; [#uses=0] store i32 %arity, i32* %arity_addr store i32 0, i32* %c %tmp1 = load %struct.list** @operators ; <%struct.list*> [#uses=1] -- cgit v1.1 From 6b7c89ee096146aefebc245c7d8741b69786655a Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 17 Jun 2011 06:42:57 +0000 Subject: stop accepting begin/end around function bodies in the .ll parser, this isn't pascal anymore. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133244 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/Integer/BitArith.ll | 25 ----- test/Integer/BitBit.ll | 24 ----- test/Integer/BitCast.ll | 26 ------ test/Integer/BitIcmp.ll | 43 --------- test/Integer/BitMisc.ll | 24 ----- test/Integer/cfgstructures_bt.ll | 56 ----------- test/Integer/forwardreftest_bt.ll | 33 ------- test/Integer/globalvars_bt.ll | 26 ------ test/Integer/indirectcall2_bt.ll | 24 ----- test/Integer/indirectcall_bt.ll | 52 ----------- test/Integer/prototype_bt.ll | 13 --- test/Integer/recursivetype_bt.ll | 108 ---------------------- test/Integer/simplecalltest_bt.ll | 28 ------ test/Integer/small_bt.ll | 13 --- test/Integer/testalloca_bt.ll | 28 ------ test/Integer/testarith_bt.ll | 21 ----- test/Integer/testconstants_bt.ll | 32 ------- test/Integer/testicmp_bt.ll | 23 ----- test/Integer/testlogical_bt.ll | 13 --- test/Integer/testlogical_new_bt.ll | 15 --- test/Integer/testswitch_bt.ll | 24 ----- test/Integer/testvarargs_bt.ll | 14 --- test/Transforms/ADCE/2002-01-31-UseStuckAround.ll | 6 +- test/Verifier/2002-04-13-RetTypes.ll | 5 +- 24 files changed, 4 insertions(+), 672 deletions(-) delete mode 100644 test/Integer/BitArith.ll delete mode 100644 test/Integer/BitBit.ll delete mode 100644 test/Integer/BitCast.ll delete mode 100644 test/Integer/BitIcmp.ll delete mode 100644 test/Integer/BitMisc.ll delete mode 100644 test/Integer/cfgstructures_bt.ll delete mode 100644 test/Integer/forwardreftest_bt.ll delete mode 100644 test/Integer/globalvars_bt.ll delete mode 100644 test/Integer/indirectcall2_bt.ll delete mode 100644 test/Integer/indirectcall_bt.ll delete mode 100644 test/Integer/prototype_bt.ll delete mode 100644 test/Integer/recursivetype_bt.ll delete mode 100644 test/Integer/simplecalltest_bt.ll delete mode 100644 test/Integer/small_bt.ll delete mode 100644 test/Integer/testalloca_bt.ll delete mode 100644 test/Integer/testarith_bt.ll delete mode 100644 test/Integer/testconstants_bt.ll delete mode 100644 test/Integer/testicmp_bt.ll delete mode 100644 test/Integer/testlogical_bt.ll delete mode 100644 test/Integer/testlogical_new_bt.ll delete mode 100644 test/Integer/testswitch_bt.ll delete mode 100644 test/Integer/testvarargs_bt.ll (limited to 'test') diff --git a/test/Integer/BitArith.ll b/test/Integer/BitArith.ll deleted file mode 100644 index 350a984..0000000 --- a/test/Integer/BitArith.ll +++ /dev/null @@ -1,25 +0,0 @@ -; RUN: llvm-as %s -o - | llvm-dis > %t1.ll -; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll -; RUN: diff %t1.ll %t2.ll - - -declare void @"foo"(i31 %i, i63 %j, i10 %k) - - -; foo test basic arith operations -define void @"foo"(i31 %i, i63 %j, i10 %k) -begin - %t1 = trunc i63 %j to i31 - %t2 = add i31 %t1, %i - %t20 = add i31 3, %t1 - %t3 = zext i31 %i to i63 - %t4 = sub i63 %t3, %j - %t40 = sub i63 %j, -100 - %t5 = mul i10 %k, 7 - %t6 = sdiv i63 %j, -2 - %t7 = udiv i63 %j, %t3 - %t8 = urem i10 %k, 10 - %t9 = srem i10 %k, -10 - ret void -end - diff --git a/test/Integer/BitBit.ll b/test/Integer/BitBit.ll deleted file mode 100644 index 420bbe5..0000000 --- a/test/Integer/BitBit.ll +++ /dev/null @@ -1,24 +0,0 @@ -; RUN: llvm-as %s -o - | llvm-dis > %t1.ll -; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll -; RUN: diff %t1.ll %t2.ll - -declare void @"foo"(i31 %i, i33 %j) - - -; foo test basic bitwise operations -define void @"foo"(i31 %i, i33 %j) -begin - %t1 = trunc i33 %j to i31 - %t2 = and i31 %t1, %i - %t3 = sext i31 %i to i33 - %t4 = or i33 %t3, %j - %t5 = xor i31 %t2, 7 - %t6 = shl i31 %i, 2 - %t7 = trunc i31 %i to i8 - %t8 = shl i8 %t7, 3 - %t9 = lshr i33 %j, 31 - %t7z = zext i8 %t7 to i33 - %t10 = ashr i33 %j, %t7z - ret void -end - diff --git a/test/Integer/BitCast.ll b/test/Integer/BitCast.ll deleted file mode 100644 index 0bef023..0000000 --- a/test/Integer/BitCast.ll +++ /dev/null @@ -1,26 +0,0 @@ -; RUN: llvm-as %s -o - | llvm-dis > %t1.ll -; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll -; RUN: diff %t1.ll %t2.ll - -declare void @"foo"(i31 %i, i1280 %j, i1 %k, float %f) - - -; foo test basic arith operations -define void @"foo"(i31 %i, i1280 %j, i1 %k, float %f) -begin - %t1 = trunc i1280 %j to i31 - %t2 = trunc i31 %t1 to i1 - - %t3 = zext i31 %i to i1280 - %t4 = sext i31 %i to i1280 - - %t5 = fptoui float 0x400921FA00000000 to i31 - %t6 = uitofp i31 %t5 to double - - %t7 = fptosi double 0xC0934A456D5CFAAD to i28 - %t8 = sitofp i8 -1 to double - %t9 = uitofp i8 255 to double - - ret void -end - diff --git a/test/Integer/BitIcmp.ll b/test/Integer/BitIcmp.ll deleted file mode 100644 index c224612..0000000 --- a/test/Integer/BitIcmp.ll +++ /dev/null @@ -1,43 +0,0 @@ -; RUN: llvm-as %s -o - | llvm-dis > %t1.ll -; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll -; RUN: diff %t1.ll %t2.ll - - -define i55 @"simpleIcmp"(i55 %i0, i55 %j0) -begin - %t1 = icmp eq i55 %i0, %j0 - %t2 = icmp ne i55 %i0, %j0 - %t3 = icmp ult i55 %i0, %j0 - %t4 = icmp sgt i55 %i0, %j0 - %t5 = icmp ule i55 %i0, %j0 - %t6 = icmp sge i55 %i0, %j0 - - %t7 = icmp eq i55 %i0, 1098765432 - %t8 = icmp ne i55 %i0, -31415926 - - %t9 = icmp ult i55 10000, %j0 - %t10 = icmp sgt i55 -10000, %j0 - - ret i55 %i0 -end - -define i31 @"phitest"(i12 %i) -begin - -HasArg: - %n1 = add i12 1, %i - br label %Continue - -Continue: - %n = phi i12 [%n1, %HasArg], [%next, %Continue] - %next = add i12 1, %n - br label %Continue -end - -define i18 @"select"(i18 %i) -begin - %t = icmp sgt i18 %i, 100 - %k = select i1 %t, i18 %i, i18 999 - ret i18 %k -end - diff --git a/test/Integer/BitMisc.ll b/test/Integer/BitMisc.ll deleted file mode 100644 index 8ce4d4a..0000000 --- a/test/Integer/BitMisc.ll +++ /dev/null @@ -1,24 +0,0 @@ -; RUN: llvm-as %s -o - | llvm-dis > %t1.ll -; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll -; RUN: diff %t1.ll %t2.ll - - -@MyVar = external global i19 -@MyIntList = external global { i39 *, i19 } - external global i19 ; i19*:0 - -@AConst = constant i19 -123 - -@AString = constant [4 x i8] c"test" - -@ZeroInit = global { [100 x i19 ], [40 x float ] } { [100 x i19] zeroinitializer, - [40 x float] zeroinitializer } - - -define i19 @"foo"(i19 %blah) -begin - store i19 5, i19* @MyVar - %idx = getelementptr { i39 *, i19 } * @MyIntList, i64 0, i32 1 - store i19 12, i19* %idx - ret i19 %blah -end diff --git a/test/Integer/cfgstructures_bt.ll b/test/Integer/cfgstructures_bt.ll deleted file mode 100644 index 09aec1f..0000000 --- a/test/Integer/cfgstructures_bt.ll +++ /dev/null @@ -1,56 +0,0 @@ -; RUN: llvm-as %s -o - | llvm-dis > %t1.ll -; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll -; RUN: diff %t1.ll %t2.ll - - -;; This is an irreducible flow graph - - -define void @"irreducible"(i1 %cond) -begin - br i1 %cond, label %X, label %Y - -X: - br label %Y -Y: - br label %X -end - -;; This is a pair of loops that share the same header - -define void @"sharedheader"(i1 %cond) -begin - br label %A -A: - br i1 %cond, label %X, label %Y - -X: - br label %A -Y: - br label %A -end - -;; This is a simple nested loop -define void @"nested"(i1 %cond1, i1 %cond2, i1 %cond3) -begin - br label %Loop1 - -Loop1: - br label %Loop2 - -Loop2: - br label %Loop3 - -Loop3: - br i1 %cond3, label %Loop3, label %L3Exit - -L3Exit: - br i1 %cond2, label %Loop2, label %L2Exit - -L2Exit: - br i1 %cond1, label %Loop1, label %L1Exit - -L1Exit: - ret void -end - diff --git a/test/Integer/forwardreftest_bt.ll b/test/Integer/forwardreftest_bt.ll deleted file mode 100644 index 5d73eff..0000000 --- a/test/Integer/forwardreftest_bt.ll +++ /dev/null @@ -1,33 +0,0 @@ -; RUN: llvm-as %s -o - | llvm-dis > %t1.ll -; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll -; RUN: diff %t1.ll %t2.ll - - %myty = type i55 - %myfn = type float (i55,double,i55,i16) - type i55(%myfn*) - type i55(i55) - type i55(i55(i55)*) - - %thisfuncty = type i55 (i55) * - -declare void @F(%thisfuncty, %thisfuncty, %thisfuncty) - -; This function always returns zero -define i55 @zarro(i55 %Func) -begin -Startup: - add i55 0, 10 - ret i55 0 -end - -define i55 @test(i55) -begin - call void @F(%thisfuncty @zarro, %thisfuncty @test, %thisfuncty @foozball) - ret i55 0 -end - -define i55 @foozball(i55) -begin - ret i55 0 -end - diff --git a/test/Integer/globalvars_bt.ll b/test/Integer/globalvars_bt.ll deleted file mode 100644 index 5c43185..0000000 --- a/test/Integer/globalvars_bt.ll +++ /dev/null @@ -1,26 +0,0 @@ -; RUN: llvm-as %s -o - | llvm-dis > %t1.ll -; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll -; RUN: diff %t1.ll %t2.ll - - - -@MyVar = external global i27 -@MyIntList = external global { \2 *, i27 } - external global i27 ; i27*:0 - -@AConst = constant i27 123 - -@AString = constant [4 x i8] c"test" - -@ZeroInit = global { [100 x i27 ], [40 x float ] } { [100 x i27] zeroinitializer, - [40 x float] zeroinitializer } - - -define i27 @"foo"(i27 %blah) -begin - store i27 5, i27 *@MyVar - %idx = getelementptr { \2 *, i27 } * @MyIntList, i64 0, i32 1 - store i27 12, i27* %idx - ret i27 %blah -end - diff --git a/test/Integer/indirectcall2_bt.ll b/test/Integer/indirectcall2_bt.ll deleted file mode 100644 index 5b7c68d..0000000 --- a/test/Integer/indirectcall2_bt.ll +++ /dev/null @@ -1,24 +0,0 @@ -; RUN: llvm-as %s -o - | llvm-dis > %t1.ll -; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll -; RUN: diff %t1.ll %t2.ll - - -define i63 @"test"(i63 %X) -begin - ret i63 %X -end - -define i63 @"fib"(i63 %n) -begin - %T = icmp ult i63 %n, 2 ; {i1}:0 - br i1 %T, label %BaseCase, label %RecurseCase - -RecurseCase: - %result = call i63 @test(i63 %n) - br label %BaseCase - -BaseCase: - %X = phi i63 [1, %0], [2, %RecurseCase] - ret i63 %X -end - diff --git a/test/Integer/indirectcall_bt.ll b/test/Integer/indirectcall_bt.ll deleted file mode 100644 index d586fca..0000000 --- a/test/Integer/indirectcall_bt.ll +++ /dev/null @@ -1,52 +0,0 @@ -; RUN: llvm-as %s -o - | llvm-dis > %t1.ll -; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll -; RUN: diff %t1.ll %t2.ll - - -declare i32 @"atoi"(i8 *) - -define i63 @"fib"(i63 %n) -begin - icmp ult i63 %n, 2 ; {i1}:1 - br i1 %1, label %BaseCase, label %RecurseCase - -BaseCase: - ret i63 1 - -RecurseCase: - %n2 = sub i63 %n, 2 - %n1 = sub i63 %n, 1 - %f2 = call i63(i63) * @fib(i63 %n2) - %f1 = call i63(i63) * @fib(i63 %n1) - %result = add i63 %f2, %f1 - ret i63 %result -end - -define i63 @"realmain"(i32 %argc, i8 ** %argv) -begin - icmp eq i32 %argc, 2 ; {i1}:1 - br i1 %1, label %HasArg, label %Continue -HasArg: - ; %n1 = atoi(argv[1]) - %n1 = add i32 1, 1 - br label %Continue - -Continue: - %n = phi i32 [%n1, %HasArg], [1, %0] - %N = sext i32 %n to i63 - %F = call i63(i63) *@fib(i63 %N) - ret i63 %F -end - -define i63 @"trampoline"(i63 %n, i63(i63)* %fibfunc) -begin - %F = call i63(i63) *%fibfunc(i63 %n) - ret i63 %F -end - -define i32 @"main"() -begin - %Result = call i63 @trampoline(i63 10, i63(i63) *@fib) - %Result2 = trunc i63 %Result to i32 - ret i32 %Result2 -end diff --git a/test/Integer/prototype_bt.ll b/test/Integer/prototype_bt.ll deleted file mode 100644 index 2236e8b..0000000 --- a/test/Integer/prototype_bt.ll +++ /dev/null @@ -1,13 +0,0 @@ -; RUN: llvm-as %s -o - | llvm-dis > %t1.ll -; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll -; RUN: diff %t1.ll %t2.ll - - -declare i31 @"bar"(i31 %in) - -define i31 @"foo"(i31 %blah) -begin - %xx = call i31 @bar(i31 %blah) - ret i31 %xx -end - diff --git a/test/Integer/recursivetype_bt.ll b/test/Integer/recursivetype_bt.ll deleted file mode 100644 index d5ce3f5..0000000 --- a/test/Integer/recursivetype_bt.ll +++ /dev/null @@ -1,108 +0,0 @@ -; RUN: llvm-as %s -o - | llvm-dis > %t1.ll -; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll -; RUN: diff %t1.ll %t2.ll - - -; This file contains the output from the following compiled C code: -; typedef struct list { -; struct list *Next; -; i32 Data; -; } list; -; -; // Iterative insert fn -; void InsertIntoListTail(list **L, i32 Data) { -; while (*L) -; L = &(*L)->Next; -; *L = (list*)malloc(sizeof(list)); -; (*L)->Data = Data; -; (*L)->Next = 0; -; } -; -; // Recursive list search fn -; list *FindData(list *L, i32 Data) { -; if (L == 0) return 0; -; if (L->Data == Data) return L; -; return FindData(L->Next, Data); -; } -; -; void DoListStuff() { -; list *MyList = 0; -; InsertIntoListTail(&MyList, 100); -; InsertIntoListTail(&MyList, 12); -; InsertIntoListTail(&MyList, 42); -; InsertIntoListTail(&MyList, 1123); -; InsertIntoListTail(&MyList, 1213); -; -; if (FindData(MyList, 75)) foundIt(); -; if (FindData(MyList, 42)) foundIt(); -; if (FindData(MyList, 700)) foundIt(); -; } - -%list = type { %list*, i36 } - -declare i8 *@"malloc"(i32) - -;;********************** -;;********************** - -define void @"InsertIntoListTail"(%list** %L, i36 %Data) -begin -bb1: - %reg116 = load %list** %L ;;<%list*> - %cast1004 = inttoptr i64 0 to %list* ;;<%list*> - %cond1000 = icmp eq %list* %reg116, %cast1004 ;; - br i1 %cond1000, label %bb3, label %bb2 - -bb2: - %reg117 = phi %list** [ %reg118, %bb2 ], [ %L, %bb1 ] ;;<%list**> - %cast1010 = bitcast %list** %reg117 to %list*** ;;<%list***> - %reg118 = load %list*** %cast1010 ;;<%list**> - %reg109 = load %list** %reg118 ;;<%list*> - %cast1005 = inttoptr i64 0 to %list* ;;<%list*> - %cond1001 = icmp ne %list* %reg109, %cast1005 ;; - br i1 %cond1001, label %bb2, label %bb3 - -bb3: - %reg119 = phi %list** [ %reg118, %bb2 ], [ %L, %bb1 ] ;;<%list**> - %cast1006 = bitcast %list** %reg119 to i8** ;; - %reg111 = call i8* @malloc(i32 16) ;; - store i8* %reg111, i8** %cast1006 ;; - %reg112 = ptrtoint i8* %reg111 to i64 - %reg1002 = add i64 %reg112, 8 - %reg1005 = inttoptr i64 %reg1002 to i8* ;; - %cast1008 = bitcast i8* %reg1005 to i36* ;; - store i36 %Data, i36* %cast1008 ;; - %cast1003 = inttoptr i64 0 to i64* ;; - %cast1009 = bitcast i8* %reg111 to i64** ;; - store i64* %cast1003, i64** %cast1009 ;; - ret void -end - -define %list* @"FindData"(%list* %L, i36 %Data) -begin -bb1: - br label %bb2 - -bb2: - %reg115 = phi %list* [ %reg116, %bb6 ], [ %L, %bb1 ] ;;<%list*> - %cast1014 = inttoptr i64 0 to %list* ;;<%list*> - %cond1011 = icmp ne %list* %reg115, %cast1014 ;; - br i1 %cond1011, label %bb4, label %bb3 - -bb3: - ret %list* null - -bb4: - %idx = getelementptr %list* %reg115, i64 0, i32 1 ;; - %reg111 = load i36* %idx - %cond1013 = icmp ne i36 %reg111, %Data ;; - br i1 %cond1013, label %bb6, label %bb5 - -bb5: - ret %list* %reg115 - -bb6: - %idx2 = getelementptr %list* %reg115, i64 0, i32 0 ;;<%list*> - %reg116 = load %list** %idx2 - br label %bb2 -end diff --git a/test/Integer/simplecalltest_bt.ll b/test/Integer/simplecalltest_bt.ll deleted file mode 100644 index 45dc0f1..0000000 --- a/test/Integer/simplecalltest_bt.ll +++ /dev/null @@ -1,28 +0,0 @@ -; RUN: llvm-as %s -o - | llvm-dis > %t1.ll -; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll -; RUN: diff %t1.ll %t2.ll - -%FunTy = type i31(i31) - - -define void @"invoke"(%FunTy *%x) -begin - %foo = call %FunTy* %x(i31 123) - ret void -end - -define i31 @"main"(i31 %argc, i8 **%argv, i8 **%envp) -begin - %retval = call i31 (i31) *@test(i31 %argc) - %two = add i31 %retval, %retval - %retval2 = call i31 @test(i31 %argc) - - %two2 = add i31 %two, %retval2 - call void @invoke (%FunTy* @test) - ret i31 %two2 -end - -define i31 @"test"(i31 %i0) -begin - ret i31 %i0 -end diff --git a/test/Integer/small_bt.ll b/test/Integer/small_bt.ll deleted file mode 100644 index 00fcace..0000000 --- a/test/Integer/small_bt.ll +++ /dev/null @@ -1,13 +0,0 @@ -; RUN: llvm-as %s -o - | llvm-dis > %t1.ll -; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll -; RUN: diff %t1.ll %t2.ll - -%x = type i19 - - -define i19 @"foo"(i19 %in) -begin -label: - ret i19 2 -end - diff --git a/test/Integer/testalloca_bt.ll b/test/Integer/testalloca_bt.ll deleted file mode 100644 index e8e73c5..0000000 --- a/test/Integer/testalloca_bt.ll +++ /dev/null @@ -1,28 +0,0 @@ -; RUN: llvm-as %s -o - | llvm-dis > %t1.ll -; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll -; RUN: diff %t1.ll %t2.ll - - -%inners = type {float, {i8 } } -%struct = type { i33 , {float, {i8 } } , i64 } - - -define i33 @testfunction(i33 %i0, i33 %j0) -begin - alloca i8, i32 5 - %ptr = alloca i33 ; yields {i33*}:ptr - store i33 3, i33* %ptr ; yields {void} - %val = load i33* %ptr ; yields {i33}:val = i33 %3 - - %sptr = alloca %struct ; yields {%struct*}:sptr - %nsptr = getelementptr %struct * %sptr, i64 0, i32 1 ; yields {inners*}:nsptr - %ubsptr = getelementptr %inners * %nsptr, i64 0, i32 1 ; yields {{i8}*}:ubsptr - %idx = getelementptr {i8} * %ubsptr, i64 0, i32 0 - store i8 4, i8* %idx - - %fptr = getelementptr %struct * %sptr, i64 0, i32 1, i32 0 ; yields {float*}:fptr - store float 4.0, float * %fptr - - ret i33 3 -end - diff --git a/test/Integer/testarith_bt.ll b/test/Integer/testarith_bt.ll deleted file mode 100644 index 0820399..0000000 --- a/test/Integer/testarith_bt.ll +++ /dev/null @@ -1,21 +0,0 @@ -; RUN: llvm-as %s -o - | llvm-dis > %t1.ll -; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll -; RUN: diff %t1.ll %t2.ll - - -define i31 @"simpleArith"(i31 %i0, i31 %j0) -begin - %t1 = add i31 %i0, %j0 - %t2 = sub i31 %i0, %j0 - %t3 = mul i31 %t1, %t2 - %t4 = udiv i31 %t1, %t2 - %t5 = sdiv i31 %t1, %t2 - %t6 = urem i31 %t1, %t2 - %t7 = srem i31 %t1, %t2 - %t8 = shl i31 %t1, 9 - %t9 = lshr i31 %t1, 9 - %t10= ashr i31 %t1, 9 - %f1 = sitofp i31 %t1 to float - %f2 = fdiv float 4.0, %f1 - ret i31 %t3 -end diff --git a/test/Integer/testconstants_bt.ll b/test/Integer/testconstants_bt.ll deleted file mode 100644 index 8ca49cf..0000000 --- a/test/Integer/testconstants_bt.ll +++ /dev/null @@ -1,32 +0,0 @@ -; RUN: llvm-as %s -o - | llvm-dis > %t1.ll -; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll -; RUN: diff %t1.ll %t2.ll - -@somestr = constant [11x i8] c"hello world" -@array = constant [2 x i55] [ i55 12, i55 52 ] - constant { i55, i55 } { i55 4, i55 3 } - - -define [2 x i55]* @testfunction(i55 %i0, i55 %j0) -begin - ret [2x i55]* @array -end - -define i8* @otherfunc(i55, double) -begin - %somestr = getelementptr [11x i8]* @somestr, i64 0, i64 0 - ret i8* %somestr -end - -define i8* @yetanotherfunc(i55, double) -begin - ret i8* null ; Test null -end - -define i55 @negativeUnsigned() { - ret i55 -1 -} - -define i55 @largeSigned() { - ret i55 3900000000 -} diff --git a/test/Integer/testicmp_bt.ll b/test/Integer/testicmp_bt.ll deleted file mode 100644 index 40a2465..0000000 --- a/test/Integer/testicmp_bt.ll +++ /dev/null @@ -1,23 +0,0 @@ -; RUN: llvm-as %s -o - | llvm-dis > %t1.ll -; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll -; RUN: diff %t1.ll %t2.ll - - -define i31 @"simpleIcmp"(i31 %i0, i31 %j0) -begin - %t1 = icmp eq i31 %i0, %j0 - %t2 = icmp ne i31 %i0, %j0 - %t3 = icmp ult i31 %i0, %j0 - %t4 = icmp sgt i31 %i0, %j0 - %t5 = icmp ule i31 %i0, %j0 - %t6 = icmp sge i31 %i0, %j0 - - %t7 = icmp eq i31 %i0, 1098765432 - %t8 = icmp ne i31 %i0, -31415926 - - %t9 = icmp ult i31 10000, %j0 - %t10 = icmp sgt i31 -10000, %j0 - - - ret i31 %i0 -end diff --git a/test/Integer/testlogical_bt.ll b/test/Integer/testlogical_bt.ll deleted file mode 100644 index a2c927d..0000000 --- a/test/Integer/testlogical_bt.ll +++ /dev/null @@ -1,13 +0,0 @@ -; RUN: llvm-as %s -o - | llvm-dis > %t1.ll -; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll -; RUN: diff %t1.ll %t2.ll - - -define i31 @"simpleAdd"(i31 %i0, i31 %j0) -begin - %t1 = xor i31 %i0, %j0 - %t2 = or i31 %i0, %j0 - %t3 = and i31 %t1, %t2 - ret i31 %t3 -end - diff --git a/test/Integer/testlogical_new_bt.ll b/test/Integer/testlogical_new_bt.ll deleted file mode 100644 index 49a26dc..0000000 --- a/test/Integer/testlogical_new_bt.ll +++ /dev/null @@ -1,15 +0,0 @@ -; RUN: llvm-as %s -o - | llvm-dis > %t1.ll -; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll -; RUN: diff %t1.ll %t2.ll - - -define i31 @"simpleAdd"(i31 %i0, i31 %j0) -begin - %t1 = xor i31 %i0, %j0 - %t2 = or i31 %i0, %j0 - %t3 = and i31 %t1, %t2 - %t4 = shl i31 %i0, 2 - %t5 = ashr i31 %i0, 2 - %t6 = lshr i31 %j0, 22 - ret i31 %t3 -end diff --git a/test/Integer/testswitch_bt.ll b/test/Integer/testswitch_bt.ll deleted file mode 100644 index bf7cdc5..0000000 --- a/test/Integer/testswitch_bt.ll +++ /dev/null @@ -1,24 +0,0 @@ -; RUN: llvm-as %s -o - | llvm-dis > %t1.ll -; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll -; RUN: diff %t1.ll %t2.ll - - %i35 = type i35 - - -define i35 @"squared"(%i35 %i0) -begin - switch i35 %i0, label %Default [ - i35 1, label %Case1 - i35 2, label %Case2 - i35 4, label %Case4 ] - -Default: - ret i35 -1 ; Unrecognized input value - -Case1: - ret i35 1 -Case2: - ret i35 4 -Case4: - ret i35 16 -end diff --git a/test/Integer/testvarargs_bt.ll b/test/Integer/testvarargs_bt.ll deleted file mode 100644 index 3227d14..0000000 --- a/test/Integer/testvarargs_bt.ll +++ /dev/null @@ -1,14 +0,0 @@ -; RUN: llvm-as %s -o - | llvm-dis > %t1.ll -; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll -; RUN: diff %t1.ll %t2.ll - - -declare i31 @"printf"(i8*, ...) ;; Prototype for: i32 __builtin_printf(const char*, ...) - -define i31 @"testvarar"() -begin - call i31(i8*, ...) *@printf(i8 * null, i31 12, i8 42) - ret i31 %1 -end - - diff --git a/test/Transforms/ADCE/2002-01-31-UseStuckAround.ll b/test/Transforms/ADCE/2002-01-31-UseStuckAround.ll index 43462fa..8910bda 100644 --- a/test/Transforms/ADCE/2002-01-31-UseStuckAround.ll +++ b/test/Transforms/ADCE/2002-01-31-UseStuckAround.ll @@ -1,7 +1,6 @@ ; RUN: opt < %s -adce -define i32 @"main"(i32 %argc) -begin +define i32 @"main"(i32 %argc) { br label %2 %retval = phi i32 [ %argc, %2 ] ; [#uses=2] @@ -9,5 +8,4 @@ begin ret i32 %two br label %1 -end - +} diff --git a/test/Verifier/2002-04-13-RetTypes.ll b/test/Verifier/2002-04-13-RetTypes.ll index 197f5c2..d6e1a54 100644 --- a/test/Verifier/2002-04-13-RetTypes.ll +++ b/test/Verifier/2002-04-13-RetTypes.ll @@ -4,7 +4,6 @@ ; delcared return type of the function they live in. ; -define i32 @testfunc() -begin +define i32 @testfunc() { ret i32* null -end +} -- cgit v1.1 From 437544f25c1a6f6a00a2ed245c935088dbf9963d Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 17 Jun 2011 06:49:41 +0000 Subject: remove parser support for the obsolete "multiple return values" syntax, which was replaced with return of a "first class aggregate". git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133245 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/Assembler/2008-02-20-MultipleReturnValue.ll | 22 --------- test/CodeGen/PowerPC/multiple-return-values.ll | 17 ------- test/CodeGen/X86/fp-stack-2results.ll | 10 +++- test/CodeGen/X86/multiple-return-values.ll | 16 ------ test/Transforms/IPConstantProp/return-constants.ll | 57 ++++++++++++---------- test/Transforms/Inline/2008-03-04-StructRet.ll | 28 ----------- test/Transforms/Inline/2008-03-07-Inline-2.ll | 53 -------------------- test/Transforms/Inline/2008-03-07-Inline.ll | 57 ---------------------- .../InstCombine/2011-02-16-InsertelementHang.ll | 11 ----- .../2008-04-23-MergeMultipleResultRet.ll | 43 ---------------- .../SimplifyCFG/2008-04-27-MultipleReturnCrash.ll | 30 ------------ 11 files changed, 39 insertions(+), 305 deletions(-) delete mode 100644 test/Assembler/2008-02-20-MultipleReturnValue.ll delete mode 100644 test/CodeGen/PowerPC/multiple-return-values.ll delete mode 100644 test/CodeGen/X86/multiple-return-values.ll delete mode 100644 test/Transforms/Inline/2008-03-04-StructRet.ll delete mode 100644 test/Transforms/Inline/2008-03-07-Inline-2.ll delete mode 100644 test/Transforms/Inline/2008-03-07-Inline.ll delete mode 100644 test/Transforms/InstCombine/2011-02-16-InsertelementHang.ll delete mode 100644 test/Transforms/SimplifyCFG/2008-04-23-MergeMultipleResultRet.ll delete mode 100644 test/Transforms/SimplifyCFG/2008-04-27-MultipleReturnCrash.ll (limited to 'test') diff --git a/test/Assembler/2008-02-20-MultipleReturnValue.ll b/test/Assembler/2008-02-20-MultipleReturnValue.ll deleted file mode 100644 index 32c893a..0000000 --- a/test/Assembler/2008-02-20-MultipleReturnValue.ll +++ /dev/null @@ -1,22 +0,0 @@ -; RUN: opt < %s -verify -S | llvm-as -disable-output - -define {i32, i8} @foo(i32 %p) { - ret i32 1, i8 2 -} - -define i8 @f2(i32 %p) { - %c = call {i32, i8} @foo(i32 %p) - %d = getresult {i32, i8} %c, 1 - %e = add i8 %d, 1 - ret i8 %e -} - -define i32 @f3(i32 %p) { - %c = invoke {i32, i8} @foo(i32 %p) - to label %L unwind label %L2 - L: - %d = getresult {i32, i8} %c, 0 - ret i32 %d - L2: - ret i32 0 -} diff --git a/test/CodeGen/PowerPC/multiple-return-values.ll b/test/CodeGen/PowerPC/multiple-return-values.ll deleted file mode 100644 index b9317f9..0000000 --- a/test/CodeGen/PowerPC/multiple-return-values.ll +++ /dev/null @@ -1,17 +0,0 @@ -; RUN: llc < %s -march=ppc32 -; RUN: llc < %s -march=ppc64 - -define {i64, float} @bar(i64 %a, float %b) { - %y = add i64 %a, 7 - %z = fadd float %b, 7.0 - ret i64 %y, float %z -} - -define i64 @foo() { - %M = call {i64, float} @bar(i64 21, float 21.0) - %N = getresult {i64, float} %M, 0 - %O = getresult {i64, float} %M, 1 - %P = fptosi float %O to i64 - %Q = add i64 %P, %N - ret i64 %Q -} diff --git a/test/CodeGen/X86/fp-stack-2results.ll b/test/CodeGen/X86/fp-stack-2results.ll index 321e267..bb86cd3 100644 --- a/test/CodeGen/X86/fp-stack-2results.ll +++ b/test/CodeGen/X86/fp-stack-2results.ll @@ -1,12 +1,16 @@ ; RUN: llc < %s -march=x86 | grep fldz ; RUN: llc < %s -march=x86-64 | grep fld1 +%0 = type { x86_fp80, x86_fp80 } + ; This is basically this code on x86-64: ; _Complex long double test() { return 1.0; } define {x86_fp80, x86_fp80} @test() { %A = fpext double 1.0 to x86_fp80 %B = fpext double 0.0 to x86_fp80 - ret x86_fp80 %A, x86_fp80 %B + %mrv = insertvalue %0 undef, x86_fp80 %A, 0 + %mrv1 = insertvalue %0 %mrv, x86_fp80 %B, 1 + ret %0 %mrv1 } @@ -16,7 +20,9 @@ define {x86_fp80, x86_fp80} @test() { ; ret define {x86_fp80, x86_fp80} @test2() { %A = fpext double 1.0 to x86_fp80 - ret x86_fp80 %A, x86_fp80 %A + %mrv = insertvalue %0 undef, x86_fp80 %A, 0 + %mrv1 = insertvalue %0 %mrv, x86_fp80 %A, 1 + ret %0 %mrv1 } ; Uses both values. diff --git a/test/CodeGen/X86/multiple-return-values.ll b/test/CodeGen/X86/multiple-return-values.ll deleted file mode 100644 index 018d997..0000000 --- a/test/CodeGen/X86/multiple-return-values.ll +++ /dev/null @@ -1,16 +0,0 @@ -; RUN: llc < %s -march=x86 - -define {i64, float} @bar(i64 %a, float %b) { - %y = add i64 %a, 7 - %z = fadd float %b, 7.0 - ret i64 %y, float %z -} - -define i64 @foo() { - %M = call {i64, float} @bar(i64 21, float 21.0) - %N = getresult {i64, float} %M, 0 - %O = getresult {i64, float} %M, 1 - %P = fptosi float %O to i64 - %Q = add i64 %P, %N - ret i64 %Q -} diff --git a/test/Transforms/IPConstantProp/return-constants.ll b/test/Transforms/IPConstantProp/return-constants.ll index 79220dd..2cd99fe 100644 --- a/test/Transforms/IPConstantProp/return-constants.ll +++ b/test/Transforms/IPConstantProp/return-constants.ll @@ -4,38 +4,43 @@ ;; Check that the second return values didn't get propagated ; RUN: cat %t | grep {%N = add i32 %B, %D} -define internal {i32, i32} @foo(i1 %Q) { - br i1 %Q, label %T, label %F +%0 = type { i32, i32 } -T: ; preds = %0 - ret i32 21, i32 22 +define internal %0 @foo(i1 %Q) { + br i1 %Q, label %T, label %F -F: ; preds = %0 - ret i32 21, i32 23 +T: ; preds = %0 + %mrv = insertvalue %0 undef, i32 21, 0 + %mrv1 = insertvalue %0 %mrv, i32 22, 1 + ret %0 %mrv1 + +F: ; preds = %0 + %mrv2 = insertvalue %0 undef, i32 21, 0 + %mrv3 = insertvalue %0 %mrv2, i32 23, 1 + ret %0 %mrv3 } -define internal {i32, i32} @bar(i1 %Q) { - %A = insertvalue { i32, i32 } undef, i32 21, 0 - br i1 %Q, label %T, label %F +define internal %0 @bar(i1 %Q) { + %A = insertvalue %0 undef, i32 21, 0 + br i1 %Q, label %T, label %F -T: ; preds = %0 - %B = insertvalue { i32, i32 } %A, i32 22, 1 - ret { i32, i32 } %B +T: ; preds = %0 + %B = insertvalue %0 %A, i32 22, 1 + ret %0 %B -F: ; preds = %0 - %C = insertvalue { i32, i32 } %A, i32 23, 1 - ret { i32, i32 } %C +F: ; preds = %0 + %C = insertvalue %0 %A, i32 23, 1 + ret %0 %C } -define { i32, i32 } @caller(i1 %Q) { - %X = call {i32, i32} @foo( i1 %Q ) - %A = getresult {i32, i32} %X, 0 - %B = getresult {i32, i32} %X, 1 - %Y = call {i32, i32} @bar( i1 %Q ) - %C = extractvalue {i32, i32} %Y, 0 - %D = extractvalue {i32, i32} %Y, 1 - %M = add i32 %A, %C - %N = add i32 %B, %D - ret { i32, i32 } %X +define %0 @caller(i1 %Q) { + %X = call %0 @foo(i1 %Q) + %A = extractvalue %0 %X, 0 + %B = extractvalue %0 %X, 1 + %Y = call %0 @bar(i1 %Q) + %C = extractvalue %0 %Y, 0 + %D = extractvalue %0 %Y, 1 + %M = add i32 %A, %C + %N = add i32 %B, %D + ret %0 %X } - diff --git a/test/Transforms/Inline/2008-03-04-StructRet.ll b/test/Transforms/Inline/2008-03-04-StructRet.ll deleted file mode 100644 index 3311d56..0000000 --- a/test/Transforms/Inline/2008-03-04-StructRet.ll +++ /dev/null @@ -1,28 +0,0 @@ -; RUN: opt < %s -inline -disable-output - %struct.Benchmark = type { i32 (...)** } - %struct.Complex = type { double, double } - %struct.ComplexBenchmark = type { %struct.Benchmark } - -define %struct.Complex @_Zml7ComplexS_1(double %a.0, double %a.1, double %b.0, double %b.1) nounwind { -entry: - %mrv = alloca %struct.Complex ; <%struct.Complex*> [#uses=2] - %mrv.gep = getelementptr %struct.Complex* %mrv, i32 0, i32 0 ; [#uses=1] - %mrv.ld = load double* %mrv.gep ; [#uses=1] - %mrv.gep1 = getelementptr %struct.Complex* %mrv, i32 0, i32 1 ; [#uses=1] - %mrv.ld2 = load double* %mrv.gep1 ; [#uses=1] - ret double %mrv.ld, double %mrv.ld2 -} - -define void @_ZNK16ComplexBenchmark9oop_styleEv(%struct.ComplexBenchmark* %this) nounwind { -entry: - %tmp = alloca %struct.Complex ; <%struct.Complex*> [#uses=0] - br label %bb31 -bb: ; preds = %bb31 - call %struct.Complex @_Zml7ComplexS_1( double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, double 0.000000e+00 ) nounwind ; <%struct.Complex>:0 [#uses=1] - %gr = getresult %struct.Complex %0, 1 ; [#uses=0] - br label %bb31 -bb31: ; preds = %bb, %entry - br i1 false, label %bb, label %return -return: ; preds = %bb31 - ret void -} diff --git a/test/Transforms/Inline/2008-03-07-Inline-2.ll b/test/Transforms/Inline/2008-03-07-Inline-2.ll deleted file mode 100644 index 0c968e6..0000000 --- a/test/Transforms/Inline/2008-03-07-Inline-2.ll +++ /dev/null @@ -1,53 +0,0 @@ -; RUN: opt < %s -inline -disable-output - %struct.Demand = type { double, double } - %struct.branch = type { %struct.Demand, double, double, double, double, %struct.branch*, [12 x %struct.leaf*] } - %struct.leaf = type { %struct.Demand, double, double } -@P = external global double ; [#uses=1] - -define %struct.leaf* @build_leaf() nounwind { -entry: - unreachable -} - -define %struct.Demand @Compute_Branch2(%struct.branch* %br, double %theta_R, double %theta_I, double %pi_R, double %pi_I) nounwind { -entry: - %mrv = alloca %struct.Demand ; <%struct.Demand*> [#uses=4] - %a2 = alloca %struct.Demand ; <%struct.Demand*> [#uses=0] - br i1 false, label %bb46, label %bb -bb: ; preds = %entry - %mrv.gep = getelementptr %struct.Demand* %mrv, i32 0, i32 0 ; [#uses=1] - %mrv.ld = load double* %mrv.gep ; [#uses=1] - %mrv.gep1 = getelementptr %struct.Demand* %mrv, i32 0, i32 1 ; [#uses=1] - %mrv.ld2 = load double* %mrv.gep1 ; [#uses=1] - ret double %mrv.ld, double %mrv.ld2 -bb46: ; preds = %entry - br label %bb72 -bb49: ; preds = %bb72 - call %struct.Demand @Compute_Leaf1( %struct.leaf* null, double 0.000000e+00, double 0.000000e+00 ) nounwind ; <%struct.Demand>:0 [#uses=1] - %gr = getresult %struct.Demand %0, 1 ; [#uses=0] - br label %bb72 -bb72: ; preds = %bb49, %bb46 - br i1 false, label %bb49, label %bb77 -bb77: ; preds = %bb72 - %mrv.gep3 = getelementptr %struct.Demand* %mrv, i32 0, i32 0 ; [#uses=1] - %mrv.ld4 = load double* %mrv.gep3 ; [#uses=1] - %mrv.gep5 = getelementptr %struct.Demand* %mrv, i32 0, i32 1 ; [#uses=1] - %mrv.ld6 = load double* %mrv.gep5 ; [#uses=1] - ret double %mrv.ld4, double %mrv.ld6 -} - -define %struct.Demand @Compute_Leaf1(%struct.leaf* %l, double %pi_R, double %pi_I) nounwind { -entry: - %mrv = alloca %struct.Demand ; <%struct.Demand*> [#uses=2] - %tmp10 = load double* @P, align 8 ; [#uses=1] - %tmp11 = fcmp olt double %tmp10, 0.000000e+00 ; [#uses=1] - br i1 %tmp11, label %bb, label %bb13 -bb: ; preds = %entry - br label %bb13 -bb13: ; preds = %bb, %entry - %mrv.gep = getelementptr %struct.Demand* %mrv, i32 0, i32 0 ; [#uses=1] - %mrv.ld = load double* %mrv.gep ; [#uses=1] - %mrv.gep1 = getelementptr %struct.Demand* %mrv, i32 0, i32 1 ; [#uses=1] - %mrv.ld2 = load double* %mrv.gep1 ; [#uses=1] - ret double %mrv.ld, double %mrv.ld2 -} diff --git a/test/Transforms/Inline/2008-03-07-Inline.ll b/test/Transforms/Inline/2008-03-07-Inline.ll deleted file mode 100644 index 86afb2d..0000000 --- a/test/Transforms/Inline/2008-03-07-Inline.ll +++ /dev/null @@ -1,57 +0,0 @@ -; RUN: opt < %s -inline -disable-output - %struct.Demand = type { double, double } - %struct.branch = type { %struct.Demand, double, double, double, double, %struct.branch*, [12 x %struct.leaf*] } - %struct.leaf = type { %struct.Demand, double, double } -@P = external global double ; [#uses=1] - -define %struct.leaf* @build_leaf() nounwind { -entry: - unreachable -} - -define %struct.Demand @Compute_Branch2(%struct.branch* %br, double %theta_R, double %theta_I, double %pi_R, double %pi_I) nounwind { -entry: - %mrv = alloca %struct.Demand ; <%struct.Demand*> [#uses=4] - %a2 = alloca %struct.Demand ; <%struct.Demand*> [#uses=0] - br i1 false, label %bb46, label %bb -bb: ; preds = %entry - %mrv.gep = getelementptr %struct.Demand* %mrv, i32 0, i32 0 ; [#uses=1] - %mrv.ld = load double* %mrv.gep ; [#uses=1] - %mrv.gep1 = getelementptr %struct.Demand* %mrv, i32 0, i32 1 ; [#uses=1] - %mrv.ld2 = load double* %mrv.gep1 ; [#uses=1] - ret double %mrv.ld, double %mrv.ld2 -bb46: ; preds = %entry - br label %bb72 -bb49: ; preds = %bb72 - call %struct.Demand @Compute_Leaf1( %struct.leaf* null, double 0.000000e+00, double 0.000000e+00 ) nounwind ; <%struct.Demand>:0 [#uses=1] - %gr = getresult %struct.Demand %0, 1 ; [#uses=0] - br label %bb72 -bb72: ; preds = %bb49, %bb46 - br i1 false, label %bb49, label %bb77 -bb77: ; preds = %bb72 - %mrv.gep3 = getelementptr %struct.Demand* %mrv, i32 0, i32 0 ; [#uses=1] - %mrv.ld4 = load double* %mrv.gep3 ; [#uses=1] - %mrv.gep5 = getelementptr %struct.Demand* %mrv, i32 0, i32 1 ; [#uses=1] - %mrv.ld6 = load double* %mrv.gep5 ; [#uses=1] - ret double %mrv.ld4, double %mrv.ld6 -} - -define %struct.Demand @Compute_Leaf1(%struct.leaf* %l, double %pi_R, double %pi_I) nounwind { -entry: - %mrv = alloca %struct.Demand ; <%struct.Demand*> [#uses=4] - %tmp10 = load double* @P, align 8 ; [#uses=1] - %tmp11 = fcmp olt double %tmp10, 0.000000e+00 ; [#uses=1] - br i1 %tmp11, label %bb, label %bb13 -bb: ; preds = %entry - %mrv.gep = getelementptr %struct.Demand* %mrv, i32 0, i32 0 ; [#uses=1] - %mrv.ld = load double* %mrv.gep ; [#uses=1] - %mrv.gep1 = getelementptr %struct.Demand* %mrv, i32 0, i32 1 ; [#uses=1] - %mrv.ld2 = load double* %mrv.gep1 ; [#uses=1] - ret double %mrv.ld, double %mrv.ld2 -bb13: ; preds = %entry - %mrv.gep3 = getelementptr %struct.Demand* %mrv, i32 0, i32 0 ; [#uses=1] - %mrv.ld4 = load double* %mrv.gep3 ; [#uses=1] - %mrv.gep5 = getelementptr %struct.Demand* %mrv, i32 0, i32 1 ; [#uses=1] - %mrv.ld6 = load double* %mrv.gep5 ; [#uses=1] - ret double %mrv.ld4, double %mrv.ld6 -} diff --git a/test/Transforms/InstCombine/2011-02-16-InsertelementHang.ll b/test/Transforms/InstCombine/2011-02-16-InsertelementHang.ll deleted file mode 100644 index 2f6034e..0000000 --- a/test/Transforms/InstCombine/2011-02-16-InsertelementHang.ll +++ /dev/null @@ -1,11 +0,0 @@ -; RUN: opt < %s -instcombine -S | FileCheck %s -; PR9218 - -%vec2x2 = type { <2 x double>, <2 x double> } - -define %vec2x2 @split(double) nounwind alwaysinline { -; CHECK: @split -; CHECK: ret %vec2x2 undef - %vba = insertelement <2 x double> undef, double %0, i32 2 - ret <2 x double> %vba, <2 x double> %vba -} diff --git a/test/Transforms/SimplifyCFG/2008-04-23-MergeMultipleResultRet.ll b/test/Transforms/SimplifyCFG/2008-04-23-MergeMultipleResultRet.ll deleted file mode 100644 index 8e05a3c..0000000 --- a/test/Transforms/SimplifyCFG/2008-04-23-MergeMultipleResultRet.ll +++ /dev/null @@ -1,43 +0,0 @@ -; RUN: opt < %s -simplifycfg -disable-output -; rdar://5882392 -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" -target triple = "x86_64-apple-darwin9" - %struct.Py_complex = type { double, double } - -define %struct.Py_complex @_Py_c_pow(double %a.0, double %a.1, double %b.0, double %b.1) nounwind { -entry: - %tmp7 = fcmp une double %b.0, 0.000000e+00 ; [#uses=1] - %tmp11 = fcmp une double %b.1, 0.000000e+00 ; [#uses=1] - %bothcond = or i1 %tmp7, %tmp11 ; [#uses=1] - br i1 %bothcond, label %bb15, label %bb53 - -bb15: ; preds = %entry - %tmp18 = fcmp une double %a.0, 0.000000e+00 ; [#uses=1] - %tmp24 = fcmp une double %a.1, 0.000000e+00 ; [#uses=1] - %bothcond1 = or i1 %tmp18, %tmp24 ; [#uses=1] - br i1 %bothcond1, label %bb29, label %bb27 - -bb27: ; preds = %bb15 - %tmp28 = call i32* @__error( ) nounwind ; [#uses=1] - store i32 33, i32* %tmp28, align 4 - ret double undef, double undef - -bb29: ; preds = %bb15 - %tmp36 = fcmp une double %b.1, 0.000000e+00 ; [#uses=1] - br i1 %tmp36, label %bb39, label %bb47 - -bb39: ; preds = %bb29 - br label %bb47 - -bb47: ; preds = %bb39, %bb29 - ret double undef, double undef - -bb53: ; preds = %entry - ret double undef, double undef -} - -declare i32* @__error() - -declare double @pow(double, double) nounwind readonly - -declare double @cos(double) nounwind readonly diff --git a/test/Transforms/SimplifyCFG/2008-04-27-MultipleReturnCrash.ll b/test/Transforms/SimplifyCFG/2008-04-27-MultipleReturnCrash.ll deleted file mode 100644 index 9c15efc..0000000 --- a/test/Transforms/SimplifyCFG/2008-04-27-MultipleReturnCrash.ll +++ /dev/null @@ -1,30 +0,0 @@ -; RUN: opt < %s -simplifycfg -disable-output -; PR2256 -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" -target triple = "x86_64-pc-mingw32" - -define { x86_fp80, x86_fp80 } @catanl({ x86_fp80, x86_fp80 }* byval %Z, i1 %cond) nounwind { -bb: ; preds = %entry - br i1 %cond, label %bb48, label %bb40 - -bb40: ; preds = %bb - store i32 34, i32* null, align 4 - br label %bb196 - -bb48: ; preds = %bb.bb48_crit_edge, %entry.bb48_crit_edge - %tmp53 = icmp eq i32 0, 1280 ; [#uses=1] - br i1 %tmp53, label %bb56, label %bb174 - -bb56: ; preds = %bb48 - %iftmp.0.0 = select i1 false, x86_fp80 0xK3FFFC90FDAA22168C235, x86_fp80 0xKBFFFC90FDAA22168C235 ; [#uses=0] - br label %bb196 - - -bb174: ; preds = %bb144, %bb114 - %tmp191 = fmul x86_fp80 0xK00000000000000000000, 0xK3FFE8000000000000000 ; [#uses=1] - br label %bb196 - -bb196: ; preds = %bb174, %bb56, %bb40 - %Res.1.0 = phi x86_fp80 [ 0xK7FFF8000000000000000, %bb40 ], [ %tmp191, %bb174 ], [ 0xK00000000000000000000, %bb56 ] ; [#uses=1] - ret x86_fp80 0xK00000000000000000000, x86_fp80 %Res.1.0 -} -- cgit v1.1 From 424545e9509318e56be88021babec26cbfab8cc8 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 17 Jun 2011 06:57:15 +0000 Subject: remove asmparser support for the old getresult instruction, which has been subsumed by extractvalue. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133247 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/CodeGen/CBackend/2008-05-21-MRV-InlineAsm.ll | 19 ------------------- test/CodeGen/Generic/getresult-undef.ll | 6 ------ .../multiple-return-values-cross-block-with-invoke.ll | 4 ++-- test/CodeGen/X86/fp-stack-2results.ll | 12 ++++++------ test/CodeGen/X86/inline-asm-mrv.ll | 10 +++++----- .../CodeGen/X86/multiple-return-values-cross-block.ll | 4 ++-- test/Transforms/JumpThreading/crash.ll | 2 +- test/Transforms/LoopRotate/crash.ll | 2 +- test/Transforms/SCCP/2008-04-22-multiple-ret-sccp.ll | 2 +- 9 files changed, 18 insertions(+), 43 deletions(-) delete mode 100644 test/CodeGen/CBackend/2008-05-21-MRV-InlineAsm.ll delete mode 100644 test/CodeGen/Generic/getresult-undef.ll (limited to 'test') diff --git a/test/CodeGen/CBackend/2008-05-21-MRV-InlineAsm.ll b/test/CodeGen/CBackend/2008-05-21-MRV-InlineAsm.ll deleted file mode 100644 index 8db3167..0000000 --- a/test/CodeGen/CBackend/2008-05-21-MRV-InlineAsm.ll +++ /dev/null @@ -1,19 +0,0 @@ -; RUN: llc < %s -march=c - -declare {i32, i32} @foo() - -define i32 @test() { - %A = call {i32, i32} @foo() - %B = getresult {i32, i32} %A, 0 - %C = getresult {i32, i32} %A, 1 - %D = add i32 %B, %C - ret i32 %D -} - -define i32 @test2() { - %A = call {i32, i32} asm sideeffect "...", "={cx},={di},~{dirflag},~{fpsr},~{flags},~{memory}"() - %B = getresult {i32, i32} %A, 0 - %C = getresult {i32, i32} %A, 1 - %D = add i32 %B, %C - ret i32 %D -} diff --git a/test/CodeGen/Generic/getresult-undef.ll b/test/CodeGen/Generic/getresult-undef.ll deleted file mode 100644 index c675535..0000000 --- a/test/CodeGen/Generic/getresult-undef.ll +++ /dev/null @@ -1,6 +0,0 @@ -; RUN: llc < %s - -define double @foo() { - %t = getresult {double, double} undef, 1 - ret double %t -} diff --git a/test/CodeGen/Generic/multiple-return-values-cross-block-with-invoke.ll b/test/CodeGen/Generic/multiple-return-values-cross-block-with-invoke.ll index 282e973..a3cab5d 100644 --- a/test/CodeGen/Generic/multiple-return-values-cross-block-with-invoke.ll +++ b/test/CodeGen/Generic/multiple-return-values-cross-block-with-invoke.ll @@ -6,9 +6,9 @@ define void @foo(i64* %p, double* %q) nounwind { %t = invoke { i64, double } @wild() to label %normal unwind label %handler normal: - %mrv_gr = getresult { i64, double } %t, 0 + %mrv_gr = extractvalue { i64, double } %t, 0 store i64 %mrv_gr, i64* %p - %mrv_gr12681 = getresult { i64, double } %t, 1 + %mrv_gr12681 = extractvalue { i64, double } %t, 1 store double %mrv_gr12681, double* %q ret void diff --git a/test/CodeGen/X86/fp-stack-2results.ll b/test/CodeGen/X86/fp-stack-2results.ll index bb86cd3..e986e36 100644 --- a/test/CodeGen/X86/fp-stack-2results.ll +++ b/test/CodeGen/X86/fp-stack-2results.ll @@ -28,10 +28,10 @@ define {x86_fp80, x86_fp80} @test2() { ; Uses both values. define void @call1(x86_fp80 *%P1, x86_fp80 *%P2) { %a = call {x86_fp80,x86_fp80} @test() - %b = getresult {x86_fp80,x86_fp80} %a, 0 + %b = extractvalue {x86_fp80,x86_fp80} %a, 0 store x86_fp80 %b, x86_fp80* %P1 - %c = getresult {x86_fp80,x86_fp80} %a, 1 + %c = extractvalue {x86_fp80,x86_fp80} %a, 1 store x86_fp80 %c, x86_fp80* %P2 ret void } @@ -39,10 +39,10 @@ define void @call1(x86_fp80 *%P1, x86_fp80 *%P2) { ; Uses both values, requires fxch define void @call2(x86_fp80 *%P1, x86_fp80 *%P2) { %a = call {x86_fp80,x86_fp80} @test() - %b = getresult {x86_fp80,x86_fp80} %a, 1 + %b = extractvalue {x86_fp80,x86_fp80} %a, 1 store x86_fp80 %b, x86_fp80* %P1 - %c = getresult {x86_fp80,x86_fp80} %a, 0 + %c = extractvalue {x86_fp80,x86_fp80} %a, 0 store x86_fp80 %c, x86_fp80* %P2 ret void } @@ -50,7 +50,7 @@ define void @call2(x86_fp80 *%P1, x86_fp80 *%P2) { ; Uses ST(0), ST(1) is dead but must be popped. define void @call3(x86_fp80 *%P1, x86_fp80 *%P2) { %a = call {x86_fp80,x86_fp80} @test() - %b = getresult {x86_fp80,x86_fp80} %a, 0 + %b = extractvalue {x86_fp80,x86_fp80} %a, 0 store x86_fp80 %b, x86_fp80* %P1 ret void } @@ -59,7 +59,7 @@ define void @call3(x86_fp80 *%P1, x86_fp80 *%P2) { define void @call4(x86_fp80 *%P1, x86_fp80 *%P2) { %a = call {x86_fp80,x86_fp80} @test() - %c = getresult {x86_fp80,x86_fp80} %a, 1 + %c = extractvalue {x86_fp80,x86_fp80} %a, 1 store x86_fp80 %c, x86_fp80* %P2 ret void } diff --git a/test/CodeGen/X86/inline-asm-mrv.ll b/test/CodeGen/X86/inline-asm-mrv.ll index 78d7e77..733205d 100644 --- a/test/CodeGen/X86/inline-asm-mrv.ll +++ b/test/CodeGen/X86/inline-asm-mrv.ll @@ -11,7 +11,7 @@ define i32 @test1(i8* %v, i8* %blk2, i8* %blk1, i32 %stride, i32 %h) nounwind { %tmp12 = sext i32 %stride to i64 ; [#uses=1] %mrv = call {i32, i8*, i8*} asm sideeffect "$0 $1 $2 $3 $4 $5 $6", "=r,=r,=r,r,r,r,r"( i64 %tmp12, i32 %h, i8* %blk1, i8* %blk2 ) nounwind - %tmp6 = getresult {i32, i8*, i8*} %mrv, 0 + %tmp6 = extractvalue {i32, i8*, i8*} %mrv, 0 %tmp7 = call i32 asm sideeffect "set $0", "=r,~{dirflag},~{fpsr},~{flags}"( ) nounwind ret i32 %tmp7 @@ -19,16 +19,16 @@ define i32 @test1(i8* %v, i8* %blk2, i8* %blk1, i32 %stride, i32 %h) nounwind { define <4 x float> @test2() nounwind { %mrv = call {<4 x float>, <4 x float>} asm "set $0, $1", "=x,=x"() - %a = getresult {<4 x float>, <4 x float>} %mrv, 0 - %b = getresult {<4 x float>, <4 x float>} %mrv, 1 + %a = extractvalue {<4 x float>, <4 x float>} %mrv, 0 + %b = extractvalue {<4 x float>, <4 x float>} %mrv, 1 %c = fadd <4 x float> %a, %b ret <4 x float> %c } define <4 x i32> @test3() nounwind { %mrv = call {<4 x i32>, <4 x i32>} asm "set $0, $1", "=x,=x"() - %a = getresult {<4 x i32>, <4 x i32>} %mrv, 0 - %b = getresult {<4 x i32>, <4 x i32>} %mrv, 1 + %a = extractvalue {<4 x i32>, <4 x i32>} %mrv, 0 + %b = extractvalue {<4 x i32>, <4 x i32>} %mrv, 1 %c = add <4 x i32> %a, %b ret <4 x i32> %c } diff --git a/test/CodeGen/X86/multiple-return-values-cross-block.ll b/test/CodeGen/X86/multiple-return-values-cross-block.ll index e9837d0..b0cb061 100644 --- a/test/CodeGen/X86/multiple-return-values-cross-block.ll +++ b/test/CodeGen/X86/multiple-return-values-cross-block.ll @@ -4,12 +4,12 @@ declare {x86_fp80, x86_fp80} @test() define void @call2(x86_fp80 *%P1, x86_fp80 *%P2) { %a = call {x86_fp80,x86_fp80} @test() - %b = getresult {x86_fp80,x86_fp80} %a, 1 + %b = extractvalue {x86_fp80,x86_fp80} %a, 1 store x86_fp80 %b, x86_fp80* %P1 br label %L L: - %c = getresult {x86_fp80,x86_fp80} %a, 0 + %c = extractvalue {x86_fp80,x86_fp80} %a, 0 store x86_fp80 %c, x86_fp80* %P2 ret void } diff --git a/test/Transforms/JumpThreading/crash.ll b/test/Transforms/JumpThreading/crash.ll index aed51a1..2115dd3 100644 --- a/test/Transforms/JumpThreading/crash.ll +++ b/test/Transforms/JumpThreading/crash.ll @@ -18,7 +18,7 @@ bb13: ; preds = %bb br label %bb bb110: ; preds = %bb - %mrv_gr124 = getresult %struct.system__secondary_stack__mark_id %tmp120, 1 ; [#uses=0] + %mrv_gr124 = extractvalue %struct.system__secondary_stack__mark_id %tmp120, 1 ; [#uses=0] unreachable } diff --git a/test/Transforms/LoopRotate/crash.ll b/test/Transforms/LoopRotate/crash.ll index 16a6868..954b834 100644 --- a/test/Transforms/LoopRotate/crash.ll +++ b/test/Transforms/LoopRotate/crash.ll @@ -113,7 +113,7 @@ bb116: ; preds = %bb131, %entry br i1 false, label %bb141, label %bb131 bb131: ; preds = %bb116 - %mrv_gr125 = getresult %struct.NSRange %tmp123, 1 ; [#uses=0] + %mrv_gr125 = extractvalue %struct.NSRange %tmp123, 1 ; [#uses=0] br label %bb116 bb141: ; preds = %bb116 diff --git a/test/Transforms/SCCP/2008-04-22-multiple-ret-sccp.ll b/test/Transforms/SCCP/2008-04-22-multiple-ret-sccp.ll index 1b26ca9..a40455c 100644 --- a/test/Transforms/SCCP/2008-04-22-multiple-ret-sccp.ll +++ b/test/Transforms/SCCP/2008-04-22-multiple-ret-sccp.ll @@ -5,7 +5,7 @@ declare {i32, i32} @bar(i32 %A) define i32 @foo() { %X = call {i32, i32} @bar(i32 17) - %Y = getresult {i32, i32} %X, 0 + %Y = extractvalue {i32, i32} %X, 0 %Z = add i32 %Y, %Y ret i32 %Z } -- cgit v1.1 From d589099eec8d120b5a7227072c4e717856e2276f Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 17 Jun 2011 07:06:44 +0000 Subject: make the asmparser reject function and type redefinitions. 'Merging' hasn't been needed since llvm-gcc 3.4 days. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133248 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/Analysis/BasicAA/modref.ll | 2 -- test/Assembler/2002-07-14-InternalLossage.ll | 9 --------- test/Assembler/2002-10-15-NameClash.ll | 7 ------- test/Assembler/private.ll | 9 --------- test/CodeGen/ARM/2008-04-10-ScavengerAssert.ll | 5 ----- test/CodeGen/ARM/private.ll | 2 -- test/CodeGen/ARM/vqdmul.ll | 1 - test/CodeGen/Alpha/private.ll | 2 -- test/CodeGen/CellSPU/private.ll | 3 --- test/CodeGen/Mips/private.ll | 2 -- test/CodeGen/SPARC/private.ll | 2 -- test/CodeGen/X86/2009-08-06-branchfolder-crash.ll | 2 -- test/CodeGen/X86/private.ll | 2 -- test/CodeGen/X86/sibcall.ll | 2 -- test/CodeGen/XCore/private.ll | 2 -- test/Feature/calltest.ll | 2 -- test/Feature/globalredefinition.ll | 18 ------------------ test/Integer/globalredefinition_bt.ll | 18 ------------------ test/Transforms/InstCombine/bswap-fold.ll | 4 ---- test/Transforms/InstCombine/intrinsics.ll | 1 - test/Transforms/InstCombine/objsize.ll | 2 -- test/Transforms/MemCpyOpt/memcpy.ll | 1 - test/Transforms/TailCallElim/inf-recursion.ll | 1 - 23 files changed, 99 deletions(-) delete mode 100644 test/Assembler/2002-07-14-InternalLossage.ll delete mode 100644 test/Assembler/2002-10-15-NameClash.ll delete mode 100644 test/Assembler/private.ll delete mode 100644 test/Feature/globalredefinition.ll delete mode 100644 test/Integer/globalredefinition_bt.ll (limited to 'test') diff --git a/test/Analysis/BasicAA/modref.ll b/test/Analysis/BasicAA/modref.ll index 7a71e3e..7318a89 100644 --- a/test/Analysis/BasicAA/modref.ll +++ b/test/Analysis/BasicAA/modref.ll @@ -24,8 +24,6 @@ define i32 @test0(i8* %P) { ; CHECK: ret i32 0 } -declare void @llvm.memcpy.i8(i8*, i8*, i8, i32) - define i8 @test1() { ; CHECK: @test1 %A = alloca i8 diff --git a/test/Assembler/2002-07-14-InternalLossage.ll b/test/Assembler/2002-07-14-InternalLossage.ll deleted file mode 100644 index f93f1c4..0000000 --- a/test/Assembler/2002-07-14-InternalLossage.ll +++ /dev/null @@ -1,9 +0,0 @@ -; Test to make sure that the 'internal' tag is not lost! -; -; RUN: llvm-as < %s | llvm-dis | grep internal - -declare void @foo() - -define internal void @foo() { - ret void -} diff --git a/test/Assembler/2002-10-15-NameClash.ll b/test/Assembler/2002-10-15-NameClash.ll deleted file mode 100644 index 89346cb..0000000 --- a/test/Assembler/2002-10-15-NameClash.ll +++ /dev/null @@ -1,7 +0,0 @@ -; RUN: llvm-as %s -o /dev/null - -declare i32 @"ArrayRef"([100 x i32] * %Array) - -define i32 @"ArrayRef"([100 x i32] * %Array) { - ret i32 0 -} diff --git a/test/Assembler/private.ll b/test/Assembler/private.ll deleted file mode 100644 index 3714572..0000000 --- a/test/Assembler/private.ll +++ /dev/null @@ -1,9 +0,0 @@ -; Test to make sure that the 'private' tag is not lost! -; -; RUN: llvm-as < %s | llvm-dis | grep private - -declare void @foo() - -define private void @foo() { - ret void -} diff --git a/test/CodeGen/ARM/2008-04-10-ScavengerAssert.ll b/test/CodeGen/ARM/2008-04-10-ScavengerAssert.ll index 77418be..c9a8a67 100644 --- a/test/CodeGen/ARM/2008-04-10-ScavengerAssert.ll +++ b/test/CodeGen/ARM/2008-04-10-ScavengerAssert.ll @@ -188,11 +188,6 @@ bb231: ; preds = %bb226 ret void } - %struct.III_psy_xmin = type { [22 x double], [13 x [3 x double]] } - %struct.III_scalefac_t = type { [22 x i32], [13 x [3 x i32]] } - %struct.gr_info = type { i32, i32, i32, i32, i32, i32, i32, i32, [3 x i32], [3 x i32], i32, i32, i32, i32, i32, i32, i32, i32, i32, i32*, [4 x i32] } - %struct.lame_global_flags = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i8*, i8*, i32, i32, float, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, float, i32, i32, i32, float, float, float, float, i32, i32, i32, i32, i32, i32, i32, i32 } - define fastcc void @outer_loop2(%struct.lame_global_flags* %gfp, double* %xr, i32 %targ_bits, double* %best_noise, %struct.III_psy_xmin* %l3_xmin, i32* %l3_enc, %struct.III_scalefac_t* %scalefac, %struct.gr_info* %cod_info, i32 %ch) { entry: %cod_info.20128.1 = getelementptr %struct.gr_info* %cod_info, i32 0, i32 20, i32 1 ; [#uses=1] diff --git a/test/CodeGen/ARM/private.ll b/test/CodeGen/ARM/private.ll index fba56b4..f93ffe7 100644 --- a/test/CodeGen/ARM/private.ll +++ b/test/CodeGen/ARM/private.ll @@ -6,8 +6,6 @@ ; RUN: grep .Lbaz: %t ; RUN: grep long.*\.Lbaz %t -declare void @foo() - define private void @foo() { ret void } diff --git a/test/CodeGen/ARM/vqdmul.ll b/test/CodeGen/ARM/vqdmul.ll index 8dcc7f7..08e7d2b 100644 --- a/test/CodeGen/ARM/vqdmul.ll +++ b/test/CodeGen/ARM/vqdmul.ll @@ -152,7 +152,6 @@ entry: ret <2 x i32> %1 } -declare <2 x i32> @llvm.arm.neon.vqrdmulh.v2i32(<2 x i32>, <2 x i32>) nounwind readnone declare <4 x i16> @llvm.arm.neon.vqrdmulh.v4i16(<4 x i16>, <4 x i16>) nounwind readnone declare <2 x i32> @llvm.arm.neon.vqrdmulh.v2i32(<2 x i32>, <2 x i32>) nounwind readnone diff --git a/test/CodeGen/Alpha/private.ll b/test/CodeGen/Alpha/private.ll index 26076e0..f8d3094 100644 --- a/test/CodeGen/Alpha/private.ll +++ b/test/CodeGen/Alpha/private.ll @@ -6,8 +6,6 @@ ; RUN: grep \\\$baz: %t ; RUN: grep ldah.*\\\$baz %t -declare void @foo() - define private void @foo() { ret void } diff --git a/test/CodeGen/CellSPU/private.ll b/test/CodeGen/CellSPU/private.ll index 56f72e7..1d933ad 100644 --- a/test/CodeGen/CellSPU/private.ll +++ b/test/CodeGen/CellSPU/private.ll @@ -6,9 +6,6 @@ ; RUN: grep .Lbaz: %t ; RUN: grep ila.*\.Lbaz %t - -declare void @foo() - define private void @foo() { ret void } diff --git a/test/CodeGen/Mips/private.ll b/test/CodeGen/Mips/private.ll index 34b7547..4cc48f0 100644 --- a/test/CodeGen/Mips/private.ll +++ b/test/CodeGen/Mips/private.ll @@ -6,8 +6,6 @@ ; RUN: grep \\\$baz: %t ; RUN: grep lw.*\\\$baz %t -declare void @foo() - define private void @foo() { ret void } diff --git a/test/CodeGen/SPARC/private.ll b/test/CodeGen/SPARC/private.ll index f091aa6..f06ccd0 100644 --- a/test/CodeGen/SPARC/private.ll +++ b/test/CodeGen/SPARC/private.ll @@ -6,8 +6,6 @@ ; RUN: grep .baz: %t ; RUN: grep ld.*\.baz %t -declare void @foo() - define private void @foo() { ret void } diff --git a/test/CodeGen/X86/2009-08-06-branchfolder-crash.ll b/test/CodeGen/X86/2009-08-06-branchfolder-crash.ll index b329c91..2080c0a 100644 --- a/test/CodeGen/X86/2009-08-06-branchfolder-crash.ll +++ b/test/CodeGen/X86/2009-08-06-branchfolder-crash.ll @@ -87,8 +87,6 @@ for.inc: ; preds = %for.inc, %lor.end.i, %lor.rhs.i, %land.lhs.true3.i br label %for.inc } -declare i32 @safe() - define i32 @func_35(i8 signext %p_35) nounwind readonly { entry: %tobool = icmp eq i8 %p_35, 0 ; [#uses=1] diff --git a/test/CodeGen/X86/private.ll b/test/CodeGen/X86/private.ll index f52f8c7..484afc9 100644 --- a/test/CodeGen/X86/private.ll +++ b/test/CodeGen/X86/private.ll @@ -5,8 +5,6 @@ ; RUN: llc < %s -mtriple=x86_64-pc-linux | grep .Lbaz: ; RUN: llc < %s -mtriple=x86_64-pc-linux | grep movl.*\.Lbaz -declare void @foo() - define private void @foo() { ret void } diff --git a/test/CodeGen/X86/sibcall.ll b/test/CodeGen/X86/sibcall.ll index 4a98efb..a9a5420 100644 --- a/test/CodeGen/X86/sibcall.ll +++ b/test/CodeGen/X86/sibcall.ll @@ -312,8 +312,6 @@ entry: ret void } -declare void @foo() - ; If caller / callee calling convention mismatch then check if the return ; values are returned in the same registers. ; rdar://7874780 diff --git a/test/CodeGen/XCore/private.ll b/test/CodeGen/XCore/private.ll index c595a6d..537d63b 100644 --- a/test/CodeGen/XCore/private.ll +++ b/test/CodeGen/XCore/private.ll @@ -6,8 +6,6 @@ ; RUN: grep .Lbaz: %t ; RUN: grep ldw.*\.Lbaz %t -declare void @foo() - define private void @foo() { ret void } diff --git a/test/Feature/calltest.ll b/test/Feature/calltest.ll index feafd3c..dcdb1a0 100644 --- a/test/Feature/calltest.ll +++ b/test/Feature/calltest.ll @@ -4,8 +4,6 @@ %FunTy = type i32 (i32) -declare i32 @test(i32) ; Test forward declaration merging - define void @invoke(%FunTy* %x) { %foo = call i32 %x( i32 123 ) ; [#uses=0] %foo2 = tail call i32 %x( i32 123 ) ; [#uses=0] diff --git a/test/Feature/globalredefinition.ll b/test/Feature/globalredefinition.ll deleted file mode 100644 index 42e2d1a..0000000 --- a/test/Feature/globalredefinition.ll +++ /dev/null @@ -1,18 +0,0 @@ -; RUN: llvm-as < %s | llvm-dis > %t1.ll -; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll -; RUN: diff %t1.ll %t2.ll - -; Test forward references and redefinitions of globals - -@A = global i32* @B ; [#uses=0] -@B = global i32 7 ; [#uses=1] - -declare void @X() - -declare void @X() - -define void @X() { - ret void -} - -declare void @X() diff --git a/test/Integer/globalredefinition_bt.ll b/test/Integer/globalredefinition_bt.ll deleted file mode 100644 index b369b2a..0000000 --- a/test/Integer/globalredefinition_bt.ll +++ /dev/null @@ -1,18 +0,0 @@ -; RUN: llvm-as %s -o - | llvm-dis > %t1.ll -; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll -; RUN: diff %t1.ll %t2.ll - -; Test forward references and redefinitions of globals - -@A = global i17* @B -@B = global i17 7 - -declare void @X() - -declare void @X() - -define void @X() { - ret void -} - -declare void @X() diff --git a/test/Transforms/InstCombine/bswap-fold.ll b/test/Transforms/InstCombine/bswap-fold.ll index a6b30c0..442ce58 100644 --- a/test/Transforms/InstCombine/bswap-fold.ll +++ b/test/Transforms/InstCombine/bswap-fold.ll @@ -50,10 +50,6 @@ entry: } ; PR5284 -declare i64 @llvm.bswap.i64(i64) -declare i32 @llvm.bswap.i32(i32) -declare i16 @llvm.bswap.i16(i16) - define i16 @test7(i32 %A) { %B = tail call i32 @llvm.bswap.i32(i32 %A) nounwind %C = trunc i32 %B to i16 diff --git a/test/Transforms/InstCombine/intrinsics.ll b/test/Transforms/InstCombine/intrinsics.ll index 107f313..0d84ae4 100644 --- a/test/Transforms/InstCombine/intrinsics.ll +++ b/test/Transforms/InstCombine/intrinsics.ll @@ -213,5 +213,4 @@ define i32 @cttz_simplify1(i32 %x) nounwind readnone ssp { ; CHECK-NEXT: ret i32 } -declare i32 @llvm.ctlz.i32(i32) nounwind readnone diff --git a/test/Transforms/InstCombine/objsize.ll b/test/Transforms/InstCombine/objsize.ll index 043525b..28ceb68 100644 --- a/test/Transforms/InstCombine/objsize.ll +++ b/test/Transforms/InstCombine/objsize.ll @@ -149,8 +149,6 @@ declare i8* @__memset_chk(i8*, i32, i32, i32) nounwind declare noalias i8* @malloc(i32) nounwind -declare i32 @llvm.objectsize.i32(i8*, i1) nounwind readonly - define i32 @test7() { ; CHECK: @test7 %alloc = call noalias i8* @malloc(i32 48) nounwind diff --git a/test/Transforms/MemCpyOpt/memcpy.ll b/test/Transforms/MemCpyOpt/memcpy.ll index 5c6a94c..fb97913 100644 --- a/test/Transforms/MemCpyOpt/memcpy.ll +++ b/test/Transforms/MemCpyOpt/memcpy.ll @@ -84,7 +84,6 @@ declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture, i8* nocapture, i64, i32, declare void @test5a(%struct.S* byval align 16) nounwind ssp -declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture, i8* nocapture, i64, i32, i1) nounwind ; rdar://8713376 - This memcpy can't be eliminated. define i32 @test5(i32 %x) nounwind ssp { diff --git a/test/Transforms/TailCallElim/inf-recursion.ll b/test/Transforms/TailCallElim/inf-recursion.ll index e4ac928..c427869 100644 --- a/test/Transforms/TailCallElim/inf-recursion.ll +++ b/test/Transforms/TailCallElim/inf-recursion.ll @@ -30,5 +30,4 @@ define float @fabsf(float %f) { ret float %t } -declare float @fabsf(float %f) declare x86_fp80 @fabsl(x86_fp80 %f) -- cgit v1.1 From 707fd44038edf9ec0d3fe7b99d51e7c71e36f9d0 Mon Sep 17 00:00:00 2001 From: Justin Holewinski Date: Fri, 17 Jun 2011 12:12:42 +0000 Subject: PTX: Adjust rounding modes * rounding modes for fp add, mul, sub now use .rn * float -> int rounding correctly uses .rzi not .rni * 32bit fdiv for sm13 uses div.rn (instead of div.approx) * 32bit fdiv for sm10 now uses div (instead of div.approx) Approx is not IEEE 754 compatible (and should be optionally set by a flag to the backend instead). The .rn rounding modifier is the PTX default anyway, but it's better to be explicit. All these modifiers should be available by using __fmul_rz functions for example, but support will need to be added for this in the backend. Patch by Dan Bailey git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133253 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/CodeGen/PTX/add.ll | 8 ++++---- test/CodeGen/PTX/cvt.ll | 16 ++++++++-------- test/CodeGen/PTX/fdiv-sm10.ll | 2 +- test/CodeGen/PTX/fdiv-sm13.ll | 2 +- test/CodeGen/PTX/mul.ll | 8 ++++---- test/CodeGen/PTX/sub.ll | 8 ++++---- 6 files changed, 22 insertions(+), 22 deletions(-) (limited to 'test') diff --git a/test/CodeGen/PTX/add.ll b/test/CodeGen/PTX/add.ll index b89a2f6..c16be49 100644 --- a/test/CodeGen/PTX/add.ll +++ b/test/CodeGen/PTX/add.ll @@ -22,14 +22,14 @@ define ptx_device i64 @t1_u64(i64 %x, i64 %y) { } define ptx_device float @t1_f32(float %x, float %y) { -; CHECK: add.f32 r0, r1, r2 +; CHECK: add.rn.f32 r0, r1, r2 ; CHECK-NEXT: ret; %z = fadd float %x, %y ret float %z } define ptx_device double @t1_f64(double %x, double %y) { -; CHECK: add.f64 rd0, rd1, rd2 +; CHECK: add.rn.f64 rd0, rd1, rd2 ; CHECK-NEXT: ret; %z = fadd double %x, %y ret double %z @@ -57,14 +57,14 @@ define ptx_device i64 @t2_u64(i64 %x) { } define ptx_device float @t2_f32(float %x) { -; CHECK: add.f32 r0, r1, 0F3F800000; +; CHECK: add.rn.f32 r0, r1, 0F3F800000; ; CHECK-NEXT: ret; %z = fadd float %x, 1.0 ret float %z } define ptx_device double @t2_f64(double %x) { -; CHECK: add.f64 rd0, rd1, 0D3FF0000000000000; +; CHECK: add.rn.f64 rd0, rd1, 0D3FF0000000000000; ; CHECK-NEXT: ret; %z = fadd double %x, 1.0 ret double %z diff --git a/test/CodeGen/PTX/cvt.ll b/test/CodeGen/PTX/cvt.ll index 984cb4d..bf18bd7 100644 --- a/test/CodeGen/PTX/cvt.ll +++ b/test/CodeGen/PTX/cvt.ll @@ -31,7 +31,7 @@ define ptx_device i32 @cvt_pred_i64(i64 %x, i1 %y) { } define ptx_device i32 @cvt_pred_f32(float %x, i1 %y) { -; CHECK: cvt.rni.pred.f32 p0, r1; +; CHECK: cvt.rzi.pred.f32 p0, r1; ; CHECK: ret; %a = fptoui float %x to i1 %b = and i1 %a, %y @@ -40,7 +40,7 @@ define ptx_device i32 @cvt_pred_f32(float %x, i1 %y) { } define ptx_device i32 @cvt_pred_f64(double %x, i1 %y) { -; CHECK: cvt.rni.pred.f64 p0, rd1; +; CHECK: cvt.rzi.pred.f64 p0, rd1; ; CHECK: ret; %a = fptoui double %x to i1 %b = and i1 %a, %y @@ -72,14 +72,14 @@ define ptx_device i16 @cvt_i16_i64(i64 %x) { } define ptx_device i16 @cvt_i16_f32(float %x) { -; CHECK: cvt.rni.u16.f32 rh0, r1; +; CHECK: cvt.rzi.u16.f32 rh0, r1; ; CHECK: ret; %a = fptoui float %x to i16 ret i16 %a } define ptx_device i16 @cvt_i16_f64(double %x) { -; CHECK: cvt.rni.u16.f64 rh0, rd1; +; CHECK: cvt.rzi.u16.f64 rh0, rd1; ; CHECK: ret; %a = fptoui double %x to i16 ret i16 %a @@ -109,14 +109,14 @@ define ptx_device i32 @cvt_i32_i64(i64 %x) { } define ptx_device i32 @cvt_i32_f32(float %x) { -; CHECK: cvt.rni.u32.f32 r0, r1; +; CHECK: cvt.rzi.u32.f32 r0, r1; ; CHECK: ret; %a = fptoui float %x to i32 ret i32 %a } define ptx_device i32 @cvt_i32_f64(double %x) { -; CHECK: cvt.rni.u32.f64 r0, rd1; +; CHECK: cvt.rzi.u32.f64 r0, rd1; ; CHECK: ret; %a = fptoui double %x to i32 ret i32 %a @@ -146,14 +146,14 @@ define ptx_device i64 @cvt_i64_i32(i32 %x) { } define ptx_device i64 @cvt_i64_f32(float %x) { -; CHECK: cvt.rni.u64.f32 rd0, r1; +; CHECK: cvt.rzi.u64.f32 rd0, r1; ; CHECK: ret; %a = fptoui float %x to i64 ret i64 %a } define ptx_device i64 @cvt_i64_f64(double %x) { -; CHECK: cvt.rni.u64.f64 rd0, rd1; +; CHECK: cvt.rzi.u64.f64 rd0, rd1; ; CHECK: ret; %a = fptoui double %x to i64 ret i64 %a diff --git a/test/CodeGen/PTX/fdiv-sm10.ll b/test/CodeGen/PTX/fdiv-sm10.ll index 9aff251..eb32222 100644 --- a/test/CodeGen/PTX/fdiv-sm10.ll +++ b/test/CodeGen/PTX/fdiv-sm10.ll @@ -1,7 +1,7 @@ ; RUN: llc < %s -march=ptx32 -mattr=+sm10 | FileCheck %s define ptx_device float @t1_f32(float %x, float %y) { -; CHECK: div.approx.f32 r0, r1, r2; +; CHECK: div.f32 r0, r1, r2; ; CHECK-NEXT: ret; %a = fdiv float %x, %y ret float %a diff --git a/test/CodeGen/PTX/fdiv-sm13.ll b/test/CodeGen/PTX/fdiv-sm13.ll index 84e0ada..ad24f35 100644 --- a/test/CodeGen/PTX/fdiv-sm13.ll +++ b/test/CodeGen/PTX/fdiv-sm13.ll @@ -1,7 +1,7 @@ ; RUN: llc < %s -march=ptx32 -mattr=+sm13 | FileCheck %s define ptx_device float @t1_f32(float %x, float %y) { -; CHECK: div.approx.f32 r0, r1, r2; +; CHECK: div.rn.f32 r0, r1, r2; ; CHECK-NEXT: ret; %a = fdiv float %x, %y ret float %a diff --git a/test/CodeGen/PTX/mul.ll b/test/CodeGen/PTX/mul.ll index 93f94e3..2093556 100644 --- a/test/CodeGen/PTX/mul.ll +++ b/test/CodeGen/PTX/mul.ll @@ -11,28 +11,28 @@ ;} define ptx_device float @t1_f32(float %x, float %y) { -; CHECK: mul.f32 r0, r1, r2 +; CHECK: mul.rn.f32 r0, r1, r2 ; CHECK-NEXT: ret; %z = fmul float %x, %y ret float %z } define ptx_device double @t1_f64(double %x, double %y) { -; CHECK: mul.f64 rd0, rd1, rd2 +; CHECK: mul.rn.f64 rd0, rd1, rd2 ; CHECK-NEXT: ret; %z = fmul double %x, %y ret double %z } define ptx_device float @t2_f32(float %x) { -; CHECK: mul.f32 r0, r1, 0F40A00000; +; CHECK: mul.rn.f32 r0, r1, 0F40A00000; ; CHECK-NEXT: ret; %z = fmul float %x, 5.0 ret float %z } define ptx_device double @t2_f64(double %x) { -; CHECK: mul.f64 rd0, rd1, 0D4014000000000000; +; CHECK: mul.rn.f64 rd0, rd1, 0D4014000000000000; ; CHECK-NEXT: ret; %z = fmul double %x, 5.0 ret double %z diff --git a/test/CodeGen/PTX/sub.ll b/test/CodeGen/PTX/sub.ll index 9efeaac..4d55280 100644 --- a/test/CodeGen/PTX/sub.ll +++ b/test/CodeGen/PTX/sub.ll @@ -22,14 +22,14 @@ define ptx_device i64 @t1_u64(i64 %x, i64 %y) { } define ptx_device float @t1_f32(float %x, float %y) { -; CHECK: sub.f32 r0, r1, r2 +; CHECK: sub.rn.f32 r0, r1, r2 ; CHECK-NEXT: ret; %z = fsub float %x, %y ret float %z } define ptx_device double @t1_f64(double %x, double %y) { -; CHECK: sub.f64 rd0, rd1, rd2 +; CHECK: sub.rn.f64 rd0, rd1, rd2 ; CHECK-NEXT: ret; %z = fsub double %x, %y ret double %z @@ -57,14 +57,14 @@ define ptx_device i64 @t2_u64(i64 %x) { } define ptx_device float @t2_f32(float %x) { -; CHECK: add.f32 r0, r1, 0FBF800000; +; CHECK: add.rn.f32 r0, r1, 0FBF800000; ; CHECK-NEXT: ret; %z = fsub float %x, 1.0 ret float %z } define ptx_device double @t2_f64(double %x) { -; CHECK: add.f64 rd0, rd1, 0DBFF0000000000000; +; CHECK: add.rn.f64 rd0, rd1, 0DBFF0000000000000; ; CHECK-NEXT: ret; %z = fsub double %x, 1.0 ret double %z -- cgit v1.1 From 33ded7333d9c21bbd2f81ece2b6d297c872d38e1 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Fri, 17 Jun 2011 14:16:17 +0000 Subject: Test for previous commit. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133256 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/DebugInfo/X86/earlydup-crash.ll | 85 ++++++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 test/DebugInfo/X86/earlydup-crash.ll (limited to 'test') diff --git a/test/DebugInfo/X86/earlydup-crash.ll b/test/DebugInfo/X86/earlydup-crash.ll new file mode 100644 index 0000000..5bd0c7e --- /dev/null +++ b/test/DebugInfo/X86/earlydup-crash.ll @@ -0,0 +1,85 @@ +; RUN: llc %s -mtriple=i386-apple-macosx10.6.7 -o /dev/null + +; This used to crash because early dup was not ignoring debug instructions. + +%struct.cpp_dir = type { %struct.cpp_dir*, i8*, i32, i8, i8**, i8*, i8* (i8*, %struct.cpp_dir*)*, i64, i32, i8 } + +declare void @llvm.dbg.value(metadata, i64, metadata) nounwind readnone + +define internal i8* @framework_construct_pathname(i8* %fname, %struct.cpp_dir* %dir) nounwind ssp { +entry: + br i1 undef, label %bb33, label %bb + +bb: ; preds = %entry + %tmp = icmp eq i32 undef, 0 + %tmp1 = add i32 0, 11 + call void @llvm.dbg.value(metadata !{i32 %tmp1}, i64 0, metadata !0) + br i1 undef, label %bb18, label %bb31.preheader + +bb31.preheader: ; preds = %bb19, %bb + %tmp2 = getelementptr inbounds i8* %fname, i32 0 + br label %bb31 + +bb18: ; preds = %bb + %tmp3 = icmp eq i32 undef, 0 + br i1 %tmp3, label %bb19, label %bb33 + +bb19: ; preds = %bb18 + call void @foobar(i32 0) + br label %bb31.preheader + +bb22: ; preds = %bb31 + %tmp4 = add i32 0, %tmp1 + call void @foobar(i32 %tmp4) + br i1 undef, label %bb33, label %bb31 + +bb31: ; preds = %bb22, %bb31.preheader + br i1 false, label %bb33, label %bb22 + +bb33: ; preds = %bb31, %bb22, %bb18, %entry + ret i8* undef +} + +declare void @foobar(i32) + +!0 = metadata !{i32 590080, metadata !1, metadata !"frname_len", metadata !3, i32 517, metadata !38, i32 0} ; [ DW_TAG_auto_variable ] +!1 = metadata !{i32 589835, metadata !2, i32 515, i32 0, metadata !3, i32 19} ; [ DW_TAG_lexical_block ] +!2 = metadata !{i32 589870, i32 0, metadata !3, metadata !"framework_construct_pathname", metadata !"framework_construct_pathname", metadata !"", metadata !3, i32 515, metadata !5, i1 true, i1 true, i32 0, i32 0, null, i32 256, i1 true, i8* (i8*, %struct.cpp_dir*)* @framework_construct_pathname} ; [ DW_TAG_subprogram ] +!3 = metadata !{i32 589865, metadata !"darwin-c.c", metadata !"/Users/espindola/llvm/build-llvm-gcc/gcc/../../llvm-gcc-4.2/gcc/config", metadata !4} ; [ DW_TAG_file_type ] +!4 = metadata !{i32 589841, i32 0, i32 1, metadata !"/Users/espindola/llvm/build-llvm-gcc/gcc/../../llvm-gcc-4.2/gcc/config/darwin-c.c", metadata !"/Users/espindola/llvm/build-llvm-gcc/gcc", metadata !"4.2.1 (Based on Apple Inc. build 5658) (LLVM build)", i1 true, i1 true, metadata !"", i32 0} ; [ DW_TAG_compile_unit ] +!5 = metadata !{i32 589845, metadata !3, metadata !"", metadata !3, i32 0, i64 0, i64 0, i64 0, i32 0, null, metadata !6, i32 0, null} ; [ DW_TAG_subroutine_type ] +!6 = metadata !{metadata !7, metadata !9, metadata !11} +!7 = metadata !{i32 589839, metadata !3, metadata !"", metadata !3, i32 0, i64 32, i64 32, i64 0, i32 0, metadata !8} ; [ DW_TAG_pointer_type ] +!8 = metadata !{i32 589860, metadata !3, metadata !"char", metadata !3, i32 0, i64 8, i64 8, i64 0, i32 0, i32 6} ; [ DW_TAG_base_type ] +!9 = metadata !{i32 589839, metadata !3, metadata !"", metadata !3, i32 0, i64 32, i64 32, i64 0, i32 0, metadata !10} ; [ DW_TAG_pointer_type ] +!10 = metadata !{i32 589862, metadata !3, metadata !"", metadata !3, i32 0, i64 8, i64 8, i64 0, i32 0, metadata !8} ; [ DW_TAG_const_type ] +!11 = metadata !{i32 589839, metadata !3, metadata !"", metadata !3, i32 0, i64 32, i64 32, i64 0, i32 0, metadata !12} ; [ DW_TAG_pointer_type ] +!12 = metadata !{i32 589846, metadata !13, metadata !"cpp_dir", metadata !13, i32 45, i64 0, i64 0, i64 0, i32 0, metadata !14} ; [ DW_TAG_typedef ] +!13 = metadata !{i32 589865, metadata !"cpplib.h", metadata !"/Users/espindola/llvm/build-llvm-gcc/gcc/../../llvm-gcc-4.2/gcc/../libcpp/include", metadata !4} ; [ DW_TAG_file_type ] +!14 = metadata !{i32 589843, metadata !3, metadata !"cpp_dir", metadata !13, i32 43, i64 352, i64 32, i64 0, i32 0, null, metadata !15, i32 0, null} ; [ DW_TAG_structure_type ] +!15 = metadata !{metadata !16, metadata !18, metadata !19, metadata !21, metadata !23, metadata !25, metadata !27, metadata !29, metadata !33, metadata !36} +!16 = metadata !{i32 589837, metadata !14, metadata !"next", metadata !13, i32 572, i64 32, i64 32, i64 0, i32 0, metadata !17} ; [ DW_TAG_member ] +!17 = metadata !{i32 589839, metadata !3, metadata !"", metadata !3, i32 0, i64 32, i64 32, i64 0, i32 0, metadata !14} ; [ DW_TAG_pointer_type ] +!18 = metadata !{i32 589837, metadata !14, metadata !"name", metadata !13, i32 575, i64 32, i64 32, i64 32, i32 0, metadata !7} ; [ DW_TAG_member ] +!19 = metadata !{i32 589837, metadata !14, metadata !"len", metadata !13, i32 576, i64 32, i64 32, i64 64, i32 0, metadata !20} ; [ DW_TAG_member ] +!20 = metadata !{i32 589860, metadata !3, metadata !"unsigned int", metadata !3, i32 0, i64 32, i64 32, i64 0, i32 0, i32 7} ; [ DW_TAG_base_type ] +!21 = metadata !{i32 589837, metadata !14, metadata !"sysp", metadata !13, i32 580, i64 8, i64 8, i64 96, i32 0, metadata !22} ; [ DW_TAG_member ] +!22 = metadata !{i32 589860, metadata !3, metadata !"unsigned char", metadata !3, i32 0, i64 8, i64 8, i64 0, i32 0, i32 8} ; [ DW_TAG_base_type ] +!23 = metadata !{i32 589837, metadata !14, metadata !"name_map", metadata !13, i32 584, i64 32, i64 32, i64 128, i32 0, metadata !24} ; [ DW_TAG_member ] +!24 = metadata !{i32 589839, metadata !3, metadata !"", metadata !3, i32 0, i64 32, i64 32, i64 0, i32 0, metadata !9} ; [ DW_TAG_pointer_type ] +!25 = metadata !{i32 589837, metadata !14, metadata !"header_map", metadata !13, i32 590, i64 32, i64 32, i64 160, i32 0, metadata !26} ; [ DW_TAG_member ] +!26 = metadata !{i32 589839, metadata !3, metadata !"", metadata !3, i32 0, i64 32, i64 32, i64 0, i32 0, null} ; [ DW_TAG_pointer_type ] +!27 = metadata !{i32 589837, metadata !14, metadata !"construct", metadata !13, i32 597, i64 32, i64 32, i64 192, i32 0, metadata !28} ; [ DW_TAG_member ] +!28 = metadata !{i32 589839, metadata !3, metadata !"", metadata !3, i32 0, i64 32, i64 32, i64 0, i32 0, metadata !5} ; [ DW_TAG_pointer_type ] +!29 = metadata !{i32 589837, metadata !14, metadata !"ino", metadata !13, i32 601, i64 64, i64 64, i64 224, i32 0, metadata !30} ; [ DW_TAG_member ] +!30 = metadata !{i32 589846, metadata !31, metadata !"ino_t", metadata !31, i32 141, i64 0, i64 0, i64 0, i32 0, metadata !32} ; [ DW_TAG_typedef ] +!31 = metadata !{i32 589865, metadata !"types.h", metadata !"/usr/include/sys", metadata !4} ; [ DW_TAG_file_type ] +!32 = metadata !{i32 589860, metadata !3, metadata !"long long unsigned int", metadata !3, i32 0, i64 64, i64 64, i64 0, i32 0, i32 7} ; [ DW_TAG_base_type ] +!33 = metadata !{i32 589837, metadata !14, metadata !"dev", metadata !13, i32 602, i64 32, i64 32, i64 288, i32 0, metadata !34} ; [ DW_TAG_member ] +!34 = metadata !{i32 589846, metadata !31, metadata !"dev_t", metadata !31, i32 107, i64 0, i64 0, i64 0, i32 0, metadata !35} ; [ DW_TAG_typedef ] +!35 = metadata !{i32 589860, metadata !3, metadata !"int", metadata !3, i32 0, i64 32, i64 32, i64 0, i32 0, i32 5} ; [ DW_TAG_base_type ] +!36 = metadata !{i32 589837, metadata !14, metadata !"user_supplied_p", metadata !13, i32 605, i64 8, i64 8, i64 320, i32 0, metadata !37} ; [ DW_TAG_member ] +!37 = metadata !{i32 589860, metadata !3, metadata !"_Bool", metadata !3, i32 0, i64 8, i64 8, i64 0, i32 0, i32 2} ; [ DW_TAG_base_type ] +!38 = metadata !{i32 589846, metadata !39, metadata !"size_t", metadata !39, i32 326, i64 0, i64 0, i64 0, i32 0, metadata !40} ; [ DW_TAG_typedef ] +!39 = metadata !{i32 589865, metadata !"stddef.h", metadata !"/Users/espindola/llvm/build-llvm-gcc/./prev-gcc/include", metadata !4} ; [ DW_TAG_file_type ] +!40 = metadata !{i32 589860, metadata !3, metadata !"long unsigned int", metadata !3, i32 0, i64 32, i64 32, i64 0, i32 0, i32 7} ; [ DW_TAG_base_type ] -- cgit v1.1 From 951cd021c10966f3ae146588b2466deaef730cb6 Mon Sep 17 00:00:00 2001 From: Roman Divacky Date: Fri, 17 Jun 2011 15:21:10 +0000 Subject: Fix a few places where 32bit instructions/registerset were used on PPC64. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133260 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/CodeGen/PowerPC/ppc64-crash.ll | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 test/CodeGen/PowerPC/ppc64-crash.ll (limited to 'test') diff --git a/test/CodeGen/PowerPC/ppc64-crash.ll b/test/CodeGen/PowerPC/ppc64-crash.ll new file mode 100644 index 0000000..073c322 --- /dev/null +++ b/test/CodeGen/PowerPC/ppc64-crash.ll @@ -0,0 +1,14 @@ +; RUN: llc %s -o - + +; ModuleID = 'undo.c' +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-v128:128:128-n32:64" +target triple = "powerpc64-unknown-freebsd" + +%struct.__sFILE = type {} +%struct.pos_T = type { i64 } + +; check that we're not copying stuff between R and X registers +define internal void @serialize_pos(%struct.pos_T* byval %pos, %struct.__sFILE* %fp) nounwind { +entry: + ret void +} -- cgit v1.1 From a16546a70bc8cdf609e9e10beb20925e54a88d77 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 17 Jun 2011 17:37:13 +0000 Subject: Stop accepting and ignoring attributes in function types. Attributes are applied to functions and call/invokes, not to types. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133266 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/CodeGen/X86/2007-10-15-CoalescerCrash.ll | 2 +- test/Feature/paramattrs.ll | 6 +++--- test/Integer/paramattrs_bt.ll | 19 ------------------- test/Transforms/InstCombine/2007-05-18-CastFoldBug.ll | 2 +- test/Transforms/InstCombine/2007-09-11-Trampoline.ll | 2 +- .../InstCombine/2007-11-25-CompatibleAttributes.ll | 2 +- 6 files changed, 7 insertions(+), 26 deletions(-) delete mode 100644 test/Integer/paramattrs_bt.ll (limited to 'test') diff --git a/test/CodeGen/X86/2007-10-15-CoalescerCrash.ll b/test/CodeGen/X86/2007-10-15-CoalescerCrash.ll index c68628d..2b56b4e 100644 --- a/test/CodeGen/X86/2007-10-15-CoalescerCrash.ll +++ b/test/CodeGen/X86/2007-10-15-CoalescerCrash.ll @@ -362,7 +362,7 @@ bb1159: ; preds = %cond_next1150 cond_true1169: ; preds = %bb1159 %tmp11741175 = trunc i64 %lsum.11225.0 to i32 ; [#uses=1] - %tmp1178 = tail call i32 (%struct._IO_FILE* noalias , i8* noalias , ...)* @fprintf( %struct._IO_FILE* noalias %file , i8* getelementptr ([49 x i8]* @.str32, i32 0, i64 0) , i32 %tmp11741175, i32 0 ) ; [#uses=0] + %tmp1178 = tail call i32 (%struct._IO_FILE* , i8* , ...)* @fprintf( %struct._IO_FILE* noalias %file , i8* getelementptr ([49 x i8]* @.str32, i32 0, i64 0) , i32 %tmp11741175, i32 0 ) ; [#uses=0] ret void UnifiedReturnBlock: ; preds = %bb1159 diff --git a/test/Feature/paramattrs.ll b/test/Feature/paramattrs.ll index 91aa460..9860f5a 100644 --- a/test/Feature/paramattrs.ll +++ b/test/Feature/paramattrs.ll @@ -2,8 +2,8 @@ ; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll ; RUN: diff %t1.ll %t2.ll -%ZFunTy = type i32(i8 zeroext) -%SFunTy = type i32(i8 signext) +%ZFunTy = type i32(i8) +%SFunTy = type i32(i8) declare signext i16 @"test"(i16 signext %arg) declare zeroext i8 @"test2" (i16 zeroext %a2) @@ -14,7 +14,7 @@ declare void @exit(i32) noreturn nounwind define i32 @main(i32 inreg %argc, i8 ** inreg %argv) nounwind { %val = trunc i32 %argc to i16 - %res1 = call signext i16 (i16 signext) *@test(i16 signext %val) + %res1 = call signext i16 (i16 ) *@test(i16 signext %val) %two = add i16 %res1, %res1 %res2 = call zeroext i8 @test2(i16 zeroext %two ) %retVal = sext i16 %two to i32 diff --git a/test/Integer/paramattrs_bt.ll b/test/Integer/paramattrs_bt.ll deleted file mode 100644 index 6db9a53..0000000 --- a/test/Integer/paramattrs_bt.ll +++ /dev/null @@ -1,19 +0,0 @@ -; RUN: llvm-as < %s | llvm-dis > %t1.ll -; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll -; RUN: diff %t1.ll %t2.ll - -%ZFunTy = type i33(i8 zeroext) -%SFunTy = type i33(i8 signext) - -declare signext i16 @"test"(i16 signext %arg) -declare zeroext i8 @"test2" (i16 zeroext %a2) - - -define i33 @main(i33 %argc, i8 **%argv) { - %val = trunc i33 %argc to i16 - %res = call signext i16 (i16 signext) *@test(i16 signext %val) - %two = add i16 %res, %res - %res2 = call zeroext i8 @test2(i16 zeroext %two ) - %retVal = sext i16 %two to i33 - ret i33 %retVal -} diff --git a/test/Transforms/InstCombine/2007-05-18-CastFoldBug.ll b/test/Transforms/InstCombine/2007-05-18-CastFoldBug.ll index 1c24df3..15988b6 100644 --- a/test/Transforms/InstCombine/2007-05-18-CastFoldBug.ll +++ b/test/Transforms/InstCombine/2007-05-18-CastFoldBug.ll @@ -3,7 +3,7 @@ define void @blah(i16* %tmp10) { entry: - call void bitcast (i8* (i8*, i8*, ...)* @objc_msgSend_stret to void (i16* sret )*)( i16* sret %tmp10 ) + call void bitcast (i8* (i8*, i8*, ...)* @objc_msgSend_stret to void (i16*)*)( i16* sret %tmp10 ) ret void } diff --git a/test/Transforms/InstCombine/2007-09-11-Trampoline.ll b/test/Transforms/InstCombine/2007-09-11-Trampoline.ll index d8f3d97..6190aa9 100644 --- a/test/Transforms/InstCombine/2007-09-11-Trampoline.ll +++ b/test/Transforms/InstCombine/2007-09-11-Trampoline.ll @@ -15,7 +15,7 @@ entry: %tmp3 = getelementptr %struct.FRAME.nest* %FRAME.0, i32 0, i32 0 ; [#uses=1] store i32 %n, i32* %tmp3, align 8 %FRAME.06 = bitcast %struct.FRAME.nest* %FRAME.0 to i8* ; [#uses=1] - %tramp = call i8* @llvm.init.trampoline( i8* %TRAMP.216.sub, i8* bitcast (i32 (%struct.FRAME.nest* nest , i32)* @f to i8*), i8* %FRAME.06 ) ; [#uses=1] + %tramp = call i8* @llvm.init.trampoline( i8* %TRAMP.216.sub, i8* bitcast (i32 (%struct.FRAME.nest* , i32)* @f to i8*), i8* %FRAME.06 ) ; [#uses=1] %tmp7 = getelementptr %struct.FRAME.nest* %FRAME.0, i32 0, i32 1 ; [#uses=1] %tmp89 = bitcast i8* %tramp to i32 (i32)* ; [#uses=2] store i32 (i32)* %tmp89, i32 (i32)** %tmp7, align 8 diff --git a/test/Transforms/InstCombine/2007-11-25-CompatibleAttributes.ll b/test/Transforms/InstCombine/2007-11-25-CompatibleAttributes.ll index 2109d34..e3192a9 100644 --- a/test/Transforms/InstCombine/2007-11-25-CompatibleAttributes.ll +++ b/test/Transforms/InstCombine/2007-11-25-CompatibleAttributes.ll @@ -5,7 +5,7 @@ define i32 @main(i32 %argc, i8** %argv) { entry: - %tmp32 = tail call i32 (i8* noalias , ...) * bitcast (i32 (i8*, ...) nounwind * @printf to i32 (i8* noalias , ...) nounwind *)( i8* getelementptr ([4 x i8]* @.str, i32 0, i32 0) , i32 0 ) nounwind ; [#uses=0] + %tmp32 = tail call i32 (i8* , ...) * bitcast (i32 (i8*, ...) * @printf to i32 (i8* , ...) *)( i8* getelementptr ([4 x i8]* @.str, i32 0, i32 0) , i32 0 ) nounwind ; [#uses=0] ret i32 undef } -- cgit v1.1 From 96a74c57d9e8fe0595ba8308eec1276cf8bcf6b0 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 17 Jun 2011 18:09:11 +0000 Subject: remove support for a bunch of obsolete instruction encodings and other backward compatibility hacks. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133273 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/Bitcode/AutoUpgradeIntrinsics.ll | 8 -- test/Bitcode/AutoUpgradeIntrinsics.ll.bc | Bin 800 -> 0 bytes test/Bitcode/neon-intrinsics.ll | 206 ------------------------------- test/Bitcode/neon-intrinsics.ll.bc | Bin 5764 -> 0 bytes test/Bitcode/sse2_loadl_pd.ll | 3 - test/Bitcode/sse2_loadl_pd.ll.bc | Bin 532 -> 0 bytes test/Bitcode/sse2_movl_dq.ll | 3 - test/Bitcode/sse2_movl_dq.ll.bc | Bin 480 -> 0 bytes test/Bitcode/sse2_movs_d.ll | 3 - test/Bitcode/sse2_movs_d.ll.bc | Bin 476 -> 0 bytes test/Bitcode/sse2_punpck_qdq.ll | 4 - test/Bitcode/sse2_punpck_qdq.ll.bc | Bin 576 -> 0 bytes test/Bitcode/sse2_shuf_pd.ll | 3 - test/Bitcode/sse2_shuf_pd.ll.bc | Bin 584 -> 0 bytes test/Bitcode/sse2_unpck_pd.ll | 4 - test/Bitcode/sse2_unpck_pd.ll.bc | Bin 572 -> 0 bytes test/Bitcode/sse41_pmulld.ll | 3 - test/Bitcode/sse41_pmulld.ll.bc | Bin 560 -> 0 bytes 18 files changed, 237 deletions(-) delete mode 100644 test/Bitcode/AutoUpgradeIntrinsics.ll delete mode 100644 test/Bitcode/AutoUpgradeIntrinsics.ll.bc delete mode 100644 test/Bitcode/neon-intrinsics.ll delete mode 100644 test/Bitcode/neon-intrinsics.ll.bc delete mode 100644 test/Bitcode/sse2_loadl_pd.ll delete mode 100644 test/Bitcode/sse2_loadl_pd.ll.bc delete mode 100644 test/Bitcode/sse2_movl_dq.ll delete mode 100644 test/Bitcode/sse2_movl_dq.ll.bc delete mode 100644 test/Bitcode/sse2_movs_d.ll delete mode 100644 test/Bitcode/sse2_movs_d.ll.bc delete mode 100644 test/Bitcode/sse2_punpck_qdq.ll delete mode 100644 test/Bitcode/sse2_punpck_qdq.ll.bc delete mode 100644 test/Bitcode/sse2_shuf_pd.ll delete mode 100644 test/Bitcode/sse2_shuf_pd.ll.bc delete mode 100644 test/Bitcode/sse2_unpck_pd.ll delete mode 100644 test/Bitcode/sse2_unpck_pd.ll.bc delete mode 100644 test/Bitcode/sse41_pmulld.ll delete mode 100644 test/Bitcode/sse41_pmulld.ll.bc (limited to 'test') diff --git a/test/Bitcode/AutoUpgradeIntrinsics.ll b/test/Bitcode/AutoUpgradeIntrinsics.ll deleted file mode 100644 index c3e2e9e..0000000 --- a/test/Bitcode/AutoUpgradeIntrinsics.ll +++ /dev/null @@ -1,8 +0,0 @@ -; This isn't really an assembly file. It just runs test on bitcode to ensure -; it is auto-upgraded. -; RUN: llvm-dis < %s.bc | FileCheck %s -; CHECK-NOT: {i32 @llvm\\.ct} -; CHECK-NOT: {llvm\\.part\\.set\\.i\[0-9\]*\\.i\[0-9\]*\\.i\[0-9\]*} -; CHECK-NOT: {llvm\\.part\\.select\\.i\[0-9\]*\\.i\[0-9\]*} -; CHECK-NOT: {llvm\\.bswap\\.i\[0-9\]*\\.i\[0-9\]*} - diff --git a/test/Bitcode/AutoUpgradeIntrinsics.ll.bc b/test/Bitcode/AutoUpgradeIntrinsics.ll.bc deleted file mode 100644 index 9de756b..0000000 Binary files a/test/Bitcode/AutoUpgradeIntrinsics.ll.bc and /dev/null differ diff --git a/test/Bitcode/neon-intrinsics.ll b/test/Bitcode/neon-intrinsics.ll deleted file mode 100644 index feb2d74..0000000 --- a/test/Bitcode/neon-intrinsics.ll +++ /dev/null @@ -1,206 +0,0 @@ -; RUN: llvm-dis < %s.bc | FileCheck %s - -; vmovls should be auto-upgraded to sext - -; CHECK: vmovls8 -; CHECK-NOT: arm.neon.vmovls.v8i16 -; CHECK: sext <8 x i8> - -; CHECK: vmovls16 -; CHECK-NOT: arm.neon.vmovls.v4i32 -; CHECK: sext <4 x i16> - -; CHECK: vmovls32 -; CHECK-NOT: arm.neon.vmovls.v2i64 -; CHECK: sext <2 x i32> - -; vmovlu should be auto-upgraded to zext - -; CHECK: vmovlu8 -; CHECK-NOT: arm.neon.vmovlu.v8i16 -; CHECK: zext <8 x i8> - -; CHECK: vmovlu16 -; CHECK-NOT: arm.neon.vmovlu.v4i32 -; CHECK: zext <4 x i16> - -; CHECK: vmovlu32 -; CHECK-NOT: arm.neon.vmovlu.v2i64 -; CHECK: zext <2 x i32> - -; vaddl/vaddw should be auto-upgraded to add with sext/zext - -; CHECK: vaddls16 -; CHECK-NOT: arm.neon.vaddls.v4i32 -; CHECK: sext <4 x i16> -; CHECK-NEXT: sext <4 x i16> -; CHECK-NEXT: add <4 x i32> - -; CHECK: vaddlu32 -; CHECK-NOT: arm.neon.vaddlu.v2i64 -; CHECK: zext <2 x i32> -; CHECK-NEXT: zext <2 x i32> -; CHECK-NEXT: add <2 x i64> - -; CHECK: vaddws8 -; CHECK-NOT: arm.neon.vaddws.v8i16 -; CHECK: sext <8 x i8> -; CHECK-NEXT: add <8 x i16> - -; CHECK: vaddwu16 -; CHECK-NOT: arm.neon.vaddwu.v4i32 -; CHECK: zext <4 x i16> -; CHECK-NEXT: add <4 x i32> - -; vsubl/vsubw should be auto-upgraded to subtract with sext/zext - -; CHECK: vsubls16 -; CHECK-NOT: arm.neon.vsubls.v4i32 -; CHECK: sext <4 x i16> -; CHECK-NEXT: sext <4 x i16> -; CHECK-NEXT: sub <4 x i32> - -; CHECK: vsublu32 -; CHECK-NOT: arm.neon.vsublu.v2i64 -; CHECK: zext <2 x i32> -; CHECK-NEXT: zext <2 x i32> -; CHECK-NEXT: sub <2 x i64> - -; CHECK: vsubws8 -; CHECK-NOT: arm.neon.vsubws.v8i16 -; CHECK: sext <8 x i8> -; CHECK-NEXT: sub <8 x i16> - -; CHECK: vsubwu16 -; CHECK-NOT: arm.neon.vsubwu.v4i32 -; CHECK: zext <4 x i16> -; CHECK-NEXT: sub <4 x i32> - -; vmull* intrinsics will remain intrinsics - -; CHECK: vmulls8 -; CHECK: arm.neon.vmulls.v8i16 - -; CHECK: vmullu16 -; CHECK: arm.neon.vmullu.v4i32 - -; CHECK: vmullp8 -; CHECK: arm.neon.vmullp.v8i16 - -; vmlal should be auto-upgraded to multiply/add with sext/zext - -; CHECK: vmlals32 -; CHECK-NOT: arm.neon.vmlals.v2i64 -; CHECK: sext <2 x i32> -; CHECK-NEXT: sext <2 x i32> -; CHECK-NEXT: mul <2 x i64> -; CHECK-NEXT: add <2 x i64> - -; CHECK: vmlalu8 -; CHECK-NOT: arm.neon.vmlalu.v8i16 -; CHECK: zext <8 x i8> -; CHECK-NEXT: zext <8 x i8> -; CHECK-NEXT: mul <8 x i16> -; CHECK-NEXT: add <8 x i16> - -; vmlsl should be auto-upgraded to multiply/sub with sext/zext - -; CHECK: vmlsls16 -; CHECK-NOT: arm.neon.vmlsls.v4i32 -; CHECK: sext <4 x i16> -; CHECK-NEXT: sext <4 x i16> -; CHECK-NEXT: mul <4 x i32> -; CHECK-NEXT: sub <4 x i32> - -; CHECK: vmlslu32 -; CHECK-NOT: arm.neon.vmlslu.v2i64 -; CHECK: zext <2 x i32> -; CHECK-NEXT: zext <2 x i32> -; CHECK-NEXT: mul <2 x i64> -; CHECK-NEXT: sub <2 x i64> - -; vaba should be auto-upgraded to vabd + add - -; CHECK: vabas32 -; CHECK-NOT: arm.neon.vabas.v2i32 -; CHECK: arm.neon.vabds.v2i32 -; CHECK-NEXT: add <2 x i32> - -; CHECK: vabaQu8 -; CHECK-NOT: arm.neon.vabau.v16i8 -; CHECK: arm.neon.vabdu.v16i8 -; CHECK-NEXT: add <16 x i8> - -; vabal should be auto-upgraded to vabd with zext + add - -; CHECK: vabals16 -; CHECK-NOT: arm.neon.vabals.v4i32 -; CHECK: arm.neon.vabds.v4i16 -; CHECK-NEXT: zext <4 x i16> -; CHECK-NEXT: add <4 x i32> - -; CHECK: vabalu32 -; CHECK-NOT: arm.neon.vabalu.v2i64 -; CHECK: arm.neon.vabdu.v2i32 -; CHECK-NEXT: zext <2 x i32> -; CHECK-NEXT: add <2 x i64> - -; vabdl should be auto-upgraded to vabd with zext - -; CHECK: vabdls8 -; CHECK-NOT: arm.neon.vabdls.v8i16 -; CHECK: arm.neon.vabds.v8i8 -; CHECK-NEXT: zext <8 x i8> - -; CHECK: vabdlu16 -; CHECK-NOT: arm.neon.vabdlu.v4i32 -; CHECK: arm.neon.vabdu.v4i16 -; CHECK-NEXT: zext <4 x i16> - -; vmovn should be auto-upgraded to trunc - -; CHECK: vmovni16 -; CHECK-NOT: arm.neon.vmovn.v8i8 -; CHECK: trunc <8 x i16> - -; CHECK: vmovni32 -; CHECK-NOT: arm.neon.vmovn.v4i16 -; CHECK: trunc <4 x i32> - -; CHECK: vmovni64 -; CHECK-NOT: arm.neon.vmovn.v2i32 -; CHECK: trunc <2 x i64> - -; vld* and vst* intrinsic calls need an alignment argument (defaulted to 1) - -; CHECK: vld1i8 -; CHECK: i32 1 -; CHECK: vld2Qi16 -; CHECK: i32 1 -; CHECK: vld3i32 -; CHECK: i32 1 -; CHECK: vld4Qf -; CHECK: i32 1 - -; CHECK: vst1i8 -; CHECK: i32 1 -; CHECK: vst2Qi16 -; CHECK: i32 1 -; CHECK: vst3i32 -; CHECK: i32 1 -; CHECK: vst4Qf -; CHECK: i32 1 - -; CHECK: vld2laneQi16 -; CHECK: i32 1 -; CHECK: vld3lanei32 -; CHECK: i32 1 -; CHECK: vld4laneQf -; CHECK: i32 1 - -; CHECK: vst2laneQi16 -; CHECK: i32 1 -; CHECK: vst3lanei32 -; CHECK: i32 1 -; CHECK: vst4laneQf -; CHECK: i32 1 diff --git a/test/Bitcode/neon-intrinsics.ll.bc b/test/Bitcode/neon-intrinsics.ll.bc deleted file mode 100644 index cabc3c9..0000000 Binary files a/test/Bitcode/neon-intrinsics.ll.bc and /dev/null differ diff --git a/test/Bitcode/sse2_loadl_pd.ll b/test/Bitcode/sse2_loadl_pd.ll deleted file mode 100644 index 6cb0da5..0000000 --- a/test/Bitcode/sse2_loadl_pd.ll +++ /dev/null @@ -1,3 +0,0 @@ -; RUN: llvm-dis < %s.bc | FileCheck %s -; CHECK-NOT: {i32 @llvm\\.loadl.pd} -; CHECK: shufflevector diff --git a/test/Bitcode/sse2_loadl_pd.ll.bc b/test/Bitcode/sse2_loadl_pd.ll.bc deleted file mode 100644 index 402cbe1..0000000 Binary files a/test/Bitcode/sse2_loadl_pd.ll.bc and /dev/null differ diff --git a/test/Bitcode/sse2_movl_dq.ll b/test/Bitcode/sse2_movl_dq.ll deleted file mode 100644 index 2fc0149..0000000 --- a/test/Bitcode/sse2_movl_dq.ll +++ /dev/null @@ -1,3 +0,0 @@ -; RUN: llvm-dis < %s.bc | FileCheck %s -; CHECK-NOT: {i32 @llvm\\.movl.dq} -; CHECK: shufflevector diff --git a/test/Bitcode/sse2_movl_dq.ll.bc b/test/Bitcode/sse2_movl_dq.ll.bc deleted file mode 100644 index 74d1826..0000000 Binary files a/test/Bitcode/sse2_movl_dq.ll.bc and /dev/null differ diff --git a/test/Bitcode/sse2_movs_d.ll b/test/Bitcode/sse2_movs_d.ll deleted file mode 100644 index ab82c43..0000000 --- a/test/Bitcode/sse2_movs_d.ll +++ /dev/null @@ -1,3 +0,0 @@ -; RUN: llvm-dis < %s.bc | FileCheck %s -; CHECK-NOT: {i32 @llvm\\.movs.d} -; CHECK: shufflevector diff --git a/test/Bitcode/sse2_movs_d.ll.bc b/test/Bitcode/sse2_movs_d.ll.bc deleted file mode 100644 index 719d529..0000000 Binary files a/test/Bitcode/sse2_movs_d.ll.bc and /dev/null differ diff --git a/test/Bitcode/sse2_punpck_qdq.ll b/test/Bitcode/sse2_punpck_qdq.ll deleted file mode 100644 index 4c68af5..0000000 --- a/test/Bitcode/sse2_punpck_qdq.ll +++ /dev/null @@ -1,4 +0,0 @@ -; RUN: llvm-dis < %s.bc | FileCheck %s -; CHECK-NOT: {i32 @llvm\\.punpckh.qdq} -; CHECK-NOT: {i32 @llvm\\.punpckl.qdq} -; CHECK: shufflevector diff --git a/test/Bitcode/sse2_punpck_qdq.ll.bc b/test/Bitcode/sse2_punpck_qdq.ll.bc deleted file mode 100644 index 7c1b7ed..0000000 Binary files a/test/Bitcode/sse2_punpck_qdq.ll.bc and /dev/null differ diff --git a/test/Bitcode/sse2_shuf_pd.ll b/test/Bitcode/sse2_shuf_pd.ll deleted file mode 100644 index 1ba6a1d..0000000 --- a/test/Bitcode/sse2_shuf_pd.ll +++ /dev/null @@ -1,3 +0,0 @@ -; RUN: llvm-dis < %s.bc | FileCheck %s -; CHECK-NOT: {i32 @llvm\\.shuf.pd} -; CHECK: shufflevector diff --git a/test/Bitcode/sse2_shuf_pd.ll.bc b/test/Bitcode/sse2_shuf_pd.ll.bc deleted file mode 100644 index 832c39e..0000000 Binary files a/test/Bitcode/sse2_shuf_pd.ll.bc and /dev/null differ diff --git a/test/Bitcode/sse2_unpck_pd.ll b/test/Bitcode/sse2_unpck_pd.ll deleted file mode 100644 index 99b61b6..0000000 --- a/test/Bitcode/sse2_unpck_pd.ll +++ /dev/null @@ -1,4 +0,0 @@ -; RUN: llvm-dis < %s.bc | FileCheck %s -; CHECK-NOT: {i32 @llvm\\.unpckh.pd} -; CHECK-NOT: {i32 @llvm\\.unpckl.pd} -; CHECK: shufflevector diff --git a/test/Bitcode/sse2_unpck_pd.ll.bc b/test/Bitcode/sse2_unpck_pd.ll.bc deleted file mode 100644 index 4fb829c..0000000 Binary files a/test/Bitcode/sse2_unpck_pd.ll.bc and /dev/null differ diff --git a/test/Bitcode/sse41_pmulld.ll b/test/Bitcode/sse41_pmulld.ll deleted file mode 100644 index 752786d..0000000 --- a/test/Bitcode/sse41_pmulld.ll +++ /dev/null @@ -1,3 +0,0 @@ -; RUN: llvm-dis < %s.bc | FileCheck %s -; CHECK-NOT: {i32 @llvm\\.pmulld} -; CHECK: mul diff --git a/test/Bitcode/sse41_pmulld.ll.bc b/test/Bitcode/sse41_pmulld.ll.bc deleted file mode 100644 index bd66f0a..0000000 Binary files a/test/Bitcode/sse41_pmulld.ll.bc and /dev/null differ -- cgit v1.1 From ed6fa188c4cf2d382991dd054f7c5157420908c3 Mon Sep 17 00:00:00 2001 From: Galina Kistanova Date: Fri, 17 Jun 2011 18:26:23 +0000 Subject: est 2008-06-04-indirectmem.ll is X86-specific. Move to X86 folder. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133275 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/CodeGen/CBackend/2008-06-04-IndirectMem.ll | 12 ------------ test/CodeGen/X86/2008-06-04-IndirectMem.ll | 12 ++++++++++++ 2 files changed, 12 insertions(+), 12 deletions(-) delete mode 100644 test/CodeGen/CBackend/2008-06-04-IndirectMem.ll create mode 100644 test/CodeGen/X86/2008-06-04-IndirectMem.ll (limited to 'test') diff --git a/test/CodeGen/CBackend/2008-06-04-IndirectMem.ll b/test/CodeGen/CBackend/2008-06-04-IndirectMem.ll deleted file mode 100644 index 054a3ca..0000000 --- a/test/CodeGen/CBackend/2008-06-04-IndirectMem.ll +++ /dev/null @@ -1,12 +0,0 @@ -; RUN: llc < %s -march=c | grep {"m"(llvm_cbe_newcw))} -; PR2407 - -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-f80:32:32" -target triple = "i386-pc-linux-gnu" - -define void @foo() { - %newcw = alloca i16 ; [#uses=2] - call void asm sideeffect "fldcw $0", "*m,~{dirflag},~{fpsr},~{flags}"( i16* -%newcw ) nounwind - ret void -} diff --git a/test/CodeGen/X86/2008-06-04-IndirectMem.ll b/test/CodeGen/X86/2008-06-04-IndirectMem.ll new file mode 100644 index 0000000..054a3ca --- /dev/null +++ b/test/CodeGen/X86/2008-06-04-IndirectMem.ll @@ -0,0 +1,12 @@ +; RUN: llc < %s -march=c | grep {"m"(llvm_cbe_newcw))} +; PR2407 + +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-f80:32:32" +target triple = "i386-pc-linux-gnu" + +define void @foo() { + %newcw = alloca i16 ; [#uses=2] + call void asm sideeffect "fldcw $0", "*m,~{dirflag},~{fpsr},~{flags}"( i16* +%newcw ) nounwind + ret void +} -- cgit v1.1 From 362fee90b9a1d64ac091755466caf6a94ade22eb Mon Sep 17 00:00:00 2001 From: Eric Christopher Date: Fri, 17 Jun 2011 20:41:29 +0000 Subject: Lower multiply with overflow checking to __mulo calls if we haven't been able to lower them any other way. Fixes rdar://9090077 and rdar://9210061 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133288 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/CodeGen/X86/muloti.ll | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 test/CodeGen/X86/muloti.ll (limited to 'test') diff --git a/test/CodeGen/X86/muloti.ll b/test/CodeGen/X86/muloti.ll new file mode 100644 index 0000000..eb9b646 --- /dev/null +++ b/test/CodeGen/X86/muloti.ll @@ -0,0 +1,38 @@ +; RUN: llc < %s -mtriple=x86_64-apple-darwin | FileCheck %s +%0 = type { i64, i64 } +%1 = type { i128, i1 } + +@.str = private unnamed_addr constant [11 x i8] c"%llx %llx\0A\00", align 1 + +define %0 @x(i64 %a.coerce0, i64 %a.coerce1, i64 %b.coerce0, i64 %b.coerce1) nounwind uwtable ssp { +entry: + %tmp16 = zext i64 %a.coerce0 to i128 + %tmp11 = zext i64 %a.coerce1 to i128 + %tmp12 = shl nuw i128 %tmp11, 64 + %ins14 = or i128 %tmp12, %tmp16 + %tmp6 = zext i64 %b.coerce0 to i128 + %tmp3 = zext i64 %b.coerce1 to i128 + %tmp4 = shl nuw i128 %tmp3, 64 + %ins = or i128 %tmp4, %tmp6 + %0 = tail call %1 @llvm.smul.with.overflow.i128(i128 %ins14, i128 %ins) +; CHECK: callq ___muloti4 + %1 = extractvalue %1 %0, 0 + %2 = extractvalue %1 %0, 1 + br i1 %2, label %overflow, label %nooverflow + +overflow: ; preds = %entry + tail call void @llvm.trap() + unreachable + +nooverflow: ; preds = %entry + %tmp20 = trunc i128 %1 to i64 + %tmp21 = insertvalue %0 undef, i64 %tmp20, 0 + %tmp22 = lshr i128 %1, 64 + %tmp23 = trunc i128 %tmp22 to i64 + %tmp24 = insertvalue %0 %tmp21, i64 %tmp23, 1 + ret %0 %tmp24 +} + +declare %1 @llvm.smul.with.overflow.i128(i128, i128) nounwind readnone + +declare void @llvm.trap() nounwind -- cgit v1.1 From 6d6c55bc270d1bee8561d3ce00d2ca9ced3bb506 Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Fri, 17 Jun 2011 20:47:21 +0000 Subject: Add an alternative rev16 pattern. We should figure out a better way to handle these complex rev patterns. rdar://9609108 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133289 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/CodeGen/ARM/rev.ll | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'test') diff --git a/test/CodeGen/ARM/rev.ll b/test/CodeGen/ARM/rev.ll index 5739086..c210a55 100644 --- a/test/CodeGen/ARM/rev.ll +++ b/test/CodeGen/ARM/rev.ll @@ -67,3 +67,20 @@ entry: %or = or i32 %shr, %and ret i32 %or } + +; rdar://9609108 +define i32 @test6(i32 %x) nounwind readnone { +entry: +; CHECK: test6 +; CHECK: rev16 r0, r0 + %and = shl i32 %x, 8 + %shl = and i32 %and, 65280 + %and2 = lshr i32 %x, 8 + %shr11 = and i32 %and2, 255 + %shr5 = and i32 %and2, 16711680 + %shl9 = and i32 %and, -16777216 + %or = or i32 %shr5, %shl9 + %or6 = or i32 %or, %shr11 + %or10 = or i32 %or6, %shl + ret i32 %or10 +} -- cgit v1.1 From da26ad501b9125c323f58f756826cf17114a9e6f Mon Sep 17 00:00:00 2001 From: Nadav Rotem Date: Fri, 17 Jun 2011 20:54:12 +0000 Subject: Fix a bug in the type-lowering of integer-promoted elements. Add a check that the newly created simple type is valid before checking its legality. Re-commit the test file. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133291 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/CodeGen/X86/mem-promote-integers.ll | 1468 ++++++++++++++++++++++++++++++ 1 file changed, 1468 insertions(+) create mode 100644 test/CodeGen/X86/mem-promote-integers.ll (limited to 'test') diff --git a/test/CodeGen/X86/mem-promote-integers.ll b/test/CodeGen/X86/mem-promote-integers.ll new file mode 100644 index 0000000..7be3325 --- /dev/null +++ b/test/CodeGen/X86/mem-promote-integers.ll @@ -0,0 +1,1468 @@ +; Test the basic functionality of integer element promotions of different types. +; This tests checks passing of arguments, loading and storing to memory and +; basic arithmetic. +; RUN: llc -march=x86 -promote-elements < %s +; RUN: llc -march=x86-64 -promote-elements < %s + +define <1 x i8> @test_1xi8(<1 x i8> %x, <1 x i8>* %b) { + %bb = load <1 x i8>* %b + %tt = xor <1 x i8> %x, %bb + store <1 x i8> %tt, <1 x i8>* %b + br label %next + +next: + ret <1 x i8> %tt +} + + +define <1 x i16> @test_1xi16(<1 x i16> %x, <1 x i16>* %b) { + %bb = load <1 x i16>* %b + %tt = xor <1 x i16> %x, %bb + store <1 x i16> %tt, <1 x i16>* %b + br label %next + +next: + ret <1 x i16> %tt +} + + +define <1 x i32> @test_1xi32(<1 x i32> %x, <1 x i32>* %b) { + %bb = load <1 x i32>* %b + %tt = xor <1 x i32> %x, %bb + store <1 x i32> %tt, <1 x i32>* %b + br label %next + +next: + ret <1 x i32> %tt +} + + +define <1 x i64> @test_1xi64(<1 x i64> %x, <1 x i64>* %b) { + %bb = load <1 x i64>* %b + %tt = xor <1 x i64> %x, %bb + store <1 x i64> %tt, <1 x i64>* %b + br label %next + +next: + ret <1 x i64> %tt +} + + +define <1 x i128> @test_1xi128(<1 x i128> %x, <1 x i128>* %b) { + %bb = load <1 x i128>* %b + %tt = xor <1 x i128> %x, %bb + store <1 x i128> %tt, <1 x i128>* %b + br label %next + +next: + ret <1 x i128> %tt +} + + +define <1 x i256> @test_1xi256(<1 x i256> %x, <1 x i256>* %b) { + %bb = load <1 x i256>* %b + %tt = xor <1 x i256> %x, %bb + store <1 x i256> %tt, <1 x i256>* %b + br label %next + +next: + ret <1 x i256> %tt +} + + +define <1 x i512> @test_1xi512(<1 x i512> %x, <1 x i512>* %b) { + %bb = load <1 x i512>* %b + %tt = xor <1 x i512> %x, %bb + store <1 x i512> %tt, <1 x i512>* %b + br label %next + +next: + ret <1 x i512> %tt +} + + +define <2 x i8> @test_2xi8(<2 x i8> %x, <2 x i8>* %b) { + %bb = load <2 x i8>* %b + %tt = xor <2 x i8> %x, %bb + store <2 x i8> %tt, <2 x i8>* %b + br label %next + +next: + ret <2 x i8> %tt +} + + +define <2 x i16> @test_2xi16(<2 x i16> %x, <2 x i16>* %b) { + %bb = load <2 x i16>* %b + %tt = xor <2 x i16> %x, %bb + store <2 x i16> %tt, <2 x i16>* %b + br label %next + +next: + ret <2 x i16> %tt +} + + +define <2 x i32> @test_2xi32(<2 x i32> %x, <2 x i32>* %b) { + %bb = load <2 x i32>* %b + %tt = xor <2 x i32> %x, %bb + store <2 x i32> %tt, <2 x i32>* %b + br label %next + +next: + ret <2 x i32> %tt +} + + +define <2 x i64> @test_2xi64(<2 x i64> %x, <2 x i64>* %b) { + %bb = load <2 x i64>* %b + %tt = xor <2 x i64> %x, %bb + store <2 x i64> %tt, <2 x i64>* %b + br label %next + +next: + ret <2 x i64> %tt +} + + +define <2 x i128> @test_2xi128(<2 x i128> %x, <2 x i128>* %b) { + %bb = load <2 x i128>* %b + %tt = xor <2 x i128> %x, %bb + store <2 x i128> %tt, <2 x i128>* %b + br label %next + +next: + ret <2 x i128> %tt +} + + +define <2 x i256> @test_2xi256(<2 x i256> %x, <2 x i256>* %b) { + %bb = load <2 x i256>* %b + %tt = xor <2 x i256> %x, %bb + store <2 x i256> %tt, <2 x i256>* %b + br label %next + +next: + ret <2 x i256> %tt +} + + +define <2 x i512> @test_2xi512(<2 x i512> %x, <2 x i512>* %b) { + %bb = load <2 x i512>* %b + %tt = xor <2 x i512> %x, %bb + store <2 x i512> %tt, <2 x i512>* %b + br label %next + +next: + ret <2 x i512> %tt +} + + +define <3 x i8> @test_3xi8(<3 x i8> %x, <3 x i8>* %b) { + %bb = load <3 x i8>* %b + %tt = xor <3 x i8> %x, %bb + store <3 x i8> %tt, <3 x i8>* %b + br label %next + +next: + ret <3 x i8> %tt +} + + +define <3 x i16> @test_3xi16(<3 x i16> %x, <3 x i16>* %b) { + %bb = load <3 x i16>* %b + %tt = xor <3 x i16> %x, %bb + store <3 x i16> %tt, <3 x i16>* %b + br label %next + +next: + ret <3 x i16> %tt +} + + +define <3 x i32> @test_3xi32(<3 x i32> %x, <3 x i32>* %b) { + %bb = load <3 x i32>* %b + %tt = xor <3 x i32> %x, %bb + store <3 x i32> %tt, <3 x i32>* %b + br label %next + +next: + ret <3 x i32> %tt +} + + +define <3 x i64> @test_3xi64(<3 x i64> %x, <3 x i64>* %b) { + %bb = load <3 x i64>* %b + %tt = xor <3 x i64> %x, %bb + store <3 x i64> %tt, <3 x i64>* %b + br label %next + +next: + ret <3 x i64> %tt +} + + +define <3 x i128> @test_3xi128(<3 x i128> %x, <3 x i128>* %b) { + %bb = load <3 x i128>* %b + %tt = xor <3 x i128> %x, %bb + store <3 x i128> %tt, <3 x i128>* %b + br label %next + +next: + ret <3 x i128> %tt +} + + +define <3 x i256> @test_3xi256(<3 x i256> %x, <3 x i256>* %b) { + %bb = load <3 x i256>* %b + %tt = xor <3 x i256> %x, %bb + store <3 x i256> %tt, <3 x i256>* %b + br label %next + +next: + ret <3 x i256> %tt +} + + +define <3 x i512> @test_3xi512(<3 x i512> %x, <3 x i512>* %b) { + %bb = load <3 x i512>* %b + %tt = xor <3 x i512> %x, %bb + store <3 x i512> %tt, <3 x i512>* %b + br label %next + +next: + ret <3 x i512> %tt +} + + +define <4 x i8> @test_4xi8(<4 x i8> %x, <4 x i8>* %b) { + %bb = load <4 x i8>* %b + %tt = xor <4 x i8> %x, %bb + store <4 x i8> %tt, <4 x i8>* %b + br label %next + +next: + ret <4 x i8> %tt +} + + +define <4 x i16> @test_4xi16(<4 x i16> %x, <4 x i16>* %b) { + %bb = load <4 x i16>* %b + %tt = xor <4 x i16> %x, %bb + store <4 x i16> %tt, <4 x i16>* %b + br label %next + +next: + ret <4 x i16> %tt +} + + +define <4 x i32> @test_4xi32(<4 x i32> %x, <4 x i32>* %b) { + %bb = load <4 x i32>* %b + %tt = xor <4 x i32> %x, %bb + store <4 x i32> %tt, <4 x i32>* %b + br label %next + +next: + ret <4 x i32> %tt +} + + +define <4 x i64> @test_4xi64(<4 x i64> %x, <4 x i64>* %b) { + %bb = load <4 x i64>* %b + %tt = xor <4 x i64> %x, %bb + store <4 x i64> %tt, <4 x i64>* %b + br label %next + +next: + ret <4 x i64> %tt +} + + +define <4 x i128> @test_4xi128(<4 x i128> %x, <4 x i128>* %b) { + %bb = load <4 x i128>* %b + %tt = xor <4 x i128> %x, %bb + store <4 x i128> %tt, <4 x i128>* %b + br label %next + +next: + ret <4 x i128> %tt +} + + +define <4 x i256> @test_4xi256(<4 x i256> %x, <4 x i256>* %b) { + %bb = load <4 x i256>* %b + %tt = xor <4 x i256> %x, %bb + store <4 x i256> %tt, <4 x i256>* %b + br label %next + +next: + ret <4 x i256> %tt +} + + +define <4 x i512> @test_4xi512(<4 x i512> %x, <4 x i512>* %b) { + %bb = load <4 x i512>* %b + %tt = xor <4 x i512> %x, %bb + store <4 x i512> %tt, <4 x i512>* %b + br label %next + +next: + ret <4 x i512> %tt +} + + +define <5 x i8> @test_5xi8(<5 x i8> %x, <5 x i8>* %b) { + %bb = load <5 x i8>* %b + %tt = xor <5 x i8> %x, %bb + store <5 x i8> %tt, <5 x i8>* %b + br label %next + +next: + ret <5 x i8> %tt +} + + +define <5 x i16> @test_5xi16(<5 x i16> %x, <5 x i16>* %b) { + %bb = load <5 x i16>* %b + %tt = xor <5 x i16> %x, %bb + store <5 x i16> %tt, <5 x i16>* %b + br label %next + +next: + ret <5 x i16> %tt +} + + +define <5 x i32> @test_5xi32(<5 x i32> %x, <5 x i32>* %b) { + %bb = load <5 x i32>* %b + %tt = xor <5 x i32> %x, %bb + store <5 x i32> %tt, <5 x i32>* %b + br label %next + +next: + ret <5 x i32> %tt +} + + +define <5 x i64> @test_5xi64(<5 x i64> %x, <5 x i64>* %b) { + %bb = load <5 x i64>* %b + %tt = xor <5 x i64> %x, %bb + store <5 x i64> %tt, <5 x i64>* %b + br label %next + +next: + ret <5 x i64> %tt +} + + +define <5 x i128> @test_5xi128(<5 x i128> %x, <5 x i128>* %b) { + %bb = load <5 x i128>* %b + %tt = xor <5 x i128> %x, %bb + store <5 x i128> %tt, <5 x i128>* %b + br label %next + +next: + ret <5 x i128> %tt +} + + +define <5 x i256> @test_5xi256(<5 x i256> %x, <5 x i256>* %b) { + %bb = load <5 x i256>* %b + %tt = xor <5 x i256> %x, %bb + store <5 x i256> %tt, <5 x i256>* %b + br label %next + +next: + ret <5 x i256> %tt +} + + +define <5 x i512> @test_5xi512(<5 x i512> %x, <5 x i512>* %b) { + %bb = load <5 x i512>* %b + %tt = xor <5 x i512> %x, %bb + store <5 x i512> %tt, <5 x i512>* %b + br label %next + +next: + ret <5 x i512> %tt +} + + +define <6 x i8> @test_6xi8(<6 x i8> %x, <6 x i8>* %b) { + %bb = load <6 x i8>* %b + %tt = xor <6 x i8> %x, %bb + store <6 x i8> %tt, <6 x i8>* %b + br label %next + +next: + ret <6 x i8> %tt +} + + +define <6 x i16> @test_6xi16(<6 x i16> %x, <6 x i16>* %b) { + %bb = load <6 x i16>* %b + %tt = xor <6 x i16> %x, %bb + store <6 x i16> %tt, <6 x i16>* %b + br label %next + +next: + ret <6 x i16> %tt +} + + +define <6 x i32> @test_6xi32(<6 x i32> %x, <6 x i32>* %b) { + %bb = load <6 x i32>* %b + %tt = xor <6 x i32> %x, %bb + store <6 x i32> %tt, <6 x i32>* %b + br label %next + +next: + ret <6 x i32> %tt +} + + +define <6 x i64> @test_6xi64(<6 x i64> %x, <6 x i64>* %b) { + %bb = load <6 x i64>* %b + %tt = xor <6 x i64> %x, %bb + store <6 x i64> %tt, <6 x i64>* %b + br label %next + +next: + ret <6 x i64> %tt +} + + +define <6 x i128> @test_6xi128(<6 x i128> %x, <6 x i128>* %b) { + %bb = load <6 x i128>* %b + %tt = xor <6 x i128> %x, %bb + store <6 x i128> %tt, <6 x i128>* %b + br label %next + +next: + ret <6 x i128> %tt +} + + +define <6 x i256> @test_6xi256(<6 x i256> %x, <6 x i256>* %b) { + %bb = load <6 x i256>* %b + %tt = xor <6 x i256> %x, %bb + store <6 x i256> %tt, <6 x i256>* %b + br label %next + +next: + ret <6 x i256> %tt +} + + +define <6 x i512> @test_6xi512(<6 x i512> %x, <6 x i512>* %b) { + %bb = load <6 x i512>* %b + %tt = xor <6 x i512> %x, %bb + store <6 x i512> %tt, <6 x i512>* %b + br label %next + +next: + ret <6 x i512> %tt +} + + +define <7 x i8> @test_7xi8(<7 x i8> %x, <7 x i8>* %b) { + %bb = load <7 x i8>* %b + %tt = xor <7 x i8> %x, %bb + store <7 x i8> %tt, <7 x i8>* %b + br label %next + +next: + ret <7 x i8> %tt +} + + +define <7 x i16> @test_7xi16(<7 x i16> %x, <7 x i16>* %b) { + %bb = load <7 x i16>* %b + %tt = xor <7 x i16> %x, %bb + store <7 x i16> %tt, <7 x i16>* %b + br label %next + +next: + ret <7 x i16> %tt +} + + +define <7 x i32> @test_7xi32(<7 x i32> %x, <7 x i32>* %b) { + %bb = load <7 x i32>* %b + %tt = xor <7 x i32> %x, %bb + store <7 x i32> %tt, <7 x i32>* %b + br label %next + +next: + ret <7 x i32> %tt +} + + +define <7 x i64> @test_7xi64(<7 x i64> %x, <7 x i64>* %b) { + %bb = load <7 x i64>* %b + %tt = xor <7 x i64> %x, %bb + store <7 x i64> %tt, <7 x i64>* %b + br label %next + +next: + ret <7 x i64> %tt +} + + +define <7 x i128> @test_7xi128(<7 x i128> %x, <7 x i128>* %b) { + %bb = load <7 x i128>* %b + %tt = xor <7 x i128> %x, %bb + store <7 x i128> %tt, <7 x i128>* %b + br label %next + +next: + ret <7 x i128> %tt +} + + +define <7 x i256> @test_7xi256(<7 x i256> %x, <7 x i256>* %b) { + %bb = load <7 x i256>* %b + %tt = xor <7 x i256> %x, %bb + store <7 x i256> %tt, <7 x i256>* %b + br label %next + +next: + ret <7 x i256> %tt +} + + +define <7 x i512> @test_7xi512(<7 x i512> %x, <7 x i512>* %b) { + %bb = load <7 x i512>* %b + %tt = xor <7 x i512> %x, %bb + store <7 x i512> %tt, <7 x i512>* %b + br label %next + +next: + ret <7 x i512> %tt +} + + +define <8 x i8> @test_8xi8(<8 x i8> %x, <8 x i8>* %b) { + %bb = load <8 x i8>* %b + %tt = xor <8 x i8> %x, %bb + store <8 x i8> %tt, <8 x i8>* %b + br label %next + +next: + ret <8 x i8> %tt +} + + +define <8 x i16> @test_8xi16(<8 x i16> %x, <8 x i16>* %b) { + %bb = load <8 x i16>* %b + %tt = xor <8 x i16> %x, %bb + store <8 x i16> %tt, <8 x i16>* %b + br label %next + +next: + ret <8 x i16> %tt +} + + +define <8 x i32> @test_8xi32(<8 x i32> %x, <8 x i32>* %b) { + %bb = load <8 x i32>* %b + %tt = xor <8 x i32> %x, %bb + store <8 x i32> %tt, <8 x i32>* %b + br label %next + +next: + ret <8 x i32> %tt +} + + +define <8 x i64> @test_8xi64(<8 x i64> %x, <8 x i64>* %b) { + %bb = load <8 x i64>* %b + %tt = xor <8 x i64> %x, %bb + store <8 x i64> %tt, <8 x i64>* %b + br label %next + +next: + ret <8 x i64> %tt +} + + +define <8 x i128> @test_8xi128(<8 x i128> %x, <8 x i128>* %b) { + %bb = load <8 x i128>* %b + %tt = xor <8 x i128> %x, %bb + store <8 x i128> %tt, <8 x i128>* %b + br label %next + +next: + ret <8 x i128> %tt +} + + +define <8 x i256> @test_8xi256(<8 x i256> %x, <8 x i256>* %b) { + %bb = load <8 x i256>* %b + %tt = xor <8 x i256> %x, %bb + store <8 x i256> %tt, <8 x i256>* %b + br label %next + +next: + ret <8 x i256> %tt +} + + +define <8 x i512> @test_8xi512(<8 x i512> %x, <8 x i512>* %b) { + %bb = load <8 x i512>* %b + %tt = xor <8 x i512> %x, %bb + store <8 x i512> %tt, <8 x i512>* %b + br label %next + +next: + ret <8 x i512> %tt +} + + +define <9 x i8> @test_9xi8(<9 x i8> %x, <9 x i8>* %b) { + %bb = load <9 x i8>* %b + %tt = xor <9 x i8> %x, %bb + store <9 x i8> %tt, <9 x i8>* %b + br label %next + +next: + ret <9 x i8> %tt +} + + +define <9 x i16> @test_9xi16(<9 x i16> %x, <9 x i16>* %b) { + %bb = load <9 x i16>* %b + %tt = xor <9 x i16> %x, %bb + store <9 x i16> %tt, <9 x i16>* %b + br label %next + +next: + ret <9 x i16> %tt +} + + +define <9 x i32> @test_9xi32(<9 x i32> %x, <9 x i32>* %b) { + %bb = load <9 x i32>* %b + %tt = xor <9 x i32> %x, %bb + store <9 x i32> %tt, <9 x i32>* %b + br label %next + +next: + ret <9 x i32> %tt +} + + +define <9 x i64> @test_9xi64(<9 x i64> %x, <9 x i64>* %b) { + %bb = load <9 x i64>* %b + %tt = xor <9 x i64> %x, %bb + store <9 x i64> %tt, <9 x i64>* %b + br label %next + +next: + ret <9 x i64> %tt +} + + +define <9 x i128> @test_9xi128(<9 x i128> %x, <9 x i128>* %b) { + %bb = load <9 x i128>* %b + %tt = xor <9 x i128> %x, %bb + store <9 x i128> %tt, <9 x i128>* %b + br label %next + +next: + ret <9 x i128> %tt +} + + +define <9 x i256> @test_9xi256(<9 x i256> %x, <9 x i256>* %b) { + %bb = load <9 x i256>* %b + %tt = xor <9 x i256> %x, %bb + store <9 x i256> %tt, <9 x i256>* %b + br label %next + +next: + ret <9 x i256> %tt +} + + +define <9 x i512> @test_9xi512(<9 x i512> %x, <9 x i512>* %b) { + %bb = load <9 x i512>* %b + %tt = xor <9 x i512> %x, %bb + store <9 x i512> %tt, <9 x i512>* %b + br label %next + +next: + ret <9 x i512> %tt +} + + +define <10 x i8> @test_10xi8(<10 x i8> %x, <10 x i8>* %b) { + %bb = load <10 x i8>* %b + %tt = xor <10 x i8> %x, %bb + store <10 x i8> %tt, <10 x i8>* %b + br label %next + +next: + ret <10 x i8> %tt +} + + +define <10 x i16> @test_10xi16(<10 x i16> %x, <10 x i16>* %b) { + %bb = load <10 x i16>* %b + %tt = xor <10 x i16> %x, %bb + store <10 x i16> %tt, <10 x i16>* %b + br label %next + +next: + ret <10 x i16> %tt +} + + +define <10 x i32> @test_10xi32(<10 x i32> %x, <10 x i32>* %b) { + %bb = load <10 x i32>* %b + %tt = xor <10 x i32> %x, %bb + store <10 x i32> %tt, <10 x i32>* %b + br label %next + +next: + ret <10 x i32> %tt +} + + +define <10 x i64> @test_10xi64(<10 x i64> %x, <10 x i64>* %b) { + %bb = load <10 x i64>* %b + %tt = xor <10 x i64> %x, %bb + store <10 x i64> %tt, <10 x i64>* %b + br label %next + +next: + ret <10 x i64> %tt +} + + +define <10 x i128> @test_10xi128(<10 x i128> %x, <10 x i128>* %b) { + %bb = load <10 x i128>* %b + %tt = xor <10 x i128> %x, %bb + store <10 x i128> %tt, <10 x i128>* %b + br label %next + +next: + ret <10 x i128> %tt +} + + +define <10 x i256> @test_10xi256(<10 x i256> %x, <10 x i256>* %b) { + %bb = load <10 x i256>* %b + %tt = xor <10 x i256> %x, %bb + store <10 x i256> %tt, <10 x i256>* %b + br label %next + +next: + ret <10 x i256> %tt +} + + +define <10 x i512> @test_10xi512(<10 x i512> %x, <10 x i512>* %b) { + %bb = load <10 x i512>* %b + %tt = xor <10 x i512> %x, %bb + store <10 x i512> %tt, <10 x i512>* %b + br label %next + +next: + ret <10 x i512> %tt +} + + +define <11 x i8> @test_11xi8(<11 x i8> %x, <11 x i8>* %b) { + %bb = load <11 x i8>* %b + %tt = xor <11 x i8> %x, %bb + store <11 x i8> %tt, <11 x i8>* %b + br label %next + +next: + ret <11 x i8> %tt +} + + +define <11 x i16> @test_11xi16(<11 x i16> %x, <11 x i16>* %b) { + %bb = load <11 x i16>* %b + %tt = xor <11 x i16> %x, %bb + store <11 x i16> %tt, <11 x i16>* %b + br label %next + +next: + ret <11 x i16> %tt +} + + +define <11 x i32> @test_11xi32(<11 x i32> %x, <11 x i32>* %b) { + %bb = load <11 x i32>* %b + %tt = xor <11 x i32> %x, %bb + store <11 x i32> %tt, <11 x i32>* %b + br label %next + +next: + ret <11 x i32> %tt +} + + +define <11 x i64> @test_11xi64(<11 x i64> %x, <11 x i64>* %b) { + %bb = load <11 x i64>* %b + %tt = xor <11 x i64> %x, %bb + store <11 x i64> %tt, <11 x i64>* %b + br label %next + +next: + ret <11 x i64> %tt +} + + +define <11 x i128> @test_11xi128(<11 x i128> %x, <11 x i128>* %b) { + %bb = load <11 x i128>* %b + %tt = xor <11 x i128> %x, %bb + store <11 x i128> %tt, <11 x i128>* %b + br label %next + +next: + ret <11 x i128> %tt +} + + +define <11 x i256> @test_11xi256(<11 x i256> %x, <11 x i256>* %b) { + %bb = load <11 x i256>* %b + %tt = xor <11 x i256> %x, %bb + store <11 x i256> %tt, <11 x i256>* %b + br label %next + +next: + ret <11 x i256> %tt +} + + +define <11 x i512> @test_11xi512(<11 x i512> %x, <11 x i512>* %b) { + %bb = load <11 x i512>* %b + %tt = xor <11 x i512> %x, %bb + store <11 x i512> %tt, <11 x i512>* %b + br label %next + +next: + ret <11 x i512> %tt +} + + +define <12 x i8> @test_12xi8(<12 x i8> %x, <12 x i8>* %b) { + %bb = load <12 x i8>* %b + %tt = xor <12 x i8> %x, %bb + store <12 x i8> %tt, <12 x i8>* %b + br label %next + +next: + ret <12 x i8> %tt +} + + +define <12 x i16> @test_12xi16(<12 x i16> %x, <12 x i16>* %b) { + %bb = load <12 x i16>* %b + %tt = xor <12 x i16> %x, %bb + store <12 x i16> %tt, <12 x i16>* %b + br label %next + +next: + ret <12 x i16> %tt +} + + +define <12 x i32> @test_12xi32(<12 x i32> %x, <12 x i32>* %b) { + %bb = load <12 x i32>* %b + %tt = xor <12 x i32> %x, %bb + store <12 x i32> %tt, <12 x i32>* %b + br label %next + +next: + ret <12 x i32> %tt +} + + +define <12 x i64> @test_12xi64(<12 x i64> %x, <12 x i64>* %b) { + %bb = load <12 x i64>* %b + %tt = xor <12 x i64> %x, %bb + store <12 x i64> %tt, <12 x i64>* %b + br label %next + +next: + ret <12 x i64> %tt +} + + +define <12 x i128> @test_12xi128(<12 x i128> %x, <12 x i128>* %b) { + %bb = load <12 x i128>* %b + %tt = xor <12 x i128> %x, %bb + store <12 x i128> %tt, <12 x i128>* %b + br label %next + +next: + ret <12 x i128> %tt +} + + +define <12 x i256> @test_12xi256(<12 x i256> %x, <12 x i256>* %b) { + %bb = load <12 x i256>* %b + %tt = xor <12 x i256> %x, %bb + store <12 x i256> %tt, <12 x i256>* %b + br label %next + +next: + ret <12 x i256> %tt +} + + +define <12 x i512> @test_12xi512(<12 x i512> %x, <12 x i512>* %b) { + %bb = load <12 x i512>* %b + %tt = xor <12 x i512> %x, %bb + store <12 x i512> %tt, <12 x i512>* %b + br label %next + +next: + ret <12 x i512> %tt +} + + +define <13 x i8> @test_13xi8(<13 x i8> %x, <13 x i8>* %b) { + %bb = load <13 x i8>* %b + %tt = xor <13 x i8> %x, %bb + store <13 x i8> %tt, <13 x i8>* %b + br label %next + +next: + ret <13 x i8> %tt +} + + +define <13 x i16> @test_13xi16(<13 x i16> %x, <13 x i16>* %b) { + %bb = load <13 x i16>* %b + %tt = xor <13 x i16> %x, %bb + store <13 x i16> %tt, <13 x i16>* %b + br label %next + +next: + ret <13 x i16> %tt +} + + +define <13 x i32> @test_13xi32(<13 x i32> %x, <13 x i32>* %b) { + %bb = load <13 x i32>* %b + %tt = xor <13 x i32> %x, %bb + store <13 x i32> %tt, <13 x i32>* %b + br label %next + +next: + ret <13 x i32> %tt +} + + +define <13 x i64> @test_13xi64(<13 x i64> %x, <13 x i64>* %b) { + %bb = load <13 x i64>* %b + %tt = xor <13 x i64> %x, %bb + store <13 x i64> %tt, <13 x i64>* %b + br label %next + +next: + ret <13 x i64> %tt +} + + +define <13 x i128> @test_13xi128(<13 x i128> %x, <13 x i128>* %b) { + %bb = load <13 x i128>* %b + %tt = xor <13 x i128> %x, %bb + store <13 x i128> %tt, <13 x i128>* %b + br label %next + +next: + ret <13 x i128> %tt +} + + +define <13 x i256> @test_13xi256(<13 x i256> %x, <13 x i256>* %b) { + %bb = load <13 x i256>* %b + %tt = xor <13 x i256> %x, %bb + store <13 x i256> %tt, <13 x i256>* %b + br label %next + +next: + ret <13 x i256> %tt +} + + +define <13 x i512> @test_13xi512(<13 x i512> %x, <13 x i512>* %b) { + %bb = load <13 x i512>* %b + %tt = xor <13 x i512> %x, %bb + store <13 x i512> %tt, <13 x i512>* %b + br label %next + +next: + ret <13 x i512> %tt +} + + +define <14 x i8> @test_14xi8(<14 x i8> %x, <14 x i8>* %b) { + %bb = load <14 x i8>* %b + %tt = xor <14 x i8> %x, %bb + store <14 x i8> %tt, <14 x i8>* %b + br label %next + +next: + ret <14 x i8> %tt +} + + +define <14 x i16> @test_14xi16(<14 x i16> %x, <14 x i16>* %b) { + %bb = load <14 x i16>* %b + %tt = xor <14 x i16> %x, %bb + store <14 x i16> %tt, <14 x i16>* %b + br label %next + +next: + ret <14 x i16> %tt +} + + +define <14 x i32> @test_14xi32(<14 x i32> %x, <14 x i32>* %b) { + %bb = load <14 x i32>* %b + %tt = xor <14 x i32> %x, %bb + store <14 x i32> %tt, <14 x i32>* %b + br label %next + +next: + ret <14 x i32> %tt +} + + +define <14 x i64> @test_14xi64(<14 x i64> %x, <14 x i64>* %b) { + %bb = load <14 x i64>* %b + %tt = xor <14 x i64> %x, %bb + store <14 x i64> %tt, <14 x i64>* %b + br label %next + +next: + ret <14 x i64> %tt +} + + +define <14 x i128> @test_14xi128(<14 x i128> %x, <14 x i128>* %b) { + %bb = load <14 x i128>* %b + %tt = xor <14 x i128> %x, %bb + store <14 x i128> %tt, <14 x i128>* %b + br label %next + +next: + ret <14 x i128> %tt +} + + +define <14 x i256> @test_14xi256(<14 x i256> %x, <14 x i256>* %b) { + %bb = load <14 x i256>* %b + %tt = xor <14 x i256> %x, %bb + store <14 x i256> %tt, <14 x i256>* %b + br label %next + +next: + ret <14 x i256> %tt +} + + +define <14 x i512> @test_14xi512(<14 x i512> %x, <14 x i512>* %b) { + %bb = load <14 x i512>* %b + %tt = xor <14 x i512> %x, %bb + store <14 x i512> %tt, <14 x i512>* %b + br label %next + +next: + ret <14 x i512> %tt +} + + +define <15 x i8> @test_15xi8(<15 x i8> %x, <15 x i8>* %b) { + %bb = load <15 x i8>* %b + %tt = xor <15 x i8> %x, %bb + store <15 x i8> %tt, <15 x i8>* %b + br label %next + +next: + ret <15 x i8> %tt +} + + +define <15 x i16> @test_15xi16(<15 x i16> %x, <15 x i16>* %b) { + %bb = load <15 x i16>* %b + %tt = xor <15 x i16> %x, %bb + store <15 x i16> %tt, <15 x i16>* %b + br label %next + +next: + ret <15 x i16> %tt +} + + +define <15 x i32> @test_15xi32(<15 x i32> %x, <15 x i32>* %b) { + %bb = load <15 x i32>* %b + %tt = xor <15 x i32> %x, %bb + store <15 x i32> %tt, <15 x i32>* %b + br label %next + +next: + ret <15 x i32> %tt +} + + +define <15 x i64> @test_15xi64(<15 x i64> %x, <15 x i64>* %b) { + %bb = load <15 x i64>* %b + %tt = xor <15 x i64> %x, %bb + store <15 x i64> %tt, <15 x i64>* %b + br label %next + +next: + ret <15 x i64> %tt +} + + +define <15 x i128> @test_15xi128(<15 x i128> %x, <15 x i128>* %b) { + %bb = load <15 x i128>* %b + %tt = xor <15 x i128> %x, %bb + store <15 x i128> %tt, <15 x i128>* %b + br label %next + +next: + ret <15 x i128> %tt +} + + +define <15 x i256> @test_15xi256(<15 x i256> %x, <15 x i256>* %b) { + %bb = load <15 x i256>* %b + %tt = xor <15 x i256> %x, %bb + store <15 x i256> %tt, <15 x i256>* %b + br label %next + +next: + ret <15 x i256> %tt +} + + +define <15 x i512> @test_15xi512(<15 x i512> %x, <15 x i512>* %b) { + %bb = load <15 x i512>* %b + %tt = xor <15 x i512> %x, %bb + store <15 x i512> %tt, <15 x i512>* %b + br label %next + +next: + ret <15 x i512> %tt +} + + +define <16 x i8> @test_16xi8(<16 x i8> %x, <16 x i8>* %b) { + %bb = load <16 x i8>* %b + %tt = xor <16 x i8> %x, %bb + store <16 x i8> %tt, <16 x i8>* %b + br label %next + +next: + ret <16 x i8> %tt +} + + +define <16 x i16> @test_16xi16(<16 x i16> %x, <16 x i16>* %b) { + %bb = load <16 x i16>* %b + %tt = xor <16 x i16> %x, %bb + store <16 x i16> %tt, <16 x i16>* %b + br label %next + +next: + ret <16 x i16> %tt +} + + +define <16 x i32> @test_16xi32(<16 x i32> %x, <16 x i32>* %b) { + %bb = load <16 x i32>* %b + %tt = xor <16 x i32> %x, %bb + store <16 x i32> %tt, <16 x i32>* %b + br label %next + +next: + ret <16 x i32> %tt +} + + +define <16 x i64> @test_16xi64(<16 x i64> %x, <16 x i64>* %b) { + %bb = load <16 x i64>* %b + %tt = xor <16 x i64> %x, %bb + store <16 x i64> %tt, <16 x i64>* %b + br label %next + +next: + ret <16 x i64> %tt +} + + +define <16 x i128> @test_16xi128(<16 x i128> %x, <16 x i128>* %b) { + %bb = load <16 x i128>* %b + %tt = xor <16 x i128> %x, %bb + store <16 x i128> %tt, <16 x i128>* %b + br label %next + +next: + ret <16 x i128> %tt +} + + +define <16 x i256> @test_16xi256(<16 x i256> %x, <16 x i256>* %b) { + %bb = load <16 x i256>* %b + %tt = xor <16 x i256> %x, %bb + store <16 x i256> %tt, <16 x i256>* %b + br label %next + +next: + ret <16 x i256> %tt +} + + +define <16 x i512> @test_16xi512(<16 x i512> %x, <16 x i512>* %b) { + %bb = load <16 x i512>* %b + %tt = xor <16 x i512> %x, %bb + store <16 x i512> %tt, <16 x i512>* %b + br label %next + +next: + ret <16 x i512> %tt +} + + +define <17 x i8> @test_17xi8(<17 x i8> %x, <17 x i8>* %b) { + %bb = load <17 x i8>* %b + %tt = xor <17 x i8> %x, %bb + store <17 x i8> %tt, <17 x i8>* %b + br label %next + +next: + ret <17 x i8> %tt +} + + +define <17 x i16> @test_17xi16(<17 x i16> %x, <17 x i16>* %b) { + %bb = load <17 x i16>* %b + %tt = xor <17 x i16> %x, %bb + store <17 x i16> %tt, <17 x i16>* %b + br label %next + +next: + ret <17 x i16> %tt +} + + +define <17 x i32> @test_17xi32(<17 x i32> %x, <17 x i32>* %b) { + %bb = load <17 x i32>* %b + %tt = xor <17 x i32> %x, %bb + store <17 x i32> %tt, <17 x i32>* %b + br label %next + +next: + ret <17 x i32> %tt +} + + +define <17 x i64> @test_17xi64(<17 x i64> %x, <17 x i64>* %b) { + %bb = load <17 x i64>* %b + %tt = xor <17 x i64> %x, %bb + store <17 x i64> %tt, <17 x i64>* %b + br label %next + +next: + ret <17 x i64> %tt +} + + +define <17 x i128> @test_17xi128(<17 x i128> %x, <17 x i128>* %b) { + %bb = load <17 x i128>* %b + %tt = xor <17 x i128> %x, %bb + store <17 x i128> %tt, <17 x i128>* %b + br label %next + +next: + ret <17 x i128> %tt +} + + +define <17 x i256> @test_17xi256(<17 x i256> %x, <17 x i256>* %b) { + %bb = load <17 x i256>* %b + %tt = xor <17 x i256> %x, %bb + store <17 x i256> %tt, <17 x i256>* %b + br label %next + +next: + ret <17 x i256> %tt +} + + +define <17 x i512> @test_17xi512(<17 x i512> %x, <17 x i512>* %b) { + %bb = load <17 x i512>* %b + %tt = xor <17 x i512> %x, %bb + store <17 x i512> %tt, <17 x i512>* %b + br label %next + +next: + ret <17 x i512> %tt +} + + +define <18 x i8> @test_18xi8(<18 x i8> %x, <18 x i8>* %b) { + %bb = load <18 x i8>* %b + %tt = xor <18 x i8> %x, %bb + store <18 x i8> %tt, <18 x i8>* %b + br label %next + +next: + ret <18 x i8> %tt +} + + +define <18 x i16> @test_18xi16(<18 x i16> %x, <18 x i16>* %b) { + %bb = load <18 x i16>* %b + %tt = xor <18 x i16> %x, %bb + store <18 x i16> %tt, <18 x i16>* %b + br label %next + +next: + ret <18 x i16> %tt +} + + +define <18 x i32> @test_18xi32(<18 x i32> %x, <18 x i32>* %b) { + %bb = load <18 x i32>* %b + %tt = xor <18 x i32> %x, %bb + store <18 x i32> %tt, <18 x i32>* %b + br label %next + +next: + ret <18 x i32> %tt +} + + +define <18 x i64> @test_18xi64(<18 x i64> %x, <18 x i64>* %b) { + %bb = load <18 x i64>* %b + %tt = xor <18 x i64> %x, %bb + store <18 x i64> %tt, <18 x i64>* %b + br label %next + +next: + ret <18 x i64> %tt +} + + +define <18 x i128> @test_18xi128(<18 x i128> %x, <18 x i128>* %b) { + %bb = load <18 x i128>* %b + %tt = xor <18 x i128> %x, %bb + store <18 x i128> %tt, <18 x i128>* %b + br label %next + +next: + ret <18 x i128> %tt +} + + +define <18 x i256> @test_18xi256(<18 x i256> %x, <18 x i256>* %b) { + %bb = load <18 x i256>* %b + %tt = xor <18 x i256> %x, %bb + store <18 x i256> %tt, <18 x i256>* %b + br label %next + +next: + ret <18 x i256> %tt +} + + +define <18 x i512> @test_18xi512(<18 x i512> %x, <18 x i512>* %b) { + %bb = load <18 x i512>* %b + %tt = xor <18 x i512> %x, %bb + store <18 x i512> %tt, <18 x i512>* %b + br label %next + +next: + ret <18 x i512> %tt +} + + +define <19 x i8> @test_19xi8(<19 x i8> %x, <19 x i8>* %b) { + %bb = load <19 x i8>* %b + %tt = xor <19 x i8> %x, %bb + store <19 x i8> %tt, <19 x i8>* %b + br label %next + +next: + ret <19 x i8> %tt +} + + +define <19 x i16> @test_19xi16(<19 x i16> %x, <19 x i16>* %b) { + %bb = load <19 x i16>* %b + %tt = xor <19 x i16> %x, %bb + store <19 x i16> %tt, <19 x i16>* %b + br label %next + +next: + ret <19 x i16> %tt +} + + +define <19 x i32> @test_19xi32(<19 x i32> %x, <19 x i32>* %b) { + %bb = load <19 x i32>* %b + %tt = xor <19 x i32> %x, %bb + store <19 x i32> %tt, <19 x i32>* %b + br label %next + +next: + ret <19 x i32> %tt +} + + +define <19 x i64> @test_19xi64(<19 x i64> %x, <19 x i64>* %b) { + %bb = load <19 x i64>* %b + %tt = xor <19 x i64> %x, %bb + store <19 x i64> %tt, <19 x i64>* %b + br label %next + +next: + ret <19 x i64> %tt +} + + +define <19 x i128> @test_19xi128(<19 x i128> %x, <19 x i128>* %b) { + %bb = load <19 x i128>* %b + %tt = xor <19 x i128> %x, %bb + store <19 x i128> %tt, <19 x i128>* %b + br label %next + +next: + ret <19 x i128> %tt +} + + +define <19 x i256> @test_19xi256(<19 x i256> %x, <19 x i256>* %b) { + %bb = load <19 x i256>* %b + %tt = xor <19 x i256> %x, %bb + store <19 x i256> %tt, <19 x i256>* %b + br label %next + +next: + ret <19 x i256> %tt +} + + +define <19 x i512> @test_19xi512(<19 x i512> %x, <19 x i512>* %b) { + %bb = load <19 x i512>* %b + %tt = xor <19 x i512> %x, %bb + store <19 x i512> %tt, <19 x i512>* %b + br label %next + +next: + ret <19 x i512> %tt +} + -- cgit v1.1 From a3071455e540530ecb644a2e59098129f70ce705 Mon Sep 17 00:00:00 2001 From: Eric Christopher Date: Sat, 18 Jun 2011 00:09:57 +0000 Subject: Fix UMULO support for 2x register width to allow the full range without a libcall to a new mulo libcall that we'd have to create. Finishes the rest of rdar://9090077 and rdar://9210061 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133318 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/CodeGen/X86/muloti.ll | 47 ++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 45 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/CodeGen/X86/muloti.ll b/test/CodeGen/X86/muloti.ll index eb9b646..2f0986e 100644 --- a/test/CodeGen/X86/muloti.ll +++ b/test/CodeGen/X86/muloti.ll @@ -2,9 +2,8 @@ %0 = type { i64, i64 } %1 = type { i128, i1 } -@.str = private unnamed_addr constant [11 x i8] c"%llx %llx\0A\00", align 1 - define %0 @x(i64 %a.coerce0, i64 %a.coerce1, i64 %b.coerce0, i64 %b.coerce1) nounwind uwtable ssp { +; CHECK: x entry: %tmp16 = zext i64 %a.coerce0 to i128 %tmp11 = zext i64 %a.coerce1 to i128 @@ -33,6 +32,50 @@ nooverflow: ; preds = %entry ret %0 %tmp24 } +define %0 @foo(i64 %a.coerce0, i64 %a.coerce1, i64 %b.coerce0, i64 %b.coerce1) nounwind uwtable ssp { +entry: +; CHECK: foo + %retval = alloca i128, align 16 + %coerce = alloca i128, align 16 + %a.addr = alloca i128, align 16 + %coerce1 = alloca i128, align 16 + %b.addr = alloca i128, align 16 + %0 = bitcast i128* %coerce to %0* + %1 = getelementptr %0* %0, i32 0, i32 0 + store i64 %a.coerce0, i64* %1 + %2 = getelementptr %0* %0, i32 0, i32 1 + store i64 %a.coerce1, i64* %2 + %a = load i128* %coerce, align 16 + store i128 %a, i128* %a.addr, align 16 + %3 = bitcast i128* %coerce1 to %0* + %4 = getelementptr %0* %3, i32 0, i32 0 + store i64 %b.coerce0, i64* %4 + %5 = getelementptr %0* %3, i32 0, i32 1 + store i64 %b.coerce1, i64* %5 + %b = load i128* %coerce1, align 16 + store i128 %b, i128* %b.addr, align 16 + %tmp = load i128* %a.addr, align 16 + %tmp2 = load i128* %b.addr, align 16 + %6 = call %1 @llvm.umul.with.overflow.i128(i128 %tmp, i128 %tmp2) +; CHECK: cmov +; CHECK: divti3 + %7 = extractvalue %1 %6, 0 + %8 = extractvalue %1 %6, 1 + br i1 %8, label %overflow, label %nooverflow + +overflow: ; preds = %entry + call void @llvm.trap() + unreachable + +nooverflow: ; preds = %entry + store i128 %7, i128* %retval + %9 = bitcast i128* %retval to %0* + %10 = load %0* %9, align 1 + ret %0 %10 +} + +declare %1 @llvm.umul.with.overflow.i128(i128, i128) nounwind readnone + declare %1 @llvm.smul.with.overflow.i128(i128, i128) nounwind readnone declare void @llvm.trap() nounwind -- cgit v1.1 From a566ec94e64855c2e651d161caaa27f9013b48fc Mon Sep 17 00:00:00 2001 From: Galina Kistanova Date: Sat, 18 Jun 2011 00:59:37 +0000 Subject: Moved to the right place. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133324 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/CodeGen/CBackend/X86/2008-06-04-IndirectMem.ll | 12 ++++++++++++ test/CodeGen/CBackend/X86/dg.exp | 5 +++++ test/CodeGen/X86/2008-06-04-IndirectMem.ll | 12 ------------ 3 files changed, 17 insertions(+), 12 deletions(-) create mode 100644 test/CodeGen/CBackend/X86/2008-06-04-IndirectMem.ll create mode 100644 test/CodeGen/CBackend/X86/dg.exp delete mode 100644 test/CodeGen/X86/2008-06-04-IndirectMem.ll (limited to 'test') diff --git a/test/CodeGen/CBackend/X86/2008-06-04-IndirectMem.ll b/test/CodeGen/CBackend/X86/2008-06-04-IndirectMem.ll new file mode 100644 index 0000000..054a3ca --- /dev/null +++ b/test/CodeGen/CBackend/X86/2008-06-04-IndirectMem.ll @@ -0,0 +1,12 @@ +; RUN: llc < %s -march=c | grep {"m"(llvm_cbe_newcw))} +; PR2407 + +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-f80:32:32" +target triple = "i386-pc-linux-gnu" + +define void @foo() { + %newcw = alloca i16 ; [#uses=2] + call void asm sideeffect "fldcw $0", "*m,~{dirflag},~{fpsr},~{flags}"( i16* +%newcw ) nounwind + ret void +} diff --git a/test/CodeGen/CBackend/X86/dg.exp b/test/CodeGen/CBackend/X86/dg.exp new file mode 100644 index 0000000..833bcc5 --- /dev/null +++ b/test/CodeGen/CBackend/X86/dg.exp @@ -0,0 +1,5 @@ +load_lib llvm.exp + +if { [llvm_supports_target X86] && [llvm_gcc_supports c] } { + RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,s}]] +} diff --git a/test/CodeGen/X86/2008-06-04-IndirectMem.ll b/test/CodeGen/X86/2008-06-04-IndirectMem.ll deleted file mode 100644 index 054a3ca..0000000 --- a/test/CodeGen/X86/2008-06-04-IndirectMem.ll +++ /dev/null @@ -1,12 +0,0 @@ -; RUN: llc < %s -march=c | grep {"m"(llvm_cbe_newcw))} -; PR2407 - -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-f80:32:32" -target triple = "i386-pc-linux-gnu" - -define void @foo() { - %newcw = alloca i16 ; [#uses=2] - call void asm sideeffect "fldcw $0", "*m,~{dirflag},~{fpsr},~{flags}"( i16* -%newcw ) nounwind - ret void -} -- cgit v1.1 From 0a074ed3ef7c87512d8562ff216e2ad4a29b6566 Mon Sep 17 00:00:00 2001 From: Jakob Stoklund Olesen Date: Sat, 18 Jun 2011 01:14:46 +0000 Subject: Switch ARM to using AltOrders instead of MethodBodies. This slightly changes the GPR allocation order on Darwin where R9 is not a callee-saved register: Before: %R0 %R1 %R2 %R3 %R12 %R9 %LR %R4 %R5 %R6 %R8 %R10 %R11 After: %R0 %R1 %R2 %R3 %R9 %R12 %LR %R4 %R5 %R6 %R8 %R10 %R11 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133326 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/CodeGen/Thumb2/ldr-str-imm12.ll | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test') diff --git a/test/CodeGen/Thumb2/ldr-str-imm12.ll b/test/CodeGen/Thumb2/ldr-str-imm12.ll index e1932bd..4597ba5 100644 --- a/test/CodeGen/Thumb2/ldr-str-imm12.ll +++ b/test/CodeGen/Thumb2/ldr-str-imm12.ll @@ -22,7 +22,7 @@ define %union.rec* @Manifest(%union.rec* %x, %union.rec* %env, %struct.STYLE* %style, %union.rec** %bthr, %union.rec** %fthr, %union.rec** %target, %union.rec** %crs, i32 %ok, i32 %need_expand, %union.rec** %enclose, i32 %fcr) nounwind { entry: -; CHECK: ldr.w {{(r[0-9]+)|(lr)}}, [r7, #28] +; CHECK: ldr{{(.w)?}} {{(r[0-9]+)|(lr)}}, [r7, #28] %xgaps.i = alloca [32 x %union.rec*], align 4 ; <[32 x %union.rec*]*> [#uses=0] %ycomp.i = alloca [32 x %union.rec*], align 4 ; <[32 x %union.rec*]*> [#uses=0] br label %bb20 -- cgit v1.1 From 6be41eb7f00319f5ffa1a5435dcd1e81b3ce932d Mon Sep 17 00:00:00 2001 From: Cameron Zwarich Date: Sat, 18 Jun 2011 05:47:49 +0000 Subject: Fix an invalid bitcast crash that occurs when doing a partial memset of a vector alloca. Fixes part of . git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133336 91177308-0d34-0410-b5e6-96231b3b80d8 --- .../ScalarRepl/2011-06-17-VectorPartialMemset.ll | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 test/Transforms/ScalarRepl/2011-06-17-VectorPartialMemset.ll (limited to 'test') diff --git a/test/Transforms/ScalarRepl/2011-06-17-VectorPartialMemset.ll b/test/Transforms/ScalarRepl/2011-06-17-VectorPartialMemset.ll new file mode 100644 index 0000000..29d195e --- /dev/null +++ b/test/Transforms/ScalarRepl/2011-06-17-VectorPartialMemset.ll @@ -0,0 +1,22 @@ +; RUN: opt < %s -scalarrepl -S | FileCheck %s +target datalayout = "e-p:32:32:32-i1:8:32-i8:8:32-i16:16:32-i32:32:32-i64:32:32-f32:32:32-f64:32:32-v64:32:64-v128:32:128-a0:0:32-n32" +target triple = "thumbv7-apple-darwin10" + +; CHECK: f +; CHECK-NOT: alloca +; CHECK: %[[A:[a-z0-9]*]] = and i128 undef, -16777216 +; CHECK: %[[B:[a-z0-9]*]] = bitcast i128 %[[A]] to <4 x float> +; CHECK: %[[C:[a-z0-9]*]] = extractelement <4 x float> %[[B]], i32 0 +; CHECK: ret float %[[C]] + +define float @f() nounwind ssp { +entry: + %a = alloca <4 x float>, align 16 + %p = bitcast <4 x float>* %a to i8* + call void @llvm.memset.p0i8.i32(i8* %p, i8 0, i32 3, i32 16, i1 false) + %vec = load <4 x float>* %a, align 8 + %val = extractelement <4 x float> %vec, i32 0 + ret float %val +} + +declare void @llvm.memset.p0i8.i32(i8* nocapture, i8, i32, i32, i1) nounwind -- cgit v1.1 From b85e4eba85a38698f3b3332f82554bf8442547e2 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sat, 18 Jun 2011 06:05:24 +0000 Subject: rip out a ton of intrinsic modernization logic from AutoUpgrade.cpp, which is for pre-2.9 bitcode files. We keep x86 unaligned loads, movnt, crc32, and the target indep prefetch change. As usual, updating the testsuite is a PITA. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133337 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/Analysis/BasicAA/getmodrefinfo-cs-cs.ll | 6 +- test/Analysis/BasicAA/modref.ll | 22 +- test/Analysis/ScalarEvolution/avoid-smax-1.ll | 13 +- test/Analysis/ScalarEvolution/trip-count3.ll | 86 +- test/Assembler/AutoUpgradeIntrinsics.ll | 85 +- test/Assembler/AutoUpgradeMMXIntrinsics.ll | 223 ------ test/Bitcode/memcpy.ll | 23 - test/CodeGen/ARM/2007-05-07-jumptoentry.ll | 58 -- .../ARM/2007-05-31-RegScavengerInfiniteLoop.ll | 237 ------ test/CodeGen/ARM/2009-03-07-SpillerBug.ll | 121 +-- test/CodeGen/ARM/2009-06-12-RegScavengerAssert.ll | 77 -- test/CodeGen/ARM/2009-08-31-LSDA-Name.ll | 74 +- test/CodeGen/ARM/dyn-stackalloc.ll | 72 +- test/CodeGen/ARM/memcpy-inline.ll | 7 +- test/CodeGen/ARM/memfunc.ll | 15 +- .../Generic/2005-07-12-memcpy-i64-length.ll | 11 - .../Generic/2007-11-21-UndeadIllegalNode.ll | 157 ---- test/CodeGen/Generic/invalid-memcpy.ll | 14 +- test/CodeGen/PowerPC/2008-10-30-IllegalShift.ll | 14 - test/CodeGen/PowerPC/2009-11-15-ReMatBug.ll | 155 ---- test/CodeGen/PowerPC/atomic-1.ll | 26 +- test/CodeGen/PowerPC/atomic-2.ll | 26 +- test/CodeGen/PowerPC/invalid-memcpy.ll | 20 - test/CodeGen/Thumb/dyn-stackalloc.ll | 4 +- .../CodeGen/Thumb2/2009-08-04-SubregLoweringBug.ll | 5 +- test/CodeGen/X86/2004-02-12-Memcpy.ll | 25 - test/CodeGen/X86/2006-11-28-Memcpy.ll | 34 - test/CodeGen/X86/2007-05-05-Personality.ll | 40 +- test/CodeGen/X86/2007-06-05-LSR-Dominator.ll | 129 --- test/CodeGen/X86/2008-06-04-MemCpyLoweringBug.ll | 19 - test/CodeGen/X86/2008-10-27-StackRealignment.ll | 8 +- test/CodeGen/X86/2009-01-25-NoSSE.ll | 16 +- test/CodeGen/X86/2009-04-27-LiveIntervalsBug.ll | 165 ---- test/CodeGen/X86/2009-11-16-UnfoldMemOpBug.ll | 4 +- test/CodeGen/X86/darwin-bzero.ll | 4 +- test/CodeGen/X86/memcpy-2.ll | 10 +- test/CodeGen/X86/memmove-4.ll | 12 - test/CodeGen/X86/memset-2.ll | 4 +- test/CodeGen/X86/memset-3.ll | 4 +- test/CodeGen/X86/memset.ll | 4 +- test/CodeGen/X86/memset64-on-x86-32.ll | 7 +- test/CodeGen/X86/optimize-max-0.ll | 888 ++++++++++----------- test/CodeGen/X86/personality.ll | 41 +- test/CodeGen/X86/pre-split2.ll | 26 - test/CodeGen/X86/pre-split3.ll | 26 - test/CodeGen/X86/unaligned-load.ll | 19 +- test/CodeGen/X86/variable-sized-darwin-bzero.ll | 6 +- test/Transforms/DeadStoreElimination/crash.ll | 4 +- test/Transforms/DeadStoreElimination/lifetime.ll | 4 +- .../DeadStoreElimination/memintrinsics.ll | 12 +- test/Transforms/DeadStoreElimination/simple.ll | 22 +- .../FunctionAttrs/2008-10-04-LocalMemory.ll | 64 -- .../GVN/2008-02-24-NonDominatedMemcpy.ll | 25 - test/Transforms/GVN/2008-02-26-MemCpySize.ll | 46 -- test/Transforms/GVN/nonescaping-malloc.ll | 98 +-- test/Transforms/GVN/rle.ll | 21 +- test/Transforms/GlobalOpt/memcpy.ll | 12 +- test/Transforms/GlobalOpt/memset.ll | 19 +- test/Transforms/Inline/inline-invoke-tail.ll | 10 +- .../Transforms/InstCombine/2006-11-03-Memmove64.ll | 16 - test/Transforms/InstCombine/2007-05-04-Crash.ll | 30 - .../InstCombine/2007-10-10-EliminateMemCpy.ll | 19 +- .../InstCombine/2009-02-20-InstCombine-SROA.ll | 489 ++++++------ test/Transforms/InstCombine/memcpy-to-load.ll | 11 +- test/Transforms/InstCombine/memmove.ll | 21 +- test/Transforms/InstCombine/memset.ll | 19 +- test/Transforms/InstCombine/stack-overalign.ll | 14 +- .../MemCpyOpt/2008-02-24-MultipleUseofSRet.ll | 44 +- .../MemCpyOpt/2008-03-13-ReturnSlotBitcast.ll | 26 +- test/Transforms/MemCpyOpt/memcpy.ll | 54 +- test/Transforms/MemCpyOpt/memmove.ll | 14 +- test/Transforms/MemCpyOpt/sret.ll | 40 +- .../ScalarRepl/2007-05-24-LargeAggregate.ll | 27 - .../ScalarRepl/2007-05-29-MemcpyPreserve.ll | 27 +- .../Transforms/ScalarRepl/2008-06-22-LargeArray.ll | 16 +- .../2008-08-22-out-of-range-array-promote.ll | 23 +- .../Transforms/ScalarRepl/2008-09-22-vector-gep.ll | 4 +- .../ScalarRepl/2009-03-04-MemCpyAlign.ll | 5 +- test/Transforms/ScalarRepl/2009-12-11-NeonTypes.ll | 95 +-- test/Transforms/ScalarRepl/2010-01-18-SelfCopy.ll | 6 +- test/Transforms/ScalarRepl/badarray.ll | 4 +- test/Transforms/ScalarRepl/crash.ll | 8 +- test/Transforms/ScalarRepl/memset-aggregate.ll | 13 +- test/Transforms/SimplifyLibCalls/MemCpy.ll | 21 +- 84 files changed, 1367 insertions(+), 3058 deletions(-) delete mode 100644 test/Assembler/AutoUpgradeMMXIntrinsics.ll delete mode 100644 test/Bitcode/memcpy.ll delete mode 100644 test/CodeGen/ARM/2007-05-07-jumptoentry.ll delete mode 100644 test/CodeGen/ARM/2007-05-31-RegScavengerInfiniteLoop.ll delete mode 100644 test/CodeGen/ARM/2009-06-12-RegScavengerAssert.ll delete mode 100644 test/CodeGen/Generic/2005-07-12-memcpy-i64-length.ll delete mode 100644 test/CodeGen/Generic/2007-11-21-UndeadIllegalNode.ll delete mode 100644 test/CodeGen/PowerPC/2008-10-30-IllegalShift.ll delete mode 100644 test/CodeGen/PowerPC/2009-11-15-ReMatBug.ll delete mode 100644 test/CodeGen/PowerPC/invalid-memcpy.ll delete mode 100644 test/CodeGen/X86/2004-02-12-Memcpy.ll delete mode 100644 test/CodeGen/X86/2006-11-28-Memcpy.ll delete mode 100644 test/CodeGen/X86/2007-06-05-LSR-Dominator.ll delete mode 100644 test/CodeGen/X86/2008-06-04-MemCpyLoweringBug.ll delete mode 100644 test/CodeGen/X86/2009-04-27-LiveIntervalsBug.ll delete mode 100644 test/CodeGen/X86/memmove-4.ll delete mode 100644 test/CodeGen/X86/pre-split2.ll delete mode 100644 test/CodeGen/X86/pre-split3.ll delete mode 100644 test/Transforms/FunctionAttrs/2008-10-04-LocalMemory.ll delete mode 100644 test/Transforms/GVN/2008-02-24-NonDominatedMemcpy.ll delete mode 100644 test/Transforms/GVN/2008-02-26-MemCpySize.ll delete mode 100644 test/Transforms/InstCombine/2006-11-03-Memmove64.ll delete mode 100644 test/Transforms/InstCombine/2007-05-04-Crash.ll delete mode 100644 test/Transforms/ScalarRepl/2007-05-24-LargeAggregate.ll (limited to 'test') diff --git a/test/Analysis/BasicAA/getmodrefinfo-cs-cs.ll b/test/Analysis/BasicAA/getmodrefinfo-cs-cs.ll index 062ea59..ebd349a 100644 --- a/test/Analysis/BasicAA/getmodrefinfo-cs-cs.ll +++ b/test/Analysis/BasicAA/getmodrefinfo-cs-cs.ll @@ -15,12 +15,12 @@ define void @test0() { ; CHECK: NoModRef: call void @llvm.memset.p0i8.i64(i8* @A, i8 0, i64 1, i32 1, i1 false) <-> call void @llvm.memset.p0i8.i64(i8* @B, i8 0, i64 1, i32 1, i1 false) ; CHECK: NoModRef: call void @llvm.memset.p0i8.i64(i8* @B, i8 0, i64 1, i32 1, i1 false) <-> call void @llvm.memset.p0i8.i64(i8* @A, i8 0, i64 1, i32 1, i1 false) -declare void @llvm.memset.i64(i8*, i8, i64, i32) +declare void @llvm.memset.p0i8.i64(i8* nocapture, i8, i64, i32, i1) nounwind @A = external global i8 @B = external global i8 define void @test1() { - call void @llvm.memset.i64(i8* @A, i8 0, i64 1, i32 1) - call void @llvm.memset.i64(i8* @B, i8 0, i64 1, i32 1) + call void @llvm.memset.p0i8.i64(i8* @A, i8 0, i64 1, i32 1, i1 false) + call void @llvm.memset.p0i8.i64(i8* @B, i8 0, i64 1, i32 1, i1 false) ret void } diff --git a/test/Analysis/BasicAA/modref.ll b/test/Analysis/BasicAA/modref.ll index 7318a89..233396b 100644 --- a/test/Analysis/BasicAA/modref.ll +++ b/test/Analysis/BasicAA/modref.ll @@ -1,10 +1,6 @@ ; RUN: opt < %s -basicaa -gvn -dse -S | FileCheck %s target datalayout = "E-p:64:64:64-a0:0:8-f32:32:32-f64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-v64:64:64-v128:128:128" -declare void @llvm.memset.i32(i8*, i8, i32, i32) -declare void @llvm.memset.i8(i8*, i8, i8, i32) -declare void @llvm.memcpy.i8(i8*, i8*, i8, i32) -declare void @llvm.memcpy.i32(i8*, i8*, i32, i32) declare void @llvm.lifetime.end(i64, i8* nocapture) declare void @external(i32*) @@ -15,7 +11,7 @@ define i32 @test0(i8* %P) { store i32 0, i32* %A - call void @llvm.memset.i32(i8* %P, i8 0, i32 42, i32 1) + call void @llvm.memset.p0i8.i32(i8* %P, i8 0, i32 42, i32 1, i1 false) %B = load i32* %A ret i32 %B @@ -31,7 +27,7 @@ define i8 @test1() { store i8 2, i8* %B ;; Not written to by memcpy - call void @llvm.memcpy.i8(i8* %A, i8* %B, i8 -1, i32 0) + call void @llvm.memcpy.p0i8.p0i8.i8(i8* %A, i8* %B, i8 -1, i32 0, i1 false) %C = load i8* %B ret i8 %C @@ -42,7 +38,7 @@ define i8 @test2(i8* %P) { ; CHECK: @test2 %P2 = getelementptr i8* %P, i32 127 store i8 1, i8* %P2 ;; Not dead across memset - call void @llvm.memset.i8(i8* %P, i8 2, i8 127, i32 0) + call void @llvm.memset.p0i8.i8(i8* %P, i8 2, i8 127, i32 0, i1 false) %A = load i8* %P2 ret i8 %A ; CHECK: ret i8 1 @@ -55,7 +51,7 @@ define i8 @test2a(i8* %P) { ;; FIXME: DSE isn't zapping this dead store. store i8 1, i8* %P2 ;; Dead, clobbered by memset. - call void @llvm.memset.i8(i8* %P, i8 2, i8 127, i32 0) + call void @llvm.memset.p0i8.i8(i8* %P, i8 2, i8 127, i32 0, i1 false) %A = load i8* %P2 ret i8 %A ; CHECK-NOT: load @@ -95,7 +91,7 @@ define void @test3a(i8* %P, i8 %X) { define i32 @test4(i8* %P) { %tmp = load i32* @G1 - call void @llvm.memset.i32(i8* bitcast ([4000 x i32]* @G2 to i8*), i8 0, i32 4000, i32 1) + call void @llvm.memset.p0i8.i32(i8* bitcast ([4000 x i32]* @G2 to i8*), i8 0, i32 4000, i32 1, i1 false) %tmp2 = load i32* @G1 %sub = sub i32 %tmp2, %tmp ret i32 %sub @@ -110,7 +106,7 @@ define i32 @test4(i8* %P) { ; write to G1. define i32 @test5(i8* %P, i32 %Len) { %tmp = load i32* @G1 - call void @llvm.memcpy.i32(i8* bitcast ([4000 x i32]* @G2 to i8*), i8* bitcast (i32* @G1 to i8*), i32 %Len, i32 1) + call void @llvm.memcpy.p0i8.p0i8.i32(i8* bitcast ([4000 x i32]* @G2 to i8*), i8* bitcast (i32* @G1 to i8*), i32 %Len, i32 1, i1 false) %tmp2 = load i32* @G1 %sub = sub i32 %tmp2, %tmp ret i32 %sub @@ -132,3 +128,9 @@ define i8 @test6(i8* %p, i8* noalias %a) { ; CHECK-NOT: load ; CHECK: ret } + +declare void @llvm.memset.p0i8.i32(i8* nocapture, i8, i32, i32, i1) nounwind +declare void @llvm.memset.p0i8.i8(i8* nocapture, i8, i8, i32, i1) nounwind +declare void @llvm.memcpy.p0i8.p0i8.i8(i8* nocapture, i8* nocapture, i8, i32, i1) nounwind +declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32, i1) nounwind + diff --git a/test/Analysis/ScalarEvolution/avoid-smax-1.ll b/test/Analysis/ScalarEvolution/avoid-smax-1.ll index 89e8b98..474d564 100644 --- a/test/Analysis/ScalarEvolution/avoid-smax-1.ll +++ b/test/Analysis/ScalarEvolution/avoid-smax-1.ll @@ -173,7 +173,7 @@ bb23: ; preds = %bb24, %bb.nph %55 = mul i32 %y.21, %w ; [#uses=1] %.sum5 = add i32 %55, %.sum3 ; [#uses=1] %56 = getelementptr i8* %j, i32 %.sum5 ; [#uses=1] - tail call void @llvm.memcpy.i32(i8* %56, i8* %54, i32 %w, i32 1) + tail call void @llvm.memcpy.p0i8.p0i8.i32(i8* %56, i8* %54, i32 %w, i32 1, i1 false) %57 = add i32 %y.21, 1 ; [#uses=2] br label %bb24 @@ -190,7 +190,7 @@ bb26: ; preds = %bb24.bb26_crit_edge, %bb22 %60 = getelementptr i8* %j, i32 %.sum4 ; [#uses=1] %61 = mul i32 %x, %w ; [#uses=1] %62 = sdiv i32 %61, 2 ; [#uses=1] - tail call void @llvm.memset.i32(i8* %60, i8 -128, i32 %62, i32 1) + tail call void @llvm.memset.p0i8.i32(i8* %60, i8 -128, i32 %62, i32 1, i1 false) ret void bb29: ; preds = %bb20, %entry @@ -208,7 +208,7 @@ bb30: ; preds = %bb31, %bb.nph11 %67 = getelementptr i8* %r, i32 %66 ; [#uses=1] %68 = mul i32 %y.310, %w ; [#uses=1] %69 = getelementptr i8* %j, i32 %68 ; [#uses=1] - tail call void @llvm.memcpy.i32(i8* %69, i8* %67, i32 %w, i32 1) + tail call void @llvm.memcpy.p0i8.p0i8.i32(i8* %69, i8* %67, i32 %w, i32 1, i1 false) %70 = add i32 %y.310, 1 ; [#uses=2] br label %bb31 @@ -224,13 +224,12 @@ bb33: ; preds = %bb31.bb33_crit_edge, %bb29 %73 = getelementptr i8* %j, i32 %72 ; [#uses=1] %74 = mul i32 %x, %w ; [#uses=1] %75 = sdiv i32 %74, 2 ; [#uses=1] - tail call void @llvm.memset.i32(i8* %73, i8 -128, i32 %75, i32 1) + tail call void @llvm.memset.p0i8.i32(i8* %73, i8 -128, i32 %75, i32 1, i1 false) ret void return: ; preds = %bb20 ret void } -declare void @llvm.memcpy.i32(i8*, i8*, i32, i32) nounwind - -declare void @llvm.memset.i32(i8*, i8, i32, i32) nounwind +declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32, i1) nounwind +declare void @llvm.memset.p0i8.i32(i8* nocapture, i8, i32, i32, i1) nounwind diff --git a/test/Analysis/ScalarEvolution/trip-count3.ll b/test/Analysis/ScalarEvolution/trip-count3.ll index 10b798b..1bf86ae 100644 --- a/test/Analysis/ScalarEvolution/trip-count3.ll +++ b/test/Analysis/ScalarEvolution/trip-count3.ll @@ -5,15 +5,14 @@ ; dividing by the stride will have a remainder. This could theoretically ; be teaching it how to use a more elaborate trip count computation. -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" -target triple = "x86_64-unknown-linux-gnu" - %struct.FILE = type { i32, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, %struct._IO_marker*, %struct.FILE*, i32, i32, i64, i16, i8, [1 x i8], i8*, i64, i8*, i8*, i8*, i8*, i64, i32, [20 x i8] } - %struct.SHA_INFO = type { [5 x i32], i32, i32, [16 x i32] } - %struct._IO_marker = type { %struct._IO_marker*, %struct.FILE*, i32 } -@_2E_str = external constant [26 x i8] ; <[26 x i8]*> [#uses=0] -@stdin = external global %struct.FILE* ; <%struct.FILE**> [#uses=0] -@_2E_str1 = external constant [3 x i8] ; <[3 x i8]*> [#uses=0] -@_2E_str12 = external constant [30 x i8] ; <[30 x i8]*> [#uses=0] +%struct.FILE = type { i32, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, %struct._IO_marker*, %struct.FILE*, i32, i32, i64, i16, i8, [1 x i8], i8*, i64, i8*, i8*, i8*, i8*, i64, i32, [20 x i8] } +%struct.SHA_INFO = type { [5 x i32], i32, i32, [16 x i32] } +%struct._IO_marker = type { %struct._IO_marker*, %struct.FILE*, i32 } + +@_2E_str = external constant [26 x i8] +@stdin = external global %struct.FILE* +@_2E_str1 = external constant [3 x i8] +@_2E_str12 = external constant [30 x i8] declare void @sha_init(%struct.SHA_INFO* nocapture) nounwind @@ -25,12 +24,8 @@ declare i32 @printf(i8* nocapture, ...) nounwind declare void @sha_final(%struct.SHA_INFO* nocapture) nounwind -declare void @llvm.memset.i64(i8* nocapture, i8, i64, i32) nounwind - declare void @sha_update(%struct.SHA_INFO* nocapture, i8* nocapture, i32) nounwind -declare void @llvm.memcpy.i64(i8* nocapture, i8* nocapture, i64, i32) nounwind - declare i64 @fread(i8* noalias nocapture, i64, i64, %struct.FILE* noalias nocapture) nounwind declare i32 @main(i32, i8** nocapture) nounwind @@ -43,36 +38,41 @@ declare void @sha_stream(%struct.SHA_INFO* nocapture, %struct.FILE* nocapture) n define void @sha_stream_bb3_2E_i(%struct.SHA_INFO* %sha_info, i8* %data1, i32, i8** %buffer_addr.0.i.out, i32* %count_addr.0.i.out) nounwind { newFuncRoot: - br label %bb3.i - -sha_update.exit.exitStub: ; preds = %bb3.i - store i8* %buffer_addr.0.i, i8** %buffer_addr.0.i.out - store i32 %count_addr.0.i, i32* %count_addr.0.i.out - ret void - -bb2.i: ; preds = %bb3.i - %1 = getelementptr %struct.SHA_INFO* %sha_info, i64 0, i32 3 ; <[16 x i32]*> [#uses=1] - %2 = bitcast [16 x i32]* %1 to i8* ; [#uses=1] - call void @llvm.memcpy.i64(i8* %2, i8* %buffer_addr.0.i, i64 64, i32 1) nounwind - %3 = getelementptr %struct.SHA_INFO* %sha_info, i64 0, i32 3, i64 0 ; [#uses=1] - %4 = bitcast i32* %3 to i8* ; [#uses=1] - br label %codeRepl - -codeRepl: ; preds = %bb2.i - call void @sha_stream_bb3_2E_i_bb1_2E_i_2E_i(i8* %4) - br label %byte_reverse.exit.i - -byte_reverse.exit.i: ; preds = %codeRepl - call fastcc void @sha_transform(%struct.SHA_INFO* %sha_info) nounwind - %5 = getelementptr i8* %buffer_addr.0.i, i64 64 ; [#uses=1] - %6 = add i32 %count_addr.0.i, -64 ; [#uses=1] - br label %bb3.i - -bb3.i: ; preds = %byte_reverse.exit.i, %newFuncRoot - %buffer_addr.0.i = phi i8* [ %data1, %newFuncRoot ], [ %5, %byte_reverse.exit.i ] ; [#uses=3] - %count_addr.0.i = phi i32 [ %0, %newFuncRoot ], [ %6, %byte_reverse.exit.i ] ; [#uses=3] - %7 = icmp sgt i32 %count_addr.0.i, 63 ; [#uses=1] - br i1 %7, label %bb2.i, label %sha_update.exit.exitStub + br label %bb3.i + +sha_update.exit.exitStub: ; preds = %bb3.i + store i8* %buffer_addr.0.i, i8** %buffer_addr.0.i.out + store i32 %count_addr.0.i, i32* %count_addr.0.i.out + ret void + +bb2.i: ; preds = %bb3.i + %1 = getelementptr %struct.SHA_INFO* %sha_info, i64 0, i32 3 + %2 = bitcast [16 x i32]* %1 to i8* + call void @llvm.memcpy.p0i8.p0i8.i64(i8* %2, i8* %buffer_addr.0.i, i64 64, i32 1, i1 false) + %3 = getelementptr %struct.SHA_INFO* %sha_info, i64 0, i32 3, i64 0 + %4 = bitcast i32* %3 to i8* + br label %codeRepl + +codeRepl: ; preds = %bb2.i + call void @sha_stream_bb3_2E_i_bb1_2E_i_2E_i(i8* %4) + br label %byte_reverse.exit.i + +byte_reverse.exit.i: ; preds = %codeRepl + call fastcc void @sha_transform(%struct.SHA_INFO* %sha_info) nounwind + %5 = getelementptr i8* %buffer_addr.0.i, i64 64 + %6 = add i32 %count_addr.0.i, -64 + br label %bb3.i + +bb3.i: ; preds = %byte_reverse.exit.i, %newFuncRoot + %buffer_addr.0.i = phi i8* [ %data1, %newFuncRoot ], [ %5, %byte_reverse.exit.i ] + %count_addr.0.i = phi i32 [ %0, %newFuncRoot ], [ %6, %byte_reverse.exit.i ] + %7 = icmp sgt i32 %count_addr.0.i, 63 + br i1 %7, label %bb2.i, label %sha_update.exit.exitStub } declare void @sha_stream_bb3_2E_i_bb1_2E_i_2E_i(i8*) nounwind + +declare void @llvm.memset.p0i8.i64(i8* nocapture, i8, i64, i32, i1) nounwind + +declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture, i8* nocapture, i64, i32, i1) nounwind + diff --git a/test/Assembler/AutoUpgradeIntrinsics.ll b/test/Assembler/AutoUpgradeIntrinsics.ll index 20beb49..eb4ac76 100644 --- a/test/Assembler/AutoUpgradeIntrinsics.ll +++ b/test/Assembler/AutoUpgradeIntrinsics.ll @@ -1,87 +1,6 @@ ; Tests to make sure intrinsics are automatically upgraded. -; RUN: llvm-as < %s | llvm-dis | not grep {i32 @llvm\\.ct} -; RUN: llvm-as < %s | llvm-dis | \ -; RUN: not grep {llvm\\.part\\.set\\.i\[0-9\]*\\.i\[0-9\]*\\.i\[0-9\]*} -; RUN: llvm-as < %s | llvm-dis | \ -; RUN: not grep {llvm\\.part\\.select\\.i\[0-9\]*\\.i\[0-9\]*} -; RUN: llvm-as < %s | llvm-dis | \ -; RUN: not grep {llvm\\.bswap\\.i\[0-9\]*\\.i\[0-9\]*} -; RUN: llvm-as < %s | llvm-dis | \ -; RUN: not grep {llvm\\.x86\\.sse2\\.loadu} -; RUN: llvm-as < %s | llvm-dis | \ -; RUN: grep {llvm\\.x86\\.mmx\\.ps} | grep {x86_mmx} | count 16 ; RUN: llvm-as < %s | llvm-dis | FileCheck %s -declare i32 @llvm.ctpop.i28(i28 %val) -declare i32 @llvm.cttz.i29(i29 %val) -declare i32 @llvm.ctlz.i30(i30 %val) - -define i32 @test_ct(i32 %A) { - %c1 = call i32 @llvm.ctpop.i28(i28 1234) - %c2 = call i32 @llvm.cttz.i29(i29 2345) - %c3 = call i32 @llvm.ctlz.i30(i30 3456) - %r1 = add i32 %c1, %c2 - %r2 = add i32 %r1, %c3 - ret i32 %r2 -} - -declare i32 @llvm.part.set.i32.i32.i32(i32 %x, i32 %rep, i32 %hi, i32 %lo) -declare i16 @llvm.part.set.i16.i16.i16(i16 %x, i16 %rep, i32 %hi, i32 %lo) -define i32 @test_part_set(i32 %A, i16 %B) { - %a = call i32 @llvm.part.set.i32.i32.i32(i32 %A, i32 27, i32 8, i32 0) - %b = call i16 @llvm.part.set.i16.i16.i16(i16 %B, i16 27, i32 8, i32 0) - %c = zext i16 %b to i32 - %d = add i32 %a, %c - ret i32 %d -} - -declare i32 @llvm.part.select.i32.i32(i32 %x, i32 %hi, i32 %lo) -declare i16 @llvm.part.select.i16.i16(i16 %x, i32 %hi, i32 %lo) -define i32 @test_part_select(i32 %A, i16 %B) { - %a = call i32 @llvm.part.select.i32.i32(i32 %A, i32 8, i32 0) - %b = call i16 @llvm.part.select.i16.i16(i16 %B, i32 8, i32 0) - %c = zext i16 %b to i32 - %d = add i32 %a, %c - ret i32 %d -} - -declare i32 @llvm.bswap.i32.i32(i32 %x) -declare i16 @llvm.bswap.i16.i16(i16 %x) -define i32 @test_bswap(i32 %A, i16 %B) { - %a = call i32 @llvm.bswap.i32.i32(i32 %A) - %b = call i16 @llvm.bswap.i16.i16(i16 %B) - %c = zext i16 %b to i32 - %d = add i32 %a, %c - ret i32 %d -} - -declare <4 x i16> @llvm.x86.mmx.psra.w(<4 x i16>, <2 x i32>) nounwind readnone -declare <4 x i16> @llvm.x86.mmx.psll.w(<4 x i16>, <2 x i32>) nounwind readnone -declare <4 x i16> @llvm.x86.mmx.psrl.w(<4 x i16>, <2 x i32>) nounwind readnone -define void @sh16(<4 x i16> %A, <2 x i32> %B) { - %r1 = call <4 x i16> @llvm.x86.mmx.psra.w( <4 x i16> %A, <2 x i32> %B ) ; <<4 x i16>> [#uses=0] - %r2 = call <4 x i16> @llvm.x86.mmx.psll.w( <4 x i16> %A, <2 x i32> %B ) ; <<4 x i16>> [#uses=0] - %r3 = call <4 x i16> @llvm.x86.mmx.psrl.w( <4 x i16> %A, <2 x i32> %B ) ; <<4 x i16>> [#uses=0] - ret void -} - -declare <2 x i32> @llvm.x86.mmx.psra.d(<2 x i32>, <2 x i32>) nounwind readnone -declare <2 x i32> @llvm.x86.mmx.psll.d(<2 x i32>, <2 x i32>) nounwind readnone -declare <2 x i32> @llvm.x86.mmx.psrl.d(<2 x i32>, <2 x i32>) nounwind readnone -define void @sh32(<2 x i32> %A, <2 x i32> %B) { - %r1 = call <2 x i32> @llvm.x86.mmx.psra.d( <2 x i32> %A, <2 x i32> %B ) ; <<2 x i32>> [#uses=0] - %r2 = call <2 x i32> @llvm.x86.mmx.psll.d( <2 x i32> %A, <2 x i32> %B ) ; <<2 x i32>> [#uses=0] - %r3 = call <2 x i32> @llvm.x86.mmx.psrl.d( <2 x i32> %A, <2 x i32> %B ) ; <<2 x i32>> [#uses=0] - ret void -} - -declare <1 x i64> @llvm.x86.mmx.psll.q(<1 x i64>, <2 x i32>) nounwind readnone -declare <1 x i64> @llvm.x86.mmx.psrl.q(<1 x i64>, <2 x i32>) nounwind readnone -define void @sh64(<1 x i64> %A, <2 x i32> %B) { - %r1 = call <1 x i64> @llvm.x86.mmx.psll.q( <1 x i64> %A, <2 x i32> %B ) ; <<1 x i64>> [#uses=0] - %r2 = call <1 x i64> @llvm.x86.mmx.psrl.q( <1 x i64> %A, <2 x i32> %B ) ; <<1 x i64>> [#uses=0] - ret void -} declare <4 x float> @llvm.x86.sse.loadu.ps(i8*) nounwind readnone declare <16 x i8> @llvm.x86.sse2.loadu.dq(i8*) nounwind readnone @@ -90,6 +9,10 @@ define void @test_loadu(i8* %a, double* %b) { %v0 = call <4 x float> @llvm.x86.sse.loadu.ps(i8* %a) %v1 = call <16 x i8> @llvm.x86.sse2.loadu.dq(i8* %a) %v2 = call <2 x double> @llvm.x86.sse2.loadu.pd(double* %b) + +; CHECK: load i128* {{.*}}, align 1 +; CHECK: load i128* {{.*}}, align 1 +; CHECK: load i128* {{.*}}, align 1 ret void } diff --git a/test/Assembler/AutoUpgradeMMXIntrinsics.ll b/test/Assembler/AutoUpgradeMMXIntrinsics.ll deleted file mode 100644 index 54120ff..0000000 --- a/test/Assembler/AutoUpgradeMMXIntrinsics.ll +++ /dev/null @@ -1,223 +0,0 @@ -; Tests to make sure MMX intrinsics are automatically upgraded. -; RUN: llvm-as < %s | llvm-dis -o %t -; RUN: grep {llvm\\.x86\\.mmx} %t | not grep {\\\<1 x i64\\\>} -; RUN: grep {llvm\\.x86\\.mmx} %t | not grep {\\\<2 x i32\\\>} -; RUN: grep {llvm\\.x86\\.mmx} %t | not grep {\\\<4 x i16\\\>} -; RUN: grep {llvm\\.x86\\.mmx} %t | not grep {\\\<8 x i8\\\>} -; RUN: grep {llvm\\.x86\\.sse\\.pshuf\\.w} %t | not grep i32 - -; Addition -declare <8 x i8> @llvm.x86.mmx.padd.b(<8 x i8>, <8 x i8>) nounwind readnone -declare <4 x i16> @llvm.x86.mmx.padd.w(<4 x i16>, <4 x i16>) nounwind readnone -declare <2 x i32> @llvm.x86.mmx.padd.d(<2 x i32>, <2 x i32>) nounwind readnone -declare <1 x i64> @llvm.x86.mmx.padd.q(<1 x i64>, <1 x i64>) nounwind readnone -declare <8 x i8> @llvm.x86.mmx.padds.b(<8 x i8>, <8 x i8>) nounwind readnone -declare <4 x i16> @llvm.x86.mmx.padds.w(<4 x i16>, <4 x i16>) nounwind readnone -declare <8 x i8> @llvm.x86.mmx.paddus.b(<8 x i8>, <8 x i8>) nounwind readnone -declare <4 x i16> @llvm.x86.mmx.paddus.w(<4 x i16>, <4 x i16>) nounwind readnone -define void @add(<8 x i8> %A, <8 x i8> %B, <4 x i16> %C, <4 x i16> %D, - <2 x i32> %E, <2 x i32> %F, <1 x i64> %G, <1 x i64> %H) { - %r1 = call <8 x i8> @llvm.x86.mmx.padd.b(<8 x i8> %A, <8 x i8> %B) - %r2 = call <4 x i16> @llvm.x86.mmx.padd.w(<4 x i16> %C, <4 x i16> %D) - %r3 = call <2 x i32> @llvm.x86.mmx.padd.d(<2 x i32> %E, <2 x i32> %F) - %r4 = call <1 x i64> @llvm.x86.mmx.padd.q(<1 x i64> %G, <1 x i64> %H) - %r5 = call <8 x i8> @llvm.x86.mmx.padds.b(<8 x i8> %A, <8 x i8> %B) - %r6 = call <4 x i16> @llvm.x86.mmx.padds.w(<4 x i16> %C, <4 x i16> %D) - %r7 = call <8 x i8> @llvm.x86.mmx.paddus.b(<8 x i8> %A, <8 x i8> %B) - %r8 = call <4 x i16> @llvm.x86.mmx.paddus.w(<4 x i16> %C, <4 x i16> %D) - ret void -} - -; Subtraction -declare <8 x i8> @llvm.x86.mmx.psub.b(<8 x i8>, <8 x i8>) nounwind readnone -declare <4 x i16> @llvm.x86.mmx.psub.w(<4 x i16>, <4 x i16>) nounwind readnone -declare <2 x i32> @llvm.x86.mmx.psub.d(<2 x i32>, <2 x i32>) nounwind readnone -declare <1 x i64> @llvm.x86.mmx.psub.q(<1 x i64>, <1 x i64>) nounwind readnone -declare <8 x i8> @llvm.x86.mmx.psubs.b(<8 x i8>, <8 x i8>) nounwind readnone -declare <4 x i16> @llvm.x86.mmx.psubs.w(<4 x i16>, <4 x i16>) nounwind readnone -declare <8 x i8> @llvm.x86.mmx.psubus.b(<8 x i8>, <8 x i8>) nounwind readnone -declare <4 x i16> @llvm.x86.mmx.psubus.w(<4 x i16>, <4 x i16>) nounwind readnone -define void @sub(<8 x i8> %A, <8 x i8> %B, <4 x i16> %C, <4 x i16> %D, - <2 x i32> %E, <2 x i32> %F, <1 x i64> %G, <1 x i64> %H) { - %r1 = call <8 x i8> @llvm.x86.mmx.psub.b(<8 x i8> %A, <8 x i8> %B) - %r2 = call <4 x i16> @llvm.x86.mmx.psub.w(<4 x i16> %C, <4 x i16> %D) - %r3 = call <2 x i32> @llvm.x86.mmx.psub.d(<2 x i32> %E, <2 x i32> %F) - %r4 = call <1 x i64> @llvm.x86.mmx.psub.q(<1 x i64> %G, <1 x i64> %H) - %r5 = call <8 x i8> @llvm.x86.mmx.psubs.b(<8 x i8> %A, <8 x i8> %B) - %r6 = call <4 x i16> @llvm.x86.mmx.psubs.w(<4 x i16> %C, <4 x i16> %D) - %r7 = call <8 x i8> @llvm.x86.mmx.psubus.b(<8 x i8> %A, <8 x i8> %B) - %r8 = call <4 x i16> @llvm.x86.mmx.psubus.w(<4 x i16> %C, <4 x i16> %D) - ret void -} - -; Multiplication -declare <4 x i16> @llvm.x86.mmx.pmulh.w(<4 x i16>, <4 x i16>) nounwind readnone -declare <4 x i16> @llvm.x86.mmx.pmull.w(<4 x i16>, <4 x i16>) nounwind readnone -declare <4 x i16> @llvm.x86.mmx.pmulhu.w(<4 x i16>, <4 x i16>) nounwind readnone -declare <4 x i16> @llvm.x86.mmx.pmulu.dq(<4 x i16>, <4 x i16>) nounwind readnone -declare <2 x i32> @llvm.x86.mmx.pmadd.wd(<4 x i16>, <4 x i16>) nounwind readnone -define void @mul(<4 x i16> %A, <4 x i16> %B) { - %r1 = call <4 x i16> @llvm.x86.mmx.pmulh.w(<4 x i16> %A, <4 x i16> %B) - %r2 = call <4 x i16> @llvm.x86.mmx.pmull.w(<4 x i16> %A, <4 x i16> %B) - %r3 = call <4 x i16> @llvm.x86.mmx.pmulhu.w(<4 x i16> %A, <4 x i16> %B) - %r4 = call <4 x i16> @llvm.x86.mmx.pmulu.dq(<4 x i16> %A, <4 x i16> %B) - %r5 = call <2 x i32> @llvm.x86.mmx.pmadd.wd(<4 x i16> %A, <4 x i16> %B) - ret void -} - -; Bitwise operations -declare <1 x i64> @llvm.x86.mmx.pand(<1 x i64>, <1 x i64>) nounwind readnone -declare <1 x i64> @llvm.x86.mmx.pandn(<1 x i64>, <1 x i64>) nounwind readnone -declare <1 x i64> @llvm.x86.mmx.por(<1 x i64>, <1 x i64>) nounwind readnone -declare <1 x i64> @llvm.x86.mmx.pxor(<1 x i64>, <1 x i64>) nounwind readnone -define void @bit(<1 x i64> %A, <1 x i64> %B) { - %r1 = call <1 x i64> @llvm.x86.mmx.pand(<1 x i64> %A, <1 x i64> %B) - %r2 = call <1 x i64> @llvm.x86.mmx.pandn(<1 x i64> %A, <1 x i64> %B) - %r3 = call <1 x i64> @llvm.x86.mmx.por(<1 x i64> %A, <1 x i64> %B) - %r4 = call <1 x i64> @llvm.x86.mmx.pxor(<1 x i64> %A, <1 x i64> %B) - ret void -} - -; Averages -declare <8 x i8> @llvm.x86.mmx.pavg.b(<8 x i8>, <8 x i8>) nounwind readnone -declare <4 x i16> @llvm.x86.mmx.pavg.w(<4 x i16>, <4 x i16>) nounwind readnone -define void @avg(<8 x i8> %A, <8 x i8> %B, <4 x i16> %C, <4 x i16> %D) { - %r1 = call <8 x i8> @llvm.x86.mmx.pavg.b(<8 x i8> %A, <8 x i8> %B) - %r2 = call <4 x i16> @llvm.x86.mmx.pavg.w(<4 x i16> %C, <4 x i16> %D) - ret void -} - -; Maximum -declare <8 x i8> @llvm.x86.mmx.pmaxu.b(<8 x i8>, <8 x i8>) nounwind readnone -declare <4 x i16> @llvm.x86.mmx.pmaxs.w(<4 x i16>, <4 x i16>) nounwind readnone -define void @max(<8 x i8> %A, <8 x i8> %B, <4 x i16> %C, <4 x i16> %D) { - %r1 = call <8 x i8> @llvm.x86.mmx.pmaxu.b(<8 x i8> %A, <8 x i8> %B) - %r2 = call <4 x i16> @llvm.x86.mmx.pmaxs.w(<4 x i16> %C, <4 x i16> %D) - ret void -} - -; Minimum -declare <8 x i8> @llvm.x86.mmx.pminu.b(<8 x i8>, <8 x i8>) nounwind readnone -declare <4 x i16> @llvm.x86.mmx.pmins.w(<4 x i16>, <4 x i16>) nounwind readnone -define void @min(<8 x i8> %A, <8 x i8> %B, <4 x i16> %C, <4 x i16> %D) { - %r1 = call <8 x i8> @llvm.x86.mmx.pminu.b(<8 x i8> %A, <8 x i8> %B) - %r2 = call <4 x i16> @llvm.x86.mmx.pmins.w(<4 x i16> %C, <4 x i16> %D) - ret void -} - -; Packed sum of absolute differences -declare <4 x i16> @llvm.x86.mmx.psad.bw(<8 x i8>, <8 x i8>) nounwind readnone -define void @psad(<8 x i8> %A, <8 x i8> %B) { - %r1 = call <4 x i16> @llvm.x86.mmx.psad.bw(<8 x i8> %A, <8 x i8> %B) - ret void -} - -; Shift left -declare <4 x i16> @llvm.x86.mmx.psll.w(<4 x i16>, <1 x i64>) nounwind readnone -declare <2 x i32> @llvm.x86.mmx.psll.d(<2 x i32>, <1 x i64>) nounwind readnone -declare <1 x i64> @llvm.x86.mmx.psll.q(<1 x i64>, <1 x i64>) nounwind readnone -declare <4 x i16> @llvm.x86.mmx.pslli.w(<4 x i16>, i32) nounwind readnone -declare <2 x i32> @llvm.x86.mmx.pslli.d(<2 x i32>, i32) nounwind readnone -declare <1 x i64> @llvm.x86.mmx.pslli.q(<1 x i64>, i32) nounwind readnone -define void @shl(<4 x i16> %A, <2 x i32> %B, <1 x i64> %C, i32 %D) { - %r1 = call <4 x i16> @llvm.x86.mmx.psll.w(<4 x i16> %A, <1 x i64> %C) - %r2 = call <2 x i32> @llvm.x86.mmx.psll.d(<2 x i32> %B, <1 x i64> %C) - %r3 = call <1 x i64> @llvm.x86.mmx.psll.q(<1 x i64> %C, <1 x i64> %C) - %r4 = call <4 x i16> @llvm.x86.mmx.pslli.w(<4 x i16> %A, i32 %D) - %r5 = call <2 x i32> @llvm.x86.mmx.pslli.d(<2 x i32> %B, i32 %D) - %r6 = call <1 x i64> @llvm.x86.mmx.pslli.q(<1 x i64> %C, i32 %D) - ret void -} - -; Shift right logical -declare <4 x i16> @llvm.x86.mmx.psrl.w(<4 x i16>, <1 x i64>) nounwind readnone -declare <2 x i32> @llvm.x86.mmx.psrl.d(<2 x i32>, <1 x i64>) nounwind readnone -declare <1 x i64> @llvm.x86.mmx.psrl.q(<1 x i64>, <1 x i64>) nounwind readnone -declare <4 x i16> @llvm.x86.mmx.psrli.w(<4 x i16>, i32) nounwind readnone -declare <2 x i32> @llvm.x86.mmx.psrli.d(<2 x i32>, i32) nounwind readnone -declare <1 x i64> @llvm.x86.mmx.psrli.q(<1 x i64>, i32) nounwind readnone -define void @shr(<4 x i16> %A, <2 x i32> %B, <1 x i64> %C, i32 %D) { - %r1 = call <4 x i16> @llvm.x86.mmx.psrl.w(<4 x i16> %A, <1 x i64> %C) - %r2 = call <2 x i32> @llvm.x86.mmx.psrl.d(<2 x i32> %B, <1 x i64> %C) - %r3 = call <1 x i64> @llvm.x86.mmx.psrl.q(<1 x i64> %C, <1 x i64> %C) - %r4 = call <4 x i16> @llvm.x86.mmx.psrli.w(<4 x i16> %A, i32 %D) - %r5 = call <2 x i32> @llvm.x86.mmx.psrli.d(<2 x i32> %B, i32 %D) - %r6 = call <1 x i64> @llvm.x86.mmx.psrli.q(<1 x i64> %C, i32 %D) - ret void -} - -; Shift right arithmetic -declare <4 x i16> @llvm.x86.mmx.psra.w(<4 x i16>, <1 x i64>) nounwind readnone -declare <2 x i32> @llvm.x86.mmx.psra.d(<2 x i32>, <1 x i64>) nounwind readnone -declare <4 x i16> @llvm.x86.mmx.psrai.w(<4 x i16>, i32) nounwind readnone -declare <2 x i32> @llvm.x86.mmx.psrai.d(<2 x i32>, i32) nounwind readnone -define void @sra(<4 x i16> %A, <2 x i32> %B, <1 x i64> %C, i32 %D) { - %r1 = call <4 x i16> @llvm.x86.mmx.psra.w(<4 x i16> %A, <1 x i64> %C) - %r2 = call <2 x i32> @llvm.x86.mmx.psra.d(<2 x i32> %B, <1 x i64> %C) - %r3 = call <4 x i16> @llvm.x86.mmx.psrai.w(<4 x i16> %A, i32 %D) - %r4 = call <2 x i32> @llvm.x86.mmx.psrai.d(<2 x i32> %B, i32 %D) - ret void -} - -; Pack/Unpack ops -declare <8 x i8> @llvm.x86.mmx.packsswb(<4 x i16>, <4 x i16>) nounwind readnone -declare <4 x i16> @llvm.x86.mmx.packssdw(<2 x i32>, <2 x i32>) nounwind readnone -declare <8 x i8> @llvm.x86.mmx.packuswb(<4 x i16>, <4 x i16>) nounwind readnone -declare <8 x i8> @llvm.x86.mmx.punpckhbw(<8 x i8>, <8 x i8>) nounwind readnone -declare <4 x i16> @llvm.x86.mmx.punpckhwd(<4 x i16>, <4 x i16>) nounwind readnone -declare <2 x i32> @llvm.x86.mmx.punpckhdq(<2 x i32>, <2 x i32>) nounwind readnone -declare <8 x i8> @llvm.x86.mmx.punpcklbw(<8 x i8>, <8 x i8>) nounwind readnone -declare <4 x i16> @llvm.x86.mmx.punpcklwd(<4 x i16>, <4 x i16>) nounwind readnone -declare <2 x i32> @llvm.x86.mmx.punpckldq(<2 x i32>, <2 x i32>) nounwind readnone -define void @pack_unpack(<8 x i8> %A, <8 x i8> %B, <4 x i16> %C, <4 x i16> %D, - <2 x i32> %E, <2 x i32> %F) { - %r1 = call <8 x i8> @llvm.x86.mmx.packsswb(<4 x i16> %C, <4 x i16> %D) - %r2 = call <4 x i16> @llvm.x86.mmx.packssdw(<2 x i32> %E, <2 x i32> %F) - %r3 = call <8 x i8> @llvm.x86.mmx.packuswb(<4 x i16> %C, <4 x i16> %D) - %r4 = call <8 x i8> @llvm.x86.mmx.punpckhbw(<8 x i8> %A, <8 x i8> %B) - %r5 = call <4 x i16> @llvm.x86.mmx.punpckhwd(<4 x i16> %C, <4 x i16> %D) - %r6 = call <2 x i32> @llvm.x86.mmx.punpckhdq(<2 x i32> %E, <2 x i32> %F) - %r7 = call <8 x i8> @llvm.x86.mmx.punpcklbw(<8 x i8> %A, <8 x i8> %B) - %r8 = call <4 x i16> @llvm.x86.mmx.punpcklwd(<4 x i16> %C, <4 x i16> %D) - %r9 = call <2 x i32> @llvm.x86.mmx.punpckldq(<2 x i32> %E, <2 x i32> %F) - ret void -} - -; Integer comparison ops -declare <8 x i8> @llvm.x86.mmx.pcmpeq.b(<8 x i8>, <8 x i8>) nounwind readnone -declare <4 x i16> @llvm.x86.mmx.pcmpeq.w(<4 x i16>, <4 x i16>) nounwind readnone -declare <2 x i32> @llvm.x86.mmx.pcmpeq.d(<2 x i32>, <2 x i32>) nounwind readnone -declare <8 x i8> @llvm.x86.mmx.pcmpgt.b(<8 x i8>, <8 x i8>) nounwind readnone -declare <4 x i16> @llvm.x86.mmx.pcmpgt.w(<4 x i16>, <4 x i16>) nounwind readnone -declare <2 x i32> @llvm.x86.mmx.pcmpgt.d(<2 x i32>, <2 x i32>) nounwind readnone -define void @cmp(<8 x i8> %A, <8 x i8> %B, <4 x i16> %C, <4 x i16> %D, - <2 x i32> %E, <2 x i32> %F) { - %r1 = call <8 x i8> @llvm.x86.mmx.pcmpeq.b(<8 x i8> %A, <8 x i8> %B) - %r2 = call <4 x i16> @llvm.x86.mmx.pcmpeq.w(<4 x i16> %C, <4 x i16> %D) - %r3 = call <2 x i32> @llvm.x86.mmx.pcmpeq.d(<2 x i32> %E, <2 x i32> %F) - %r4 = call <8 x i8> @llvm.x86.mmx.pcmpgt.b(<8 x i8> %A, <8 x i8> %B) - %r5 = call <4 x i16> @llvm.x86.mmx.pcmpgt.w(<4 x i16> %C, <4 x i16> %D) - %r6 = call <2 x i32> @llvm.x86.mmx.pcmpgt.d(<2 x i32> %E, <2 x i32> %F) - ret void -} - -; Miscellaneous -declare void @llvm.x86.mmx.maskmovq(<8 x i8>, <8 x i8>, i32*) nounwind readnone -declare i32 @llvm.x86.mmx.pmovmskb(<8 x i8>) nounwind readnone -declare void @llvm.x86.mmx.movnt.dq(i32*, <1 x i64>) nounwind readnone -declare <1 x i64> @llvm.x86.mmx.palignr.b(<1 x i64>, <1 x i64>, i8) nounwind readnone -declare i32 @llvm.x86.mmx.pextr.w(<1 x i64>, i32) nounwind readnone -declare <1 x i64> @llvm.x86.mmx.pinsr.w(<1 x i64>, i32, i32) nounwind readnone -declare <4 x i16> @llvm.x86.ssse3.pshuf.w(<4 x i16>, i32) nounwind readnone -define void @misc(<8 x i8> %A, <8 x i8> %B, <4 x i16> %C, <4 x i16> %D, - <2 x i32> %E, <2 x i32> %F, <1 x i64> %G, <1 x i64> %H, - i32* %I, i8 %J, i16 %K, i32 %L) { - call void @llvm.x86.mmx.maskmovq(<8 x i8> %A, <8 x i8> %B, i32* %I) - %r1 = call i32 @llvm.x86.mmx.pmovmskb(<8 x i8> %A) - call void @llvm.x86.mmx.movnt.dq(i32* %I, <1 x i64> %G) - %r2 = call <1 x i64> @llvm.x86.mmx.palignr.b(<1 x i64> %G, <1 x i64> %H, i8 %J) - %r3 = call i32 @llvm.x86.mmx.pextr.w(<1 x i64> %G, i32 37) - %r4 = call <1 x i64> @llvm.x86.mmx.pinsr.w(<1 x i64> %G, i32 37, i32 927) - %r5 = call <4 x i16> @llvm.x86.ssse3.pshuf.w(<4 x i16> %C, i32 37) - ret void -} diff --git a/test/Bitcode/memcpy.ll b/test/Bitcode/memcpy.ll deleted file mode 100644 index 299eb1e..0000000 --- a/test/Bitcode/memcpy.ll +++ /dev/null @@ -1,23 +0,0 @@ -; RUN: llvm-as %s -o /dev/null - -define void @test(i32* %P, i32* %Q) { -entry: - %tmp.1 = bitcast i32* %P to i8* ; [#uses=3] - %tmp.3 = bitcast i32* %Q to i8* ; [#uses=4] - tail call void @llvm.memcpy.i32( i8* %tmp.1, i8* %tmp.3, i32 100000, i32 1 ) - tail call void @llvm.memcpy.i64( i8* %tmp.1, i8* %tmp.3, i64 100000, i32 1 ) - tail call void @llvm.memset.i32( i8* %tmp.3, i8 14, i32 10000, i32 0 ) - tail call void @llvm.memmove.i32( i8* %tmp.1, i8* %tmp.3, i32 123124, i32 1 ) - tail call void @llvm.memmove.i64( i8* %tmp.1, i8* %tmp.3, i64 123124, i32 1 ) - ret void -} - -declare void @llvm.memcpy.i32(i8*, i8*, i32, i32) - -declare void @llvm.memcpy.i64(i8*, i8*, i64, i32) - -declare void @llvm.memset.i32(i8*, i8, i32, i32) - -declare void @llvm.memmove.i32(i8*, i8*, i32, i32) - -declare void @llvm.memmove.i64(i8*, i8*, i64, i32) diff --git a/test/CodeGen/ARM/2007-05-07-jumptoentry.ll b/test/CodeGen/ARM/2007-05-07-jumptoentry.ll deleted file mode 100644 index 26864f1..0000000 --- a/test/CodeGen/ARM/2007-05-07-jumptoentry.ll +++ /dev/null @@ -1,58 +0,0 @@ -; RUN: llc < %s | not grep 1_0 -; This used to create an extra branch to 'entry', LBB1_0. - -; ModuleID = 'bug.bc' -target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:32-f32:32:32-f64:32:32-v64:64:64-v128:128:128-a0:0:64" -target triple = "arm-apple-darwin8" - %struct.HexxagonMove = type { i8, i8, i32 } - %struct.HexxagonMoveList = type { i32, %struct.HexxagonMove* } - -define void @_ZN16HexxagonMoveList8sortListEv(%struct.HexxagonMoveList* %this) { -entry: - %tmp51 = getelementptr %struct.HexxagonMoveList* %this, i32 0, i32 0 ; [#uses=1] - %tmp2 = getelementptr %struct.HexxagonMoveList* %this, i32 0, i32 1 ; <%struct.HexxagonMove**> [#uses=2] - br label %bb49 - -bb1: ; preds = %bb49 - %tmp3 = load %struct.HexxagonMove** %tmp2 ; <%struct.HexxagonMove*> [#uses=5] - %tmp6 = getelementptr %struct.HexxagonMove* %tmp3, i32 %i.1, i32 2 ; [#uses=1] - %tmp7 = load i32* %tmp6 ; [#uses=2] - %tmp12 = add i32 %i.1, 1 ; [#uses=7] - %tmp14 = getelementptr %struct.HexxagonMove* %tmp3, i32 %tmp12, i32 2 ; [#uses=1] - %tmp15 = load i32* %tmp14 ; [#uses=1] - %tmp16 = icmp slt i32 %tmp7, %tmp15 ; [#uses=1] - br i1 %tmp16, label %cond_true, label %bb49 - -cond_true: ; preds = %bb1 - %tmp23.0 = getelementptr %struct.HexxagonMove* %tmp3, i32 %i.1, i32 0 ; [#uses=2] - %tmp67 = load i8* %tmp23.0 ; [#uses=1] - %tmp23.1 = getelementptr %struct.HexxagonMove* %tmp3, i32 %i.1, i32 1 ; [#uses=1] - %tmp68 = load i8* %tmp23.1 ; [#uses=1] - %tmp3638 = getelementptr %struct.HexxagonMove* %tmp3, i32 %tmp12, i32 0 ; [#uses=1] - tail call void @llvm.memcpy.i32( i8* %tmp23.0, i8* %tmp3638, i32 8, i32 4 ) - %tmp41 = load %struct.HexxagonMove** %tmp2 ; <%struct.HexxagonMove*> [#uses=3] - %tmp44.0 = getelementptr %struct.HexxagonMove* %tmp41, i32 %tmp12, i32 0 ; [#uses=1] - store i8 %tmp67, i8* %tmp44.0 - %tmp44.1 = getelementptr %struct.HexxagonMove* %tmp41, i32 %tmp12, i32 1 ; [#uses=1] - store i8 %tmp68, i8* %tmp44.1 - %tmp44.2 = getelementptr %struct.HexxagonMove* %tmp41, i32 %tmp12, i32 2 ; [#uses=1] - store i32 %tmp7, i32* %tmp44.2 - br label %bb49 - -bb49: ; preds = %bb59, %cond_true, %bb1, %entry - %i.1 = phi i32 [ 0, %entry ], [ %tmp12, %bb1 ], [ %tmp12, %cond_true ], [ 0, %bb59 ] ; [#uses=5] - %move.2 = phi i32 [ 0, %entry ], [ 1, %cond_true ], [ %move.2, %bb1 ], [ 0, %bb59 ] ; [#uses=2] - %tmp52 = load i32* %tmp51 ; [#uses=1] - %tmp53 = add i32 %tmp52, -1 ; [#uses=1] - %tmp55 = icmp sgt i32 %tmp53, %i.1 ; [#uses=1] - br i1 %tmp55, label %bb1, label %bb59 - -bb59: ; preds = %bb49 - %tmp61 = icmp eq i32 %move.2, 0 ; [#uses=1] - br i1 %tmp61, label %return, label %bb49 - -return: ; preds = %bb59 - ret void -} - -declare void @llvm.memcpy.i32(i8*, i8*, i32, i32) diff --git a/test/CodeGen/ARM/2007-05-31-RegScavengerInfiniteLoop.ll b/test/CodeGen/ARM/2007-05-31-RegScavengerInfiniteLoop.ll deleted file mode 100644 index 7ba2a19..0000000 --- a/test/CodeGen/ARM/2007-05-31-RegScavengerInfiniteLoop.ll +++ /dev/null @@ -1,237 +0,0 @@ -; RUN: llc < %s -; PR1424 - -target datalayout = "e-p:32:32:32-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" -target triple = "arm-unknown-linux-gnueabi" - %struct.AVClass = type { i8*, i8* (i8*)*, %struct.AVOption* } - %struct.AVCodec = type { i8*, i32, i32, i32, i32 (%struct.AVCodecContext*)*, i32 (%struct.AVCodecContext*, i8*, i32, i8*)*, i32 (%struct.AVCodecContext*)*, i32 (%struct.AVCodecContext*, i8*, i32*, i8*, i32)*, i32, %struct.AVCodec*, void (%struct.AVCodecContext*)*, %struct.AVRational*, i32* } - %struct.AVCodecContext = type { %struct.AVClass*, i32, i32, i32, i32, i32, i8*, i32, %struct.AVRational, i32, i32, i32, i32, i32, void (%struct.AVCodecContext*, %struct.AVFrame*, i32*, i32, i32, i32)*, i32, i32, i32, i32, i32, i32, i32, float, float, i32, i32, i32, i32, float, i32, i32, i32, %struct.AVCodec*, i8*, i32, i32, void (%struct.AVCodecContext*, i8*, i32, i32)*, i32, i32, i32, i32, i32, i32, i32, i32, i32, i8*, [32 x i8], i32, i32, i32, i32, i32, i32, i32, float, i32, i32 (%struct.AVCodecContext*, %struct.AVFrame*)*, void (%struct.AVCodecContext*, %struct.AVFrame*)*, i32, i32, i32, i32, i8*, i8*, float, float, i32, %struct.RcOverride*, i32, i8*, i32, i32, i32, float, float, float, float, i32, float, float, float, float, float, i32, i32, i32, i32*, i32, i32, i32, i32, %struct.AVRational, %struct.AVFrame*, i32, i32, [4 x i64], i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 (%struct.AVCodecContext*, i32*)*, i32, i32, i32, i32, i32, i32, i8*, i32, i32, i32, i32, i32, i32, i16*, i16*, i32, i32, i32, i32, %struct.AVPaletteControl*, i32, i32 (%struct.AVCodecContext*, %struct.AVFrame*)*, i32, i32, i32, i32, i32, i32, i32, i32 (%struct.AVCodecContext*, i32 (%struct.AVCodecContext*, i8*)*, i8**, i32*, i32)*, i8*, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, float, i32, i32, i32, i32, i32, i32, i32, i32, float, i32, i32, i32, i32, i32, i32, float, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i64 } - %struct.AVEvalExpr = type opaque - %struct.AVFrame = type { [4 x i8*], [4 x i32], [4 x i8*], i32, i32, i64, i32, i32, i32, i32, i32, i8*, i32, i8*, [2 x [2 x i16]*], i32*, i8, i8*, [4 x i64], i32, i32, i32, i32, i32, %struct.AVPanScan*, i32, i32, i16*, [2 x i8*] } - %struct.AVOption = type opaque - %struct.AVPaletteControl = type { i32, [256 x i32] } - %struct.AVPanScan = type { i32, i32, i32, [3 x [2 x i16]] } - %struct.AVRational = type { i32, i32 } - %struct.BlockNode = type { i16, i16, i8, [3 x i8], i8, i8 } - %struct.DSPContext = type { void (i16*, i8*, i32)*, void (i16*, i8*, i8*, i32)*, void (i16*, i8*, i32)*, void (i16*, i8*, i32)*, void (i16*, i8*, i32)*, void (i8*, i16*, i32)*, void (i8*, i16*, i32)*, i32 (i16*)*, void (i8*, i8*, i32, i32, i32, i32, i32)*, void (i8*, i8*, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32)*, void (i16*)*, i32 (i8*, i32)*, i32 (i8*, i32)*, [5 x i32 (i8*, i8*, i8*, i32, i32)*], [5 x i32 (i8*, i8*, i8*, i32, i32)*], [5 x i32 (i8*, i8*, i8*, i32, i32)*], [5 x i32 (i8*, i8*, i8*, i32, i32)*], [5 x i32 (i8*, i8*, i8*, i32, i32)*], [5 x i32 (i8*, i8*, i8*, i32, i32)*], [5 x i32 (i8*, i8*, i8*, i32, i32)*], [5 x i32 (i8*, i8*, i8*, i32, i32)*], [5 x i32 (i8*, i8*, i8*, i32, i32)*], [5 x i32 (i8*, i8*, i8*, i32, i32)*], [5 x i32 (i8*, i8*, i8*, i32, i32)*], [5 x i32 (i8*, i8*, i8*, i32, i32)*], [5 x i32 (i8*, i8*, i8*, i32, i32)*], [5 x i32 (i8*, i8*, i8*, i32, i32)*], [5 x i32 (i8*, i8*, i8*, i32, i32)*], [5 x i32 (i8*, i8*, i8*, i32, i32)*], [5 x i32 (i8*, i8*, i8*, i32, i32)*], [5 x i32 (i8*, i8*, i8*, i32, i32)*], [5 x i32 (i8*, i8*, i8*, i32, i32)*], [5 x i32 (i8*, i8*, i8*, i32, i32)*], i32 (i8*, i16*, i32)*, [4 x [4 x void (i8*, i8*, i32, i32)*]], [4 x [4 x void (i8*, i8*, i32, i32)*]], [4 x [4 x void (i8*, i8*, i32, i32)*]], [4 x [4 x void (i8*, i8*, i32, i32)*]], [2 x void (i8*, i8*, i8*, i32, i32)*], [11 x void (i8*, i8*, i32, i32, i32)*], [11 x void (i8*, i8*, i32, i32, i32)*], [2 x [16 x void (i8*, i8*, i32)*]], [2 x [16 x void (i8*, i8*, i32)*]], [2 x [16 x void (i8*, i8*, i32)*]], [2 x [16 x void (i8*, i8*, i32)*]], [8 x void (i8*, i8*, i32)*], [3 x void (i8*, i8*, i32, i32, i32, i32)*], [3 x void (i8*, i8*, i32, i32, i32, i32)*], [3 x void (i8*, i8*, i32, i32, i32, i32)*], [4 x [16 x void (i8*, i8*, i32)*]], [4 x [16 x void (i8*, i8*, i32)*]], [4 x [16 x void (i8*, i8*, i32)*]], [4 x [16 x void (i8*, i8*, i32)*]], [10 x void (i8*, i32, i32, i32, i32)*], [10 x void (i8*, i8*, i32, i32, i32, i32, i32)*], [2 x [16 x void (i8*, i8*, i32)*]], [2 x [16 x void (i8*, i8*, i32)*]], void (i8*, i32, i32, i32, i32, i32, i32)*, void (i8*, i32, i32, i32, i32, i32, i32)*, void (i8*, i32, i32, i32, i32, i32, i32)*, void (i8*, i32, i32, i32, i32, i32, i32)*, void (i8*, i16*, i32)*, [2 x [4 x i32 (i8*, i8*, i8*, i32, i32)*]], void (i8*, i8*, i32)*, void (i8*, i8*, i8*, i32)*, void (i8*, i8*, i8*, i32, i32*, i32*)*, void (i32*, i32*, i32)*, void (i8*, i32, i32, i32, i8*)*, void (i8*, i32, i32, i32, i8*)*, void (i8*, i32, i32, i32, i8*)*, void (i8*, i32, i32, i32, i8*)*, void (i8*, i32, i32, i32)*, void (i8*, i32, i32, i32)*, void ([4 x [4 x i16]]*, i8*, [40 x i8]*, [40 x [2 x i16]]*, i32, i32, i32, i32, i32)*, void (i8*, i32, i32)*, void (i8*, i32, i32)*, void (i8*, i32)*, void (float*, float*, i32)*, void (float*, float*, i32)*, void (float*, float*, float*, i32)*, void (float*, float*, float*, float*, i32, i32, i32)*, void (i16*, float*, i32)*, void (i16*)*, void (i16*)*, void (i16*)*, void (i8*, i32, i16*)*, void (i8*, i32, i16*)*, [64 x i8], i32, i32 (i16*, i16*, i16*, i32)*, void (i16*, i16*, i32)*, void (i8*, i16*, i32)*, void (i8*, i16*, i32)*, void (i8*, i16*, i32)*, void (i8*, i16*, i32)*, void ([4 x i16]*)*, void (i32*, i32*, i32*, i32*, i32*, i32*, i32)*, void (i32*, i32)*, void (i8*, i32, i8**, i32, i32, i32, i32, i32, %struct.slice_buffer*, i32, i8*)*, void (i8*, i32, i32)*, [4 x void (i8*, i32, i8*, i32, i32, i32)*], void (i16*)*, void (i16*, i32)*, void (i16*, i32)*, void (i16*, i32)*, void (i8*, i32)*, void (i8*, i32)*, [16 x void (i8*, i8*, i32, i32)*] } - %struct.FILE = type { i32, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, %struct._IO_marker*, %struct.FILE*, i32, i32, i32, i16, i8, [1 x i8], i8*, i64, i8*, i8*, i8*, i8*, i32, i32, [40 x i8] } - %struct.GetBitContext = type { i8*, i8*, i32*, i32, i32, i32, i32 } - %struct.MJpegContext = type opaque - %struct.MotionEstContext = type { %struct.AVCodecContext*, i32, [4 x [2 x i32]], [4 x [2 x i32]], i8*, i8*, [2 x i8*], i8*, i32, i32*, i32*, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, [4 x [4 x i8*]], [4 x [4 x i8*]], i32, i32, i32, i32, i32, [4 x void (i8*, i8*, i32, i32)*]*, [4 x void (i8*, i8*, i32, i32)*]*, [16 x void (i8*, i8*, i32)*]*, [16 x void (i8*, i8*, i32)*]*, [4097 x i8]*, i8*, i32 (%struct.MpegEncContext*, i32*, i32*, i32, i32, i32, i32, i32)* } - %struct.MpegEncContext = type { %struct.AVCodecContext*, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, %struct.PutBitContext, i32, i32, i32, i32, i32, i32, i64, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, %struct.Picture*, %struct.Picture**, %struct.Picture**, i32, i32, [8 x %struct.MpegEncContext*], %struct.Picture, %struct.Picture, %struct.Picture, %struct.Picture, %struct.Picture*, %struct.Picture*, %struct.Picture*, [3 x i8*], [3 x i32], i16*, [3 x i16*], [20 x i16], i32, i32, i8*, i8*, i8*, i8*, i8*, [16 x i16]*, [3 x [16 x i16]*], i32, i8*, i32, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i32, i32, i32, i32, i32*, i32, i32, i32, i32, i32, i32, i32, [5 x i32], i32, i32, i32, i32, %struct.DSPContext, i32, i32, [2 x i16]*, [2 x i16]*, [2 x i16]*, [2 x i16]*, [2 x i16]*, [2 x i16]*, [2 x [2 x [2 x i16]*]], [2 x [2 x [2 x [2 x i16]*]]], [2 x i16]*, [2 x i16]*, [2 x i16]*, [2 x i16]*, [2 x i16]*, [2 x i16]*, [2 x [2 x [2 x i16]*]], [2 x [2 x [2 x [2 x i16]*]]], [2 x i8*], [2 x [2 x i8*]], i32, i32, i32, [2 x [4 x [2 x i32]]], [2 x [2 x i32]], [2 x [2 x [2 x i32]]], i8*, [2 x [64 x i16]], %struct.MotionEstContext, i32, i32, i32, i32, i32, i32, i16*, [6 x i32], [6 x i32], [3 x i8*], i32*, [64 x i16], [64 x i16], [64 x i16], [64 x i16], i32, i32, i32, i32, i32, i8*, i8*, i8*, i8*, i8*, i8*, [8 x i32], [64 x i32]*, [64 x i32]*, [2 x [64 x i16]]*, [2 x [64 x i16]]*, [12 x i32], %struct.ScanTable, %struct.ScanTable, %struct.ScanTable, %struct.ScanTable, [64 x i32]*, [2 x i32], [64 x i16]*, i8*, i64, i64, i32, i32, %struct.RateControlContext, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i8*, i32, i32, %struct.GetBitContext, i32, i32, i32, %struct.ParseContext, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i64, i64, i16, i16, i16, i16, i32, i32, i32, i32, i32, i32, i32, i32, i32, [2 x [2 x i32]], [2 x [2 x i32]], [2 x i32], i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, %struct.PutBitContext, %struct.PutBitContext, i32, i32, i32, i32, i32, i32, i8*, i32, i32, i32, i32, i32, [3 x i32], %struct.MJpegContext*, [3 x i32], [3 x i32], i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, [2 x [65 x [65 x [2 x i32]]]]*, i32, i32, %struct.GetBitContext, i32, i32, i32, i8*, i32, [2 x [2 x i32]], i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, [2 x i32], i32, i32, i32, i32, i8*, i32, [12 x i16*], [64 x i16]*, [8 x [64 x i16]]*, i32 (%struct.MpegEncContext*, [64 x i16]*)*, void (%struct.MpegEncContext*, i16*, i32, i32)*, void (%struct.MpegEncContext*, i16*, i32, i32)*, void (%struct.MpegEncContext*, i16*, i32, i32)*, void (%struct.MpegEncContext*, i16*, i32, i32)*, void (%struct.MpegEncContext*, i16*, i32, i32)*, void (%struct.MpegEncContext*, i16*, i32, i32)*, void (%struct.MpegEncContext*, i16*, i32, i32)*, void (%struct.MpegEncContext*, i16*, i32, i32)*, void (%struct.MpegEncContext*, i16*, i32, i32)*, void (%struct.MpegEncContext*, i16*, i32, i32)*, i32 (%struct.MpegEncContext*, i16*, i32, i32, i32*)*, i32 (%struct.MpegEncContext*, i16*, i32, i32, i32*)*, void (%struct.MpegEncContext*, i16*)* } - %struct.ParseContext = type { i8*, i32, i32, i32, i32, i32, i32, i32 } - %struct.Picture = type { [4 x i8*], [4 x i32], [4 x i8*], i32, i32, i64, i32, i32, i32, i32, i32, i8*, i32, i8*, [2 x [2 x i16]*], i32*, i8, i8*, [4 x i64], i32, i32, i32, i32, i32, %struct.AVPanScan*, i32, i32, i16*, [2 x i8*], [3 x i8*], [2 x [2 x i16]*], i32*, [2 x i32], i32, i32, i32, i32, [2 x [16 x i32]], [2 x i32], i32, i32, i16*, i16*, i8*, i32*, i32 } - %struct.Plane = type { i32, i32, [8 x [4 x %struct.SubBand]] } - %struct.Predictor = type { double, double, double } - %struct.PutBitContext = type { i32, i32, i8*, i8*, i8* } - %struct.RangeCoder = type { i32, i32, i32, i32, [256 x i8], [256 x i8], i8*, i8*, i8* } - %struct.RateControlContext = type { %struct.FILE*, i32, %struct.RateControlEntry*, double, [5 x %struct.Predictor], double, double, double, double, double, [5 x double], i32, i32, [5 x i64], [5 x i64], [5 x i64], [5 x i64], [5 x i32], i32, i8*, float, i32, %struct.AVEvalExpr* } - %struct.RateControlEntry = type { i32, float, i32, i32, i32, i32, i32, i64, i32, float, i32, i32, i32, i32, i32, i32 } - %struct.RcOverride = type { i32, i32, i32, float } - %struct.ScanTable = type { i8*, [64 x i8], [64 x i8] } - %struct.SnowContext = type { %struct.AVCodecContext*, %struct.RangeCoder, %struct.DSPContext, %struct.AVFrame, %struct.AVFrame, %struct.AVFrame, [8 x %struct.AVFrame], %struct.AVFrame, [32 x i8], [4224 x i8], i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, [8 x [2 x i16]*], [8 x i32*], i32*, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, [4 x %struct.Plane], %struct.BlockNode*, [1024 x i32], i32, %struct.slice_buffer, %struct.MpegEncContext } - %struct.SubBand = type { i32, i32, i32, i32, i32, i32*, i32, i32, i32, %struct.x_and_coeff*, %struct.SubBand*, [519 x [32 x i8]] } - %struct._IO_marker = type { %struct._IO_marker*, %struct.FILE*, i32 } - %struct.slice_buffer = type { i32**, i32**, i32, i32, i32, i32, i32* } - %struct.x_and_coeff = type { i16, i16 } - -define fastcc void @iterative_me(%struct.SnowContext* %s) { -entry: - %state = alloca [4224 x i8], align 8 ; <[4224 x i8]*> [#uses=0] - %best_rd4233 = alloca i32, align 4 ; [#uses=0] - %tmp21 = getelementptr %struct.SnowContext* %s, i32 0, i32 36 ; [#uses=2] - br label %bb4198 - -bb79: ; preds = %bb4189.preheader - br i1 false, label %cond_next239, label %cond_true - -cond_true: ; preds = %bb79 - ret void - -cond_next239: ; preds = %bb79 - %tmp286 = alloca i8, i32 0 ; [#uses=0] - ret void - -bb4198: ; preds = %bb4189.preheader, %entry - br i1 false, label %bb4189.preheader, label %bb4204 - -bb4189.preheader: ; preds = %bb4198 - br i1 false, label %bb79, label %bb4198 - -bb4204: ; preds = %bb4198 - br i1 false, label %bb4221, label %cond_next4213 - -cond_next4213: ; preds = %bb4204 - ret void - -bb4221: ; preds = %bb4204 - br i1 false, label %bb5242.preheader, label %UnifiedReturnBlock - -bb5242.preheader: ; preds = %bb4221 - br label %bb5242 - -bb4231: ; preds = %bb5233 - %tmp4254.sum = add i32 0, 1 ; [#uses=2] - br i1 false, label %bb4559, label %cond_next4622 - -bb4559: ; preds = %bb4231 - ret void - -cond_next4622: ; preds = %bb4231 - %tmp4637 = load i16* null ; [#uses=1] - %tmp46374638 = sext i16 %tmp4637 to i32 ; [#uses=1] - %tmp4642 = load i16* null ; [#uses=1] - %tmp46424643 = sext i16 %tmp4642 to i32 ; [#uses=1] - %tmp4648 = load i16* null ; [#uses=1] - %tmp46484649 = sext i16 %tmp4648 to i32 ; [#uses=1] - %tmp4653 = getelementptr %struct.BlockNode* null, i32 %tmp4254.sum, i32 0 ; [#uses=1] - %tmp4654 = load i16* %tmp4653 ; [#uses=1] - %tmp46544655 = sext i16 %tmp4654 to i32 ; [#uses=1] - %tmp4644 = add i32 %tmp46374638, 2 ; [#uses=1] - %tmp4650 = add i32 %tmp4644, %tmp46424643 ; [#uses=1] - %tmp4656 = add i32 %tmp4650, %tmp46484649 ; [#uses=1] - %tmp4657 = add i32 %tmp4656, %tmp46544655 ; [#uses=2] - %tmp4658 = ashr i32 %tmp4657, 2 ; [#uses=1] - %tmp4662 = load i16* null ; [#uses=1] - %tmp46624663 = sext i16 %tmp4662 to i32 ; [#uses=1] - %tmp4672 = getelementptr %struct.BlockNode* null, i32 0, i32 1 ; [#uses=1] - %tmp4673 = load i16* %tmp4672 ; [#uses=1] - %tmp46734674 = sext i16 %tmp4673 to i32 ; [#uses=1] - %tmp4678 = getelementptr %struct.BlockNode* null, i32 %tmp4254.sum, i32 1 ; [#uses=1] - %tmp4679 = load i16* %tmp4678 ; [#uses=1] - %tmp46794680 = sext i16 %tmp4679 to i32 ; [#uses=1] - %tmp4669 = add i32 %tmp46624663, 2 ; [#uses=1] - %tmp4675 = add i32 %tmp4669, 0 ; [#uses=1] - %tmp4681 = add i32 %tmp4675, %tmp46734674 ; [#uses=1] - %tmp4682 = add i32 %tmp4681, %tmp46794680 ; [#uses=2] - %tmp4683 = ashr i32 %tmp4682, 2 ; [#uses=1] - %tmp4703 = load i32* %tmp21 ; [#uses=1] - %tmp4707 = shl i32 %tmp4703, 0 ; [#uses=4] - %tmp4710 = load %struct.BlockNode** null ; <%struct.BlockNode*> [#uses=6] - %tmp4713 = mul i32 %tmp4707, %mb_y.4 ; [#uses=1] - %tmp4715 = add i32 %tmp4713, %mb_x.7 ; [#uses=7] - store i8 0, i8* null - store i8 0, i8* null - %tmp47594761 = bitcast %struct.BlockNode* null to i8* ; [#uses=2] - call void @llvm.memcpy.i32( i8* null, i8* %tmp47594761, i32 10, i32 0 ) - %tmp4716.sum5775 = add i32 %tmp4715, 1 ; [#uses=1] - %tmp4764 = getelementptr %struct.BlockNode* %tmp4710, i32 %tmp4716.sum5775 ; <%struct.BlockNode*> [#uses=1] - %tmp47644766 = bitcast %struct.BlockNode* %tmp4764 to i8* ; [#uses=1] - %tmp4716.sum5774 = add i32 %tmp4715, %tmp4707 ; [#uses=0] - %tmp47704772 = bitcast %struct.BlockNode* null to i8* ; [#uses=1] - %tmp4774 = add i32 %tmp4707, 1 ; [#uses=1] - %tmp4716.sum5773 = add i32 %tmp4774, %tmp4715 ; [#uses=1] - %tmp4777 = getelementptr %struct.BlockNode* %tmp4710, i32 %tmp4716.sum5773 ; <%struct.BlockNode*> [#uses=1] - %tmp47774779 = bitcast %struct.BlockNode* %tmp4777 to i8* ; [#uses=1] - %tmp4781 = icmp slt i32 %mb_x.7, 0 ; [#uses=1] - %tmp4788 = or i1 %tmp4781, %tmp4784 ; [#uses=2] - br i1 %tmp4788, label %cond_true4791, label %cond_next4794 - -cond_true4791: ; preds = %cond_next4622 - unreachable - -cond_next4794: ; preds = %cond_next4622 - %tmp4797 = icmp slt i32 %mb_x.7, %tmp4707 ; [#uses=1] - br i1 %tmp4797, label %cond_next4803, label %cond_true4800 - -cond_true4800: ; preds = %cond_next4794 - unreachable - -cond_next4803: ; preds = %cond_next4794 - %tmp4825 = ashr i32 %tmp4657, 12 ; [#uses=1] - shl i32 %tmp4682, 4 ; :0 [#uses=1] - %tmp4828 = and i32 %0, -64 ; [#uses=1] - %tmp4831 = getelementptr %struct.BlockNode* %tmp4710, i32 %tmp4715, i32 2 ; [#uses=0] - %tmp4826 = add i32 %tmp4828, %tmp4825 ; [#uses=1] - %tmp4829 = add i32 %tmp4826, 0 ; [#uses=1] - %tmp4835 = add i32 %tmp4829, 0 ; [#uses=1] - store i32 %tmp4835, i32* null - %tmp48534854 = trunc i32 %tmp4658 to i16 ; [#uses=1] - %tmp4856 = getelementptr %struct.BlockNode* %tmp4710, i32 %tmp4715, i32 0 ; [#uses=1] - store i16 %tmp48534854, i16* %tmp4856 - %tmp48574858 = trunc i32 %tmp4683 to i16 ; [#uses=1] - %tmp4860 = getelementptr %struct.BlockNode* %tmp4710, i32 %tmp4715, i32 1 ; [#uses=1] - store i16 %tmp48574858, i16* %tmp4860 - %tmp4866 = getelementptr %struct.BlockNode* %tmp4710, i32 %tmp4715, i32 4 ; [#uses=0] - br i1 false, label %bb4933, label %cond_false4906 - -cond_false4906: ; preds = %cond_next4803 - call void @llvm.memcpy.i32( i8* %tmp47594761, i8* null, i32 10, i32 0 ) - call void @llvm.memcpy.i32( i8* %tmp47644766, i8* null, i32 10, i32 0 ) - call void @llvm.memcpy.i32( i8* %tmp47704772, i8* null, i32 10, i32 0 ) - call void @llvm.memcpy.i32( i8* %tmp47774779, i8* null, i32 10, i32 0 ) - br label %bb5215 - -bb4933: ; preds = %bb5215, %cond_next4803 - br i1 false, label %cond_true4944, label %bb5215 - -cond_true4944: ; preds = %bb4933 - %tmp4982 = load i32* %tmp21 ; [#uses=1] - %tmp4986 = shl i32 %tmp4982, 0 ; [#uses=2] - %tmp4992 = mul i32 %tmp4986, %mb_y.4 ; [#uses=1] - %tmp4994 = add i32 %tmp4992, %mb_x.7 ; [#uses=5] - %tmp4995.sum5765 = add i32 %tmp4994, 1 ; [#uses=1] - %tmp5043 = getelementptr %struct.BlockNode* null, i32 %tmp4995.sum5765 ; <%struct.BlockNode*> [#uses=1] - %tmp50435045 = bitcast %struct.BlockNode* %tmp5043 to i8* ; [#uses=2] - call void @llvm.memcpy.i32( i8* null, i8* %tmp50435045, i32 10, i32 0 ) - %tmp4995.sum5764 = add i32 %tmp4994, %tmp4986 ; [#uses=1] - %tmp5049 = getelementptr %struct.BlockNode* null, i32 %tmp4995.sum5764 ; <%struct.BlockNode*> [#uses=1] - %tmp50495051 = bitcast %struct.BlockNode* %tmp5049 to i8* ; [#uses=2] - call void @llvm.memcpy.i32( i8* null, i8* %tmp50495051, i32 10, i32 0 ) - %tmp4995.sum5763 = add i32 0, %tmp4994 ; [#uses=1] - %tmp5056 = getelementptr %struct.BlockNode* null, i32 %tmp4995.sum5763 ; <%struct.BlockNode*> [#uses=1] - %tmp50565058 = bitcast %struct.BlockNode* %tmp5056 to i8* ; [#uses=1] - br i1 %tmp4788, label %cond_true5070, label %cond_next5073 - -cond_true5070: ; preds = %cond_true4944 - unreachable - -cond_next5073: ; preds = %cond_true4944 - %tmp5139 = getelementptr %struct.BlockNode* null, i32 %tmp4994, i32 1 ; [#uses=0] - %tmp5145 = getelementptr %struct.BlockNode* null, i32 %tmp4994, i32 4 ; [#uses=0] - call void @llvm.memcpy.i32( i8* %tmp50435045, i8* null, i32 10, i32 0 ) - call void @llvm.memcpy.i32( i8* %tmp50495051, i8* null, i32 10, i32 0 ) - call void @llvm.memcpy.i32( i8* %tmp50565058, i8* null, i32 10, i32 0 ) - br label %bb5215 - -bb5215: ; preds = %cond_next5073, %bb4933, %cond_false4906 - %i4232.3 = phi i32 [ 0, %cond_false4906 ], [ 0, %cond_next5073 ], [ 0, %bb4933 ] ; [#uses=1] - %tmp5217 = icmp slt i32 %i4232.3, 4 ; [#uses=1] - br i1 %tmp5217, label %bb4933, label %bb5220 - -bb5220: ; preds = %bb5215 - br i1 false, label %bb5230, label %cond_true5226 - -cond_true5226: ; preds = %bb5220 - ret void - -bb5230: ; preds = %bb5220 - %indvar.next = add i32 %indvar, 1 ; [#uses=1] - br label %bb5233 - -bb5233: ; preds = %bb5233.preheader, %bb5230 - %indvar = phi i32 [ 0, %bb5233.preheader ], [ %indvar.next, %bb5230 ] ; [#uses=2] - %mb_x.7 = shl i32 %indvar, 1 ; [#uses=4] - br i1 false, label %bb4231, label %bb5239 - -bb5239: ; preds = %bb5233 - %indvar.next37882 = add i32 %indvar37881, 1 ; [#uses=1] - br label %bb5242 - -bb5242: ; preds = %bb5239, %bb5242.preheader - %indvar37881 = phi i32 [ 0, %bb5242.preheader ], [ %indvar.next37882, %bb5239 ] ; [#uses=2] - %mb_y.4 = shl i32 %indvar37881, 1 ; [#uses=3] - br i1 false, label %bb5233.preheader, label %bb5248 - -bb5233.preheader: ; preds = %bb5242 - %tmp4784 = icmp slt i32 %mb_y.4, 0 ; [#uses=1] - br label %bb5233 - -bb5248: ; preds = %bb5242 - ret void - -UnifiedReturnBlock: ; preds = %bb4221 - ret void -} - -declare void @llvm.memcpy.i32(i8*, i8*, i32, i32) diff --git a/test/CodeGen/ARM/2009-03-07-SpillerBug.ll b/test/CodeGen/ARM/2009-03-07-SpillerBug.ll index 0ec17ae..377bbd2 100644 --- a/test/CodeGen/ARM/2009-03-07-SpillerBug.ll +++ b/test/CodeGen/ARM/2009-03-07-SpillerBug.ll @@ -1,16 +1,15 @@ ; RUN: llc < %s -mtriple=armv6-apple-darwin9 -mattr=+vfp2 ; rdar://6653182 - %struct.ggBRDF = type { i32 (...)** } - %struct.ggPoint2 = type { [2 x double] } - %struct.ggPoint3 = type { [3 x double] } - %struct.ggSpectrum = type { [8 x float] } - %struct.ggSphere = type { %struct.ggPoint3, double } - %struct.mrDiffuseAreaSphereLuminaire = type { %struct.mrSphere, %struct.ggSpectrum } - %struct.mrDiffuseCosineSphereLuminaire = type { %struct.mrDiffuseAreaSphereLuminaire } - %struct.mrSphere = type { %struct.ggBRDF, %struct.ggSphere } -declare void @llvm.memcpy.i32(i8* nocapture, i8* nocapture, i32, i32) nounwind +%struct.ggBRDF = type { i32 (...)** } +%struct.ggPoint2 = type { [2 x double] } +%struct.ggPoint3 = type { [3 x double] } +%struct.ggSpectrum = type { [8 x float] } +%struct.ggSphere = type { %struct.ggPoint3, double } +%struct.mrDiffuseAreaSphereLuminaire = type { %struct.mrSphere, %struct.ggSpectrum } +%struct.mrDiffuseCosineSphereLuminaire = type { %struct.mrDiffuseAreaSphereLuminaire } +%struct.mrSphere = type { %struct.ggBRDF, %struct.ggSphere } declare double @llvm.sqrt.f64(double) nounwind readonly @@ -20,59 +19,61 @@ declare double @acos(double) nounwind readonly define i32 @_ZNK34mrDiffuseSolidAngleSphereLuminaire18selectVisiblePointERK8ggPoint3RK9ggVector3RK8ggPoint2dRS0_Rd(%struct.mrDiffuseCosineSphereLuminaire* nocapture %this, %struct.ggPoint3* nocapture %x, %struct.ggPoint3* nocapture %unnamed_arg, %struct.ggPoint2* nocapture %uv, double %unnamed_arg2, %struct.ggPoint3* nocapture %on_light, double* nocapture %invProb) nounwind { entry: - %0 = call double @llvm.sqrt.f64(double 0.000000e+00) nounwind ; [#uses=4] - %1 = fcmp ult double 0.000000e+00, %0 ; [#uses=1] - br i1 %1, label %bb3, label %bb7 + %0 = call double @llvm.sqrt.f64(double 0.000000e+00) nounwind + %1 = fcmp ult double 0.000000e+00, %0 + br i1 %1, label %bb3, label %bb7 -bb3: ; preds = %entry - %2 = fdiv double 1.000000e+00, 0.000000e+00 ; [#uses=1] - %3 = fmul double 0.000000e+00, %2 ; [#uses=2] - %4 = call double @llvm.sqrt.f64(double 0.000000e+00) nounwind ; [#uses=1] - %5 = fdiv double 1.000000e+00, %4 ; [#uses=2] - %6 = fmul double %3, %5 ; [#uses=2] - %7 = fmul double 0.000000e+00, %5 ; [#uses=2] - %8 = fmul double %3, %7 ; [#uses=1] - %9 = fsub double %8, 0.000000e+00 ; [#uses=1] - %10 = fmul double 0.000000e+00, %6 ; [#uses=1] - %11 = fsub double 0.000000e+00, %10 ; [#uses=1] - %12 = fsub double -0.000000e+00, %11 ; [#uses=1] - %13 = fmul double %0, %0 ; [#uses=2] - %14 = fsub double %13, 0.000000e+00 ; [#uses=1] - %15 = call double @llvm.sqrt.f64(double %14) ; [#uses=1] - %16 = fmul double 0.000000e+00, %15 ; [#uses=1] - %17 = fdiv double %16, %0 ; [#uses=1] - %18 = fadd double 0.000000e+00, %17 ; [#uses=1] - %19 = call double @acos(double %18) nounwind readonly ; [#uses=1] - %20 = load double* null, align 4 ; [#uses=1] - %21 = fmul double %20, 0x401921FB54442D18 ; [#uses=1] - %22 = call double @sin(double %19) nounwind readonly ; [#uses=2] - %23 = fmul double %22, 0.000000e+00 ; [#uses=2] - %24 = fmul double %6, %23 ; [#uses=1] - %25 = fmul double %7, %23 ; [#uses=1] - %26 = call double @sin(double %21) nounwind readonly ; [#uses=1] - %27 = fmul double %22, %26 ; [#uses=2] - %28 = fmul double %9, %27 ; [#uses=1] - %29 = fmul double %27, %12 ; [#uses=1] - %30 = fadd double %24, %28 ; [#uses=1] - %31 = fadd double 0.000000e+00, %29 ; [#uses=1] - %32 = fadd double %25, 0.000000e+00 ; [#uses=1] - %33 = fadd double %30, 0.000000e+00 ; [#uses=1] - %34 = fadd double %31, 0.000000e+00 ; [#uses=1] - %35 = fadd double %32, 0.000000e+00 ; [#uses=1] - %36 = bitcast %struct.ggPoint3* %x to i8* ; [#uses=1] - call void @llvm.memcpy.i32(i8* null, i8* %36, i32 24, i32 4) nounwind - store double %33, double* null, align 8 - br i1 false, label %_Z20ggRaySphereIntersectRK6ggRay3RK8ggSphereddRd.exit, label %bb5.i.i.i +bb3: ; preds = %entry + %2 = fdiv double 1.000000e+00, 0.000000e+00 + %3 = fmul double 0.000000e+00, %2 + %4 = call double @llvm.sqrt.f64(double 0.000000e+00) nounwind + %5 = fdiv double 1.000000e+00, %4 + %6 = fmul double %3, %5 + %7 = fmul double 0.000000e+00, %5 + %8 = fmul double %3, %7 + %9 = fsub double %8, 0.000000e+00 + %10 = fmul double 0.000000e+00, %6 + %11 = fsub double 0.000000e+00, %10 + %12 = fsub double -0.000000e+00, %11 + %13 = fmul double %0, %0 + %14 = fsub double %13, 0.000000e+00 + %15 = call double @llvm.sqrt.f64(double %14) + %16 = fmul double 0.000000e+00, %15 + %17 = fdiv double %16, %0 + %18 = fadd double 0.000000e+00, %17 + %19 = call double @acos(double %18) nounwind readonly + %20 = load double* null, align 4 + %21 = fmul double %20, 0x401921FB54442D18 + %22 = call double @sin(double %19) nounwind readonly + %23 = fmul double %22, 0.000000e+00 + %24 = fmul double %6, %23 + %25 = fmul double %7, %23 + %26 = call double @sin(double %21) nounwind readonly + %27 = fmul double %22, %26 + %28 = fmul double %9, %27 + %29 = fmul double %27, %12 + %30 = fadd double %24, %28 + %31 = fadd double 0.000000e+00, %29 + %32 = fadd double %25, 0.000000e+00 + %33 = fadd double %30, 0.000000e+00 + %34 = fadd double %31, 0.000000e+00 + %35 = fadd double %32, 0.000000e+00 + %36 = bitcast %struct.ggPoint3* %x to i8* + call void @llvm.memcpy.p0i8.p0i8.i32(i8* null, i8* %36, i32 24, i32 4, i1 false) + store double %33, double* null, align 8 + br i1 false, label %_Z20ggRaySphereIntersectRK6ggRay3RK8ggSphereddRd.exit, label %bb5.i.i.i -bb5.i.i.i: ; preds = %bb3 - unreachable +bb5.i.i.i: ; preds = %bb3 + unreachable -_Z20ggRaySphereIntersectRK6ggRay3RK8ggSphereddRd.exit: ; preds = %bb3 - %37 = fsub double %13, 0.000000e+00 ; [#uses=0] - %38 = fsub double -0.000000e+00, %34 ; [#uses=0] - %39 = fsub double -0.000000e+00, %35 ; [#uses=0] - ret i32 1 +_Z20ggRaySphereIntersectRK6ggRay3RK8ggSphereddRd.exit: ; preds = %bb3 + %37 = fsub double %13, 0.000000e+00 + %38 = fsub double -0.000000e+00, %34 + %39 = fsub double -0.000000e+00, %35 + ret i32 1 -bb7: ; preds = %entry - ret i32 0 +bb7: ; preds = %entry + ret i32 0 } + +declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32, i1) nounwind diff --git a/test/CodeGen/ARM/2009-06-12-RegScavengerAssert.ll b/test/CodeGen/ARM/2009-06-12-RegScavengerAssert.ll deleted file mode 100644 index 27888d7..0000000 --- a/test/CodeGen/ARM/2009-06-12-RegScavengerAssert.ll +++ /dev/null @@ -1,77 +0,0 @@ -; RUN: llc < %s -mtriple=armv6-apple-darwin - - type { i32, i32, %struct.D_Sym**, [3 x %struct.D_Sym*] } ; type %0 - type { i32, %struct.D_Reduction** } ; type %1 - type { i32, %struct.D_RightEpsilonHint* } ; type %2 - type { i32, %struct.D_ErrorRecoveryHint* } ; type %3 - type { i32, i32, %struct.D_Reduction**, [3 x %struct.D_Reduction*] } ; type %4 - %struct.D_ErrorRecoveryHint = type { i16, i16, i8* } - %struct.D_ParseNode = type { i32, %struct.d_loc_t, i8*, i8*, %struct.D_Scope*, void (%struct.D_Parser*, %struct.d_loc_t*, i8**)*, i8*, i8* } - %struct.D_Parser = type { i8*, void (%struct.D_Parser*, %struct.d_loc_t*, i8**)*, %struct.D_Scope*, void (%struct.D_Parser*)*, %struct.D_ParseNode* (%struct.D_Parser*, i32, %struct.D_ParseNode**)*, void (%struct.D_ParseNode*)*, %struct.d_loc_t, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 } - %struct.D_ParserTables = type { i32, %struct.D_State*, i16*, i32, i32, %struct.D_Symbol*, void (%struct.D_Parser*, %struct.d_loc_t*, i8**)*, i32, %struct.D_Pass*, i32 } - %struct.D_Pass = type { i8*, i32, i32, i32 } - %struct.D_Reduction = type { i16, i16, i32 (i8*, i8**, i32, i32, %struct.D_Parser*)*, i32 (i8*, i8**, i32, i32, %struct.D_Parser*)*, i16, i16, i32, i32, i32, i32, i32 (i8*, i8**, i32, i32, %struct.D_Parser*)** } - %struct.D_RightEpsilonHint = type { i16, i16, %struct.D_Reduction* } - %struct.D_Scope = type { i8, %struct.D_Sym*, %struct.D_SymHash*, %struct.D_Sym*, %struct.D_Scope*, %struct.D_Scope*, %struct.D_Scope*, %struct.D_Scope*, %struct.D_Scope* } - %struct.D_Shift = type { i16, i8, i8, i32, i32, i32 (i8*, i8**, i32, i32, %struct.D_Parser*)* } - %struct.D_State = type { i8*, i32, %1, %2, %3, %struct.D_Shift**, i32 (i8**, i32*, i32*, i16*, i32*, i8*, i32*)*, i8*, i8, i8, i8, i8*, %struct.D_Shift***, i32 } - %struct.D_Sym = type { i8*, i32, i32, %struct.D_Sym*, %struct.D_Sym*, i32 } - %struct.D_SymHash = type { i32, i32, %0 } - %struct.D_Symbol = type { i32, i8*, i32 } - %struct.PNode = type { i32, i32, i32, i32, %struct.D_Reduction*, %struct.D_Shift*, i32, %struct.VecPNode, i32, i8, i8, %struct.PNode*, %struct.PNode*, %struct.PNode*, %struct.PNode*, i8*, i8*, %struct.D_Scope*, i8*, %struct.D_ParseNode } - %struct.PNodeHash = type { %struct.PNode**, i32, i32, i32, %struct.PNode* } - %struct.Parser = type { %struct.D_Parser, i8*, i8*, %struct.D_ParserTables*, i32, i32, i32, i32, i32, i32, i32, %struct.PNodeHash, %struct.SNodeHash, %struct.Reduction*, %struct.Shift*, %struct.D_Scope*, %struct.SNode*, i32, %struct.Reduction*, %struct.Shift*, i32, %struct.PNode*, %struct.SNode*, %struct.ZNode*, %4, %struct.ShiftResult*, %struct.D_Shift, %struct.Parser*, i8* } - %struct.Reduction = type { %struct.ZNode*, %struct.SNode*, %struct.D_Reduction*, %struct.SNode*, i32, %struct.Reduction* } - %struct.SNode = type { %struct.D_State*, %struct.D_Scope*, i8*, %struct.d_loc_t, i32, %struct.PNode*, %struct.VecZNode, i32, %struct.SNode*, %struct.SNode* } - %struct.SNodeHash = type { %struct.SNode**, i32, i32, i32, %struct.SNode*, %struct.SNode* } - %struct.Shift = type { %struct.SNode*, %struct.Shift* } - %struct.ShiftResult = type { %struct.D_Shift*, %struct.d_loc_t } - %struct.VecPNode = type { i32, i32, %struct.PNode**, [3 x %struct.PNode*] } - %struct.VecSNode = type { i32, i32, %struct.SNode**, [3 x %struct.SNode*] } - %struct.VecZNode = type { i32, i32, %struct.ZNode**, [3 x %struct.ZNode*] } - %struct.ZNode = type { %struct.PNode*, %struct.VecSNode } - %struct.d_loc_t = type { i8*, i8*, i32, i32, i32 } - -declare void @llvm.memcpy.i32(i8* nocapture, i8* nocapture, i32, i32) nounwind - -define fastcc i32 @exhaustive_parse(%struct.Parser* %p, i32 %state) nounwind { -entry: - store i8* undef, i8** undef, align 4 - %0 = getelementptr %struct.Parser* %p, i32 0, i32 0, i32 6 ; <%struct.d_loc_t*> [#uses=1] - %1 = bitcast %struct.d_loc_t* %0 to i8* ; [#uses=1] - call void @llvm.memcpy.i32(i8* undef, i8* %1, i32 20, i32 4) - br label %bb10 - -bb10: ; preds = %bb30, %bb29, %bb26, %entry - br i1 undef, label %bb18, label %bb20 - -bb18: ; preds = %bb10 - br i1 undef, label %bb20, label %bb19 - -bb19: ; preds = %bb18 - br label %bb20 - -bb20: ; preds = %bb19, %bb18, %bb10 - br i1 undef, label %bb21, label %bb22 - -bb21: ; preds = %bb20 - unreachable - -bb22: ; preds = %bb20 - br i1 undef, label %bb24, label %bb26 - -bb24: ; preds = %bb22 - unreachable - -bb26: ; preds = %bb22 - br i1 undef, label %bb10, label %bb29 - -bb29: ; preds = %bb26 - br i1 undef, label %bb10, label %bb30 - -bb30: ; preds = %bb29 - br i1 undef, label %bb31, label %bb10 - -bb31: ; preds = %bb30 - unreachable -} diff --git a/test/CodeGen/ARM/2009-08-31-LSDA-Name.ll b/test/CodeGen/ARM/2009-08-31-LSDA-Name.ll index 397eba4..8bde748 100644 --- a/test/CodeGen/ARM/2009-08-31-LSDA-Name.ll +++ b/test/CodeGen/ARM/2009-08-31-LSDA-Name.ll @@ -1,32 +1,35 @@ ; RUN: llc < %s -mtriple=arm-apple-darwin9 -march=arm | FileCheck %s +; CHECK: L_LSDA_0: + + %struct.A = type { i32* } define void @"\01-[MyFunction Name:]"() { entry: - %save_filt.1 = alloca i32 ; [#uses=2] - %save_eptr.0 = alloca i8* ; [#uses=2] - %a = alloca %struct.A ; <%struct.A*> [#uses=3] - %eh_exception = alloca i8* ; [#uses=5] - %eh_selector = alloca i32 ; [#uses=3] - %"alloca point" = bitcast i32 0 to i32 ; [#uses=0] - call void @_ZN1AC1Ev(%struct.A* %a) - invoke void @_Z3barv() + %save_filt.1 = alloca i32 + %save_eptr.0 = alloca i8* + %a = alloca %struct.A + %eh_exception = alloca i8* + %eh_selector = alloca i32 + %"alloca point" = bitcast i32 0 to i32 + call void @_ZN1AC1Ev(%struct.A* %a) + invoke void @_Z3barv() to label %invcont unwind label %lpad invcont: ; preds = %entry - call void @_ZN1AD1Ev(%struct.A* %a) nounwind + call void @_ZN1AD1Ev(%struct.A* %a) nounwind br label %return bb: ; preds = %ppad - %eh_select = load i32* %eh_selector ; [#uses=1] + %eh_select = load i32* %eh_selector store i32 %eh_select, i32* %save_filt.1, align 4 - %eh_value = load i8** %eh_exception ; [#uses=1] + %eh_value = load i8** %eh_exception store i8* %eh_value, i8** %save_eptr.0, align 4 - call void @_ZN1AD1Ev(%struct.A* %a) nounwind - %0 = load i8** %save_eptr.0, align 4 ; [#uses=1] + call void @_ZN1AD1Ev(%struct.A* %a) nounwind + %0 = load i8** %save_eptr.0, align 4 store i8* %0, i8** %eh_exception, align 4 - %1 = load i32* %save_filt.1, align 4 ; [#uses=1] + %1 = load i32* %save_filt.1, align 4 store i32 %1, i32* %eh_selector, align 4 br label %Unwind @@ -34,10 +37,10 @@ return: ; preds = %invcont ret void lpad: ; preds = %entry - %eh_ptr = call i8* @llvm.eh.exception() ; [#uses=1] + %eh_ptr = call i8* @llvm.eh.exception() store i8* %eh_ptr, i8** %eh_exception - %eh_ptr1 = load i8** %eh_exception ; [#uses=1] - %eh_select2 = call i32 (i8*, i8*, ...)* @llvm.eh.selector.i32(i8* %eh_ptr1, i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*), i32 0) ; [#uses=1] + %eh_ptr1 = load i8** %eh_exception + %eh_select2 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr1, i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*), i32 0) store i32 %eh_select2, i32* %eh_selector br label %ppad @@ -45,20 +48,20 @@ ppad: ; preds = %lpad br label %bb Unwind: ; preds = %bb - %eh_ptr3 = load i8** %eh_exception ; [#uses=1] - call void @_Unwind_SjLj_Resume(i8* %eh_ptr3) + %eh_ptr3 = load i8** %eh_exception + call void @_Unwind_SjLj_Resume(i8* %eh_ptr3) unreachable } define linkonce_odr void @_ZN1AC1Ev(%struct.A* %this) { entry: - %this_addr = alloca %struct.A* ; <%struct.A**> [#uses=2] - %"alloca point" = bitcast i32 0 to i32 ; [#uses=0] + %this_addr = alloca %struct.A* + %"alloca point" = bitcast i32 0 to i32 store %struct.A* %this, %struct.A** %this_addr - %0 = call i8* @_Znwm(i32 4) ; [#uses=1] - %1 = bitcast i8* %0 to i32* ; [#uses=1] - %2 = load %struct.A** %this_addr, align 4 ; <%struct.A*> [#uses=1] - %3 = getelementptr inbounds %struct.A* %2, i32 0, i32 0 ; [#uses=1] + %0 = call i8* @_Znwm(i32 4) + %1 = bitcast i8* %0 to i32* + %2 = load %struct.A** %this_addr, align 4 + %3 = getelementptr inbounds %struct.A* %2, i32 0, i32 0 store i32* %1, i32** %3, align 4 br label %return @@ -70,14 +73,14 @@ declare i8* @_Znwm(i32) define linkonce_odr void @_ZN1AD1Ev(%struct.A* %this) nounwind { entry: - %this_addr = alloca %struct.A* ; <%struct.A**> [#uses=2] - %"alloca point" = bitcast i32 0 to i32 ; [#uses=0] + %this_addr = alloca %struct.A* + %"alloca point" = bitcast i32 0 to i32 store %struct.A* %this, %struct.A** %this_addr - %0 = load %struct.A** %this_addr, align 4 ; <%struct.A*> [#uses=1] - %1 = getelementptr inbounds %struct.A* %0, i32 0, i32 0 ; [#uses=1] - %2 = load i32** %1, align 4 ; [#uses=1] - %3 = bitcast i32* %2 to i8* ; [#uses=1] - call void @_ZdlPv(i8* %3) nounwind + %0 = load %struct.A** %this_addr, align 4 + %1 = getelementptr inbounds %struct.A* %0, i32 0, i32 0 + %2 = load i32** %1, align 4 + %3 = bitcast i32* %2 to i8* + call void @_ZdlPv(i8* %3) nounwind br label %bb bb: ; preds = %entry @@ -86,17 +89,16 @@ bb: ; preds = %entry return: ; preds = %bb ret void } -;CHECK: L_LSDA_0: declare void @_ZdlPv(i8*) nounwind declare void @_Z3barv() -declare i8* @llvm.eh.exception() nounwind +declare i8* @llvm.eh.exception() nounwind readonly -declare i32 @llvm.eh.selector.i32(i8*, i8*, ...) nounwind +declare i32 @llvm.eh.selector(i8*, i8*, ...) nounwind -declare i32 @llvm.eh.typeid.for.i32(i8*) nounwind +declare i32 @llvm.eh.typeid.for(i8*) nounwind declare i32 @__gxx_personality_sj0(...) diff --git a/test/CodeGen/ARM/dyn-stackalloc.ll b/test/CodeGen/ARM/dyn-stackalloc.ll index 92e2d13..de2820e 100644 --- a/test/CodeGen/ARM/dyn-stackalloc.ll +++ b/test/CodeGen/ARM/dyn-stackalloc.ll @@ -1,48 +1,48 @@ ; RUN: llc < %s -march=arm - %struct.state = type { i32, %struct.info*, float**, i32, i32, i32, i32, i32, i32, i32, i32, i32, i64, i64, i64, i64, i64, i64, i8* } - %struct.info = type { i32, i32, i32, i32, i32, i32, i32, i8* } +%struct.comment = type { i8**, i32*, i32, i8* } +%struct.info = type { i32, i32, i32, i32, i32, i32, i32, i8* } +%struct.state = type { i32, %struct.info*, float**, i32, i32, i32, i32, i32, i32, i32, i32, i32, i64, i64, i64, i64, i64, i64, i8* } + +@str215 = external global [2 x i8] define void @t1(%struct.state* %v) { - %tmp6 = load i32* null - %tmp8 = alloca float, i32 %tmp6 - store i32 1, i32* null - br i1 false, label %bb123.preheader, label %return - -bb123.preheader: - br i1 false, label %bb43, label %return - -bb43: - call fastcc void @f1( float* %tmp8, float* null, i32 0 ) - %tmp70 = load i32* null - %tmp85 = getelementptr float* %tmp8, i32 0 - call fastcc void @f2( float* null, float* null, float* %tmp85, i32 %tmp70 ) - ret void - -return: - ret void + %tmp6 = load i32* null + %tmp8 = alloca float, i32 %tmp6 + store i32 1, i32* null + br i1 false, label %bb123.preheader, label %return + +bb123.preheader: ; preds = %0 + br i1 false, label %bb43, label %return + +bb43: ; preds = %bb123.preheader + call fastcc void @f1(float* %tmp8, float* null, i32 0) + %tmp70 = load i32* null + %tmp85 = getelementptr float* %tmp8, i32 0 + call fastcc void @f2(float* null, float* null, float* %tmp85, i32 %tmp70) + ret void + +return: ; preds = %bb123.preheader, %0 + ret void } declare fastcc void @f1(float*, float*, i32) declare fastcc void @f2(float*, float*, float*, i32) - %struct.comment = type { i8**, i32*, i32, i8* } -@str215 = external global [2 x i8] - define void @t2(%struct.comment* %vc, i8* %tag, i8* %contents) { - %tmp1 = call i32 @strlen( i8* %tag ) - %tmp3 = call i32 @strlen( i8* %contents ) - %tmp4 = add i32 %tmp1, 2 - %tmp5 = add i32 %tmp4, %tmp3 - %tmp6 = alloca i8, i32 %tmp5 - %tmp9 = call i8* @strcpy( i8* %tmp6, i8* %tag ) - %tmp6.len = call i32 @strlen( i8* %tmp6 ) - %tmp6.indexed = getelementptr i8* %tmp6, i32 %tmp6.len - call void @llvm.memcpy.i32( i8* %tmp6.indexed, i8* getelementptr ([2 x i8]* @str215, i32 0, i32 0), i32 2, i32 1 ) - %tmp15 = call i8* @strcat( i8* %tmp6, i8* %contents ) - call fastcc void @comment_add( %struct.comment* %vc, i8* %tmp6 ) - ret void + %tmp1 = call i32 @strlen(i8* %tag) + %tmp3 = call i32 @strlen(i8* %contents) + %tmp4 = add i32 %tmp1, 2 + %tmp5 = add i32 %tmp4, %tmp3 + %tmp6 = alloca i8, i32 %tmp5 + %tmp9 = call i8* @strcpy(i8* %tmp6, i8* %tag) + %tmp6.len = call i32 @strlen(i8* %tmp6) + %tmp6.indexed = getelementptr i8* %tmp6, i32 %tmp6.len + call void @llvm.memcpy.p0i8.p0i8.i32(i8* %tmp6.indexed, i8* getelementptr inbounds ([2 x i8]* @str215, i32 0, i32 0), i32 2, i32 1, i1 false) + %tmp15 = call i8* @strcat(i8* %tmp6, i8* %contents) + call fastcc void @comment_add(%struct.comment* %vc, i8* %tmp6) + ret void } declare i32 @strlen(i8*) @@ -51,6 +51,6 @@ declare i8* @strcat(i8*, i8*) declare fastcc void @comment_add(%struct.comment*, i8*) -declare void @llvm.memcpy.i32(i8*, i8*, i32, i32) - declare i8* @strcpy(i8*, i8*) + +declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32, i1) nounwind diff --git a/test/CodeGen/ARM/memcpy-inline.ll b/test/CodeGen/ARM/memcpy-inline.ll index 5bae037..30b9f59 100644 --- a/test/CodeGen/ARM/memcpy-inline.ll +++ b/test/CodeGen/ARM/memcpy-inline.ll @@ -6,13 +6,14 @@ ; CHECK: ldrb %struct.x = type { i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } + @src = external global %struct.x @dst = external global %struct.x define i32 @t() { entry: - call void @llvm.memcpy.i32( i8* getelementptr (%struct.x* @dst, i32 0, i32 0), i8* getelementptr (%struct.x* @src, i32 0, i32 0), i32 11, i32 8 ) - ret i32 0 + call void @llvm.memcpy.p0i8.p0i8.i32(i8* getelementptr inbounds (%struct.x* @dst, i32 0, i32 0), i8* getelementptr inbounds (%struct.x* @src, i32 0, i32 0), i32 11, i32 8, i1 false) + ret i32 0 } -declare void @llvm.memcpy.i32(i8*, i8*, i32, i32) +declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32, i1) nounwind diff --git a/test/CodeGen/ARM/memfunc.ll b/test/CodeGen/ARM/memfunc.ll index 757364b..aeda022 100644 --- a/test/CodeGen/ARM/memfunc.ll +++ b/test/CodeGen/ARM/memfunc.ll @@ -9,24 +9,21 @@ entry: ; CHECK: memmove ; EABI: __aeabi_memmove - call void @llvm.memmove.i32( i8* bitcast ([500 x i32]* @from to i8*), i8* bitcast ([500 x i32]* @to to i8*), i32 500, i32 0 ) + call void @llvm.memmove.p0i8.p0i8.i32(i8* bitcast ([500 x i32]* @from to i8*), i8* bitcast ([500 x i32]* @to to i8*), i32 500, i32 0, i1 false) ; CHECK: memcpy ; EABI: __aeabi_memcpy - call void @llvm.memcpy.i32( i8* bitcast ([500 x i32]* @from to i8*), i8* bitcast ([500 x i32]* @to to i8*), i32 500, i32 0 ) + call void @llvm.memcpy.p0i8.p0i8.i32(i8* bitcast ([500 x i32]* @from to i8*), i8* bitcast ([500 x i32]* @to to i8*), i32 500, i32 0, i1 false) ; EABI memset swaps arguments ; CHECK: mov r1, #0 ; CHECK: memset ; EABI: mov r2, #0 ; EABI: __aeabi_memset - call void @llvm.memset.i32( i8* bitcast ([500 x i32]* @from to i8*), i8 0, i32 500, i32 0 ) + call void @llvm.memset.p0i8.i32(i8* bitcast ([500 x i32]* @from to i8*), i8 0, i32 500, i32 0, i1 false) unreachable } -declare void @llvm.memmove.i32(i8*, i8*, i32, i32) - -declare void @llvm.memcpy.i32(i8*, i8*, i32, i32) - -declare void @llvm.memset.i32(i8*, i8, i32, i32) - +declare void @llvm.memmove.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32, i1) nounwind +declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32, i1) nounwind +declare void @llvm.memset.p0i8.i32(i8* nocapture, i8, i32, i32, i1) nounwind diff --git a/test/CodeGen/Generic/2005-07-12-memcpy-i64-length.ll b/test/CodeGen/Generic/2005-07-12-memcpy-i64-length.ll deleted file mode 100644 index 733202c..0000000 --- a/test/CodeGen/Generic/2005-07-12-memcpy-i64-length.ll +++ /dev/null @@ -1,11 +0,0 @@ -; RUN: llc < %s -; Test that llvm.memcpy works with a i64 length operand on all targets. - -declare void @llvm.memcpy.i64(i8*, i8*, i64, i32) - -define void @l12_l94_bc_divide_endif_2E_3_2E_ce() { -newFuncRoot: - tail call void @llvm.memcpy.i64( i8* null, i8* null, i64 0, i32 1 ) - unreachable -} - diff --git a/test/CodeGen/Generic/2007-11-21-UndeadIllegalNode.ll b/test/CodeGen/Generic/2007-11-21-UndeadIllegalNode.ll deleted file mode 100644 index 3090857..0000000 --- a/test/CodeGen/Generic/2007-11-21-UndeadIllegalNode.ll +++ /dev/null @@ -1,157 +0,0 @@ -; RUN: llc < %s -o - - - %struct.RETURN = type { i32, i32 } - %struct.ada__finalization__controlled = type { %struct.system__finalization_root__root_controlled } - %struct.ada__streams__root_stream_type = type { %struct.ada__tags__dispatch_table* } - %struct.ada__strings__unbounded__string_access = type { i8*, %struct.RETURN* } - %struct.ada__strings__unbounded__unbounded_string = type { %struct.ada__finalization__controlled, %struct.ada__strings__unbounded__string_access, i32 } - %struct.ada__tags__dispatch_table = type { [1 x i32] } - %struct.exception = type { i8, i8, i32, i8*, i8*, i32, i8* } - %struct.system__finalization_root__root_controlled = type { %struct.ada__streams__root_stream_type, %struct.system__finalization_root__root_controlled*, %struct.system__finalization_root__root_controlled* } - %struct.system__standard_library__exception_data = type { i8, i8, i32, i32, %struct.system__standard_library__exception_data*, i32, void ()* } -@C.495.7639 = internal constant %struct.RETURN { i32 1, i32 16 } ; <%struct.RETURN*> [#uses=1] -@ada__strings__index_error = external global %struct.exception ; <%struct.exception*> [#uses=1] -@.str5 = internal constant [16 x i8] c"a-strunb.adb:690" ; <[16 x i8]*> [#uses=1] - -declare void @llvm.memcpy.i32(i8*, i8*, i32, i32) - -declare void @ada__strings__unbounded__realloc_for_chunk(%struct.ada__strings__unbounded__unbounded_string*, i32) - -declare void @__gnat_raise_exception(%struct.system__standard_library__exception_data*, i64) - -define void @ada__strings__unbounded__insert__2(%struct.ada__strings__unbounded__unbounded_string* %source, i32 %before, i64 %new_item.0.0) { -entry: - %tmp24636 = lshr i64 %new_item.0.0, 32 ; [#uses=1] - %tmp24637 = trunc i64 %tmp24636 to i32 ; [#uses=1] - %tmp24638 = inttoptr i32 %tmp24637 to %struct.RETURN* ; <%struct.RETURN*> [#uses=2] - %tmp25 = getelementptr %struct.RETURN* %tmp24638, i32 0, i32 0 ; [#uses=1] - %tmp26 = load i32* %tmp25, align 4 ; [#uses=1] - %tmp29 = getelementptr %struct.RETURN* %tmp24638, i32 0, i32 1 ; [#uses=1] - %tmp30 = load i32* %tmp29, align 4 ; [#uses=1] - %tmp63 = getelementptr %struct.ada__strings__unbounded__unbounded_string* %source, i32 0, i32 1, i32 1 ; <%struct.RETURN**> [#uses=5] - %tmp64 = load %struct.RETURN** %tmp63, align 4 ; <%struct.RETURN*> [#uses=1] - %tmp65 = getelementptr %struct.RETURN* %tmp64, i32 0, i32 0 ; [#uses=1] - %tmp66 = load i32* %tmp65, align 4 ; [#uses=1] - %tmp67 = icmp sgt i32 %tmp66, %before ; [#uses=1] - br i1 %tmp67, label %bb77, label %bb - -bb: ; preds = %entry - %tmp71 = getelementptr %struct.ada__strings__unbounded__unbounded_string* %source, i32 0, i32 2 ; [#uses=4] - %tmp72 = load i32* %tmp71, align 4 ; [#uses=1] - %tmp73 = add i32 %tmp72, 1 ; [#uses=1] - %tmp74 = icmp slt i32 %tmp73, %before ; [#uses=1] - br i1 %tmp74, label %bb77, label %bb84 - -bb77: ; preds = %bb, %entry - tail call void @__gnat_raise_exception( %struct.system__standard_library__exception_data* bitcast (%struct.exception* @ada__strings__index_error to %struct.system__standard_library__exception_data*), i64 or (i64 zext (i32 ptrtoint ([16 x i8]* @.str5 to i32) to i64), i64 shl (i64 zext (i32 ptrtoint (%struct.RETURN* @C.495.7639 to i32) to i64), i64 32)) ) - unreachable - -bb84: ; preds = %bb - %tmp93 = sub i32 %tmp30, %tmp26 ; [#uses=2] - %tmp9394 = sext i32 %tmp93 to i36 ; [#uses=1] - %tmp95 = shl i36 %tmp9394, 3 ; [#uses=1] - %tmp96 = add i36 %tmp95, 8 ; [#uses=2] - %tmp97 = icmp sgt i36 %tmp96, -1 ; [#uses=1] - %tmp100 = select i1 %tmp97, i36 %tmp96, i36 0 ; [#uses=2] - %tmp101 = icmp slt i36 %tmp100, 17179869177 ; [#uses=1] - %tmp100.cast = trunc i36 %tmp100 to i32 ; [#uses=1] - %min102 = select i1 %tmp101, i32 %tmp100.cast, i32 -8 ; [#uses=1] - tail call void @ada__strings__unbounded__realloc_for_chunk( %struct.ada__strings__unbounded__unbounded_string* %source, i32 %min102 ) - %tmp148 = load i32* %tmp71, align 4 ; [#uses=4] - %tmp152 = add i32 %tmp93, 1 ; [#uses=2] - %tmp153 = icmp sgt i32 %tmp152, -1 ; [#uses=1] - %max154 = select i1 %tmp153, i32 %tmp152, i32 0 ; [#uses=5] - %tmp155 = add i32 %tmp148, %max154 ; [#uses=5] - %tmp315 = getelementptr %struct.ada__strings__unbounded__unbounded_string* %source, i32 0, i32 1, i32 0 ; [#uses=4] - %tmp328 = load %struct.RETURN** %tmp63, align 4 ; <%struct.RETURN*> [#uses=1] - %tmp329 = getelementptr %struct.RETURN* %tmp328, i32 0, i32 0 ; [#uses=1] - %tmp330 = load i32* %tmp329, align 4 ; [#uses=4] - %tmp324 = add i32 %max154, %before ; [#uses=3] - %tmp331 = sub i32 %tmp324, %tmp330 ; [#uses=1] - %tmp349 = sub i32 %before, %tmp330 ; [#uses=1] - %tmp356 = icmp sgt i32 %tmp331, %tmp349 ; [#uses=1] - %tmp431 = icmp sgt i32 %tmp324, %tmp155 ; [#uses=2] - br i1 %tmp356, label %bb420, label %bb359 - -bb359: ; preds = %bb84 - br i1 %tmp431, label %bb481, label %bb382 - -bb382: ; preds = %bb382, %bb359 - %indvar = phi i32 [ 0, %bb359 ], [ %indvar.next, %bb382 ] ; [#uses=2] - %max379.pn = phi i32 [ %max154, %bb359 ], [ %L492b.0, %bb382 ] ; [#uses=1] - %before.pn = phi i32 [ %before, %bb359 ], [ 1, %bb382 ] ; [#uses=1] - %L492b.0 = add i32 %before.pn, %max379.pn ; [#uses=3] - %tmp386 = load %struct.RETURN** %tmp63, align 4 ; <%struct.RETURN*> [#uses=1] - %tmp387 = getelementptr %struct.RETURN* %tmp386, i32 0, i32 0 ; [#uses=1] - %tmp388 = load i32* %tmp387, align 4 ; [#uses=2] - %tmp392 = load i8** %tmp315, align 4 ; [#uses=2] - %R493b.0 = add i32 %indvar, %before ; [#uses=1] - %tmp405 = sub i32 %R493b.0, %tmp388 ; [#uses=1] - %tmp406 = getelementptr i8* %tmp392, i32 %tmp405 ; [#uses=1] - %tmp407 = load i8* %tmp406, align 1 ; [#uses=1] - %tmp408 = sub i32 %L492b.0, %tmp388 ; [#uses=1] - %tmp409 = getelementptr i8* %tmp392, i32 %tmp408 ; [#uses=1] - store i8 %tmp407, i8* %tmp409, align 1 - %tmp414 = icmp eq i32 %L492b.0, %tmp155 ; [#uses=1] - %indvar.next = add i32 %indvar, 1 ; [#uses=1] - br i1 %tmp414, label %bb481, label %bb382 - -bb420: ; preds = %bb84 - br i1 %tmp431, label %bb481, label %bb436.preheader - -bb436.preheader: ; preds = %bb420 - %tmp4468 = load i8** %tmp315, align 4 ; [#uses=2] - %tmp4599 = sub i32 %tmp148, %tmp330 ; [#uses=1] - %tmp46010 = getelementptr i8* %tmp4468, i32 %tmp4599 ; [#uses=1] - %tmp46111 = load i8* %tmp46010, align 1 ; [#uses=1] - %tmp46212 = sub i32 %tmp155, %tmp330 ; [#uses=1] - %tmp46313 = getelementptr i8* %tmp4468, i32 %tmp46212 ; [#uses=1] - store i8 %tmp46111, i8* %tmp46313, align 1 - %exitcond14 = icmp eq i32 %tmp155, %tmp324 ; [#uses=1] - br i1 %exitcond14, label %bb481, label %bb.nph - -bb.nph: ; preds = %bb436.preheader - %tmp5 = sub i32 %tmp148, %before ; [#uses=1] - br label %bb478 - -bb478: ; preds = %bb478, %bb.nph - %indvar6422 = phi i32 [ 0, %bb.nph ], [ %indvar.next643, %bb478 ] ; [#uses=1] - %indvar.next643 = add i32 %indvar6422, 1 ; [#uses=4] - %L490b.0 = sub i32 %tmp155, %indvar.next643 ; [#uses=1] - %R491b.0 = sub i32 %tmp148, %indvar.next643 ; [#uses=1] - %tmp440 = load %struct.RETURN** %tmp63, align 4 ; <%struct.RETURN*> [#uses=1] - %tmp441 = getelementptr %struct.RETURN* %tmp440, i32 0, i32 0 ; [#uses=1] - %tmp442 = load i32* %tmp441, align 4 ; [#uses=2] - %tmp446 = load i8** %tmp315, align 4 ; [#uses=2] - %tmp459 = sub i32 %R491b.0, %tmp442 ; [#uses=1] - %tmp460 = getelementptr i8* %tmp446, i32 %tmp459 ; [#uses=1] - %tmp461 = load i8* %tmp460, align 1 ; [#uses=1] - %tmp462 = sub i32 %L490b.0, %tmp442 ; [#uses=1] - %tmp463 = getelementptr i8* %tmp446, i32 %tmp462 ; [#uses=1] - store i8 %tmp461, i8* %tmp463, align 1 - %exitcond = icmp eq i32 %indvar.next643, %tmp5 ; [#uses=1] - br i1 %exitcond, label %bb481, label %bb478 - -bb481: ; preds = %bb478, %bb436.preheader, %bb420, %bb382, %bb359 - %tmp577 = add i32 %before, -1 ; [#uses=3] - %tmp578 = add i32 %max154, %tmp577 ; [#uses=2] - %tmp581 = icmp sge i32 %tmp578, %tmp577 ; [#uses=1] - %max582 = select i1 %tmp581, i32 %tmp578, i32 %tmp577 ; [#uses=1] - %tmp584 = sub i32 %max582, %before ; [#uses=1] - %tmp585 = add i32 %tmp584, 1 ; [#uses=2] - %tmp586 = icmp sgt i32 %tmp585, -1 ; [#uses=1] - %max587 = select i1 %tmp586, i32 %tmp585, i32 0 ; [#uses=1] - %tmp591 = load %struct.RETURN** %tmp63, align 4 ; <%struct.RETURN*> [#uses=1] - %tmp592 = getelementptr %struct.RETURN* %tmp591, i32 0, i32 0 ; [#uses=1] - %tmp593 = load i32* %tmp592, align 4 ; [#uses=1] - %tmp597 = load i8** %tmp315, align 4 ; [#uses=1] - %tmp600621 = trunc i64 %new_item.0.0 to i32 ; [#uses=1] - %tmp600622 = inttoptr i32 %tmp600621 to i8* ; [#uses=1] - %tmp601 = sub i32 %before, %tmp593 ; [#uses=1] - %tmp602 = getelementptr i8* %tmp597, i32 %tmp601 ; [#uses=1] - tail call void @llvm.memcpy.i32( i8* %tmp602, i8* %tmp600622, i32 %max587, i32 1 ) - %tmp606 = load i32* %tmp71, align 4 ; [#uses=1] - %tmp613 = add i32 %tmp606, %max154 ; [#uses=1] - store i32 %tmp613, i32* %tmp71, align 4 - ret void -} diff --git a/test/CodeGen/Generic/invalid-memcpy.ll b/test/CodeGen/Generic/invalid-memcpy.ll index 8448565..2dfa28b 100644 --- a/test/CodeGen/Generic/invalid-memcpy.ll +++ b/test/CodeGen/Generic/invalid-memcpy.ll @@ -4,16 +4,14 @@ ; greater than the alignment guaranteed for Qux or C.0.1173), but it ; should compile, not crash the code generator. -@C.0.1173 = external constant [33 x i8] ; <[33 x i8]*> [#uses=1] +@C.0.1173 = external constant [33 x i8] define void @Bork() { entry: - %Qux = alloca [33 x i8] ; <[33 x i8]*> [#uses=1] - %Qux1 = bitcast [33 x i8]* %Qux to i8* ; [#uses=1] - call void @llvm.memcpy.i64( i8* %Qux1, i8* getelementptr ([33 x i8]* @C.0.1173, i32 0, i32 0), i64 33, i32 8 ) - ret void + %Qux = alloca [33 x i8] + %Qux1 = bitcast [33 x i8]* %Qux to i8* + call void @llvm.memcpy.p0i8.p0i8.i64(i8* %Qux1, i8* getelementptr inbounds ([33 x i8]* @C.0.1173, i32 0, i32 0), i64 33, i32 8, i1 false) + ret void } -declare void @llvm.memcpy.i64(i8*, i8*, i64, i32) - - +declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture, i8* nocapture, i64, i32, i1) nounwind diff --git a/test/CodeGen/PowerPC/2008-10-30-IllegalShift.ll b/test/CodeGen/PowerPC/2008-10-30-IllegalShift.ll deleted file mode 100644 index 83f3f6f..0000000 --- a/test/CodeGen/PowerPC/2008-10-30-IllegalShift.ll +++ /dev/null @@ -1,14 +0,0 @@ -; RUN: llc < %s -march=ppc32 -; PR2986 -@argc = external global i32 ; [#uses=1] -@buffer = external global [32 x i8], align 4 ; <[32 x i8]*> [#uses=1] - -define void @test1() nounwind noinline { -entry: - %0 = load i32* @argc, align 4 ; [#uses=1] - %1 = trunc i32 %0 to i8 ; [#uses=1] - tail call void @llvm.memset.i32(i8* getelementptr ([32 x i8]* @buffer, i32 0, i32 0), i8 %1, i32 17, i32 4) - unreachable -} - -declare void @llvm.memset.i32(i8*, i8, i32, i32) nounwind diff --git a/test/CodeGen/PowerPC/2009-11-15-ReMatBug.ll b/test/CodeGen/PowerPC/2009-11-15-ReMatBug.ll deleted file mode 100644 index 54f4b2e..0000000 --- a/test/CodeGen/PowerPC/2009-11-15-ReMatBug.ll +++ /dev/null @@ -1,155 +0,0 @@ -; RUN: llc < %s -mtriple=powerpc-apple-darwin8 - -%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.__gcov_var = type { %struct.FILE*, i32, i32, i32, i32, i32, i32, [1025 x i32] } -%struct.__sFILEX = type opaque -%struct.__sbuf = type { i8*, i32 } -%struct.gcov_ctr_info = type { i32, i64*, void (i64*, i32)* } -%struct.gcov_ctr_summary = type { i32, i32, i64, i64, i64 } -%struct.gcov_fn_info = type { i32, i32, [0 x i32] } -%struct.gcov_info = type { i32, %struct.gcov_info*, i32, i8*, i32, %struct.gcov_fn_info*, i32, [0 x %struct.gcov_ctr_info] } -%struct.gcov_summary = type { i32, [1 x %struct.gcov_ctr_summary] } - -@__gcov_var = external global %struct.__gcov_var ; <%struct.__gcov_var*> [#uses=1] -@__sF = external global [0 x %struct.FILE] ; <[0 x %struct.FILE]*> [#uses=1] -@.str = external constant [56 x i8], align 4 ; <[56 x i8]*> [#uses=1] -@gcov_list = external global %struct.gcov_info* ; <%struct.gcov_info**> [#uses=1] -@.str7 = external constant [35 x i8], align 4 ; <[35 x i8]*> [#uses=1] -@.str8 = external constant [9 x i8], align 4 ; <[9 x i8]*> [#uses=1] -@.str9 = external constant [10 x i8], align 4 ; <[10 x i8]*> [#uses=1] -@.str10 = external constant [36 x i8], align 4 ; <[36 x i8]*> [#uses=1] - -declare i32 @"\01_fprintf$LDBL128"(%struct.FILE*, i8*, ...) nounwind - -define void @gcov_exit() nounwind { -entry: - %gi_ptr.0357 = load %struct.gcov_info** @gcov_list, align 4 ; <%struct.gcov_info*> [#uses=1] - %0 = alloca i8, i32 undef, align 1 ; [#uses=3] - br i1 undef, label %return, label %bb.nph341 - -bb.nph341: ; preds = %entry - %object27 = bitcast %struct.gcov_summary* undef to i8* ; [#uses=1] - br label %bb25 - -bb25: ; preds = %read_fatal, %bb.nph341 - %gi_ptr.1329 = phi %struct.gcov_info* [ %gi_ptr.0357, %bb.nph341 ], [ undef, %read_fatal ] ; <%struct.gcov_info*> [#uses=1] - call void @llvm.memset.i32(i8* %object27, i8 0, i32 36, i32 8) - br i1 undef, label %bb49.1, label %bb48 - -bb48: ; preds = %bb25 - br label %bb49.1 - -bb51: ; preds = %bb48.4, %bb49.3 - switch i32 undef, label %bb58 [ - i32 0, label %rewrite - i32 1734567009, label %bb59 - ] - -bb58: ; preds = %bb51 - %1 = call i32 (%struct.FILE*, i8*, ...)* @"\01_fprintf$LDBL128"(%struct.FILE* getelementptr inbounds ([0 x %struct.FILE]* @__sF, i32 0, i32 2), i8* getelementptr inbounds ([35 x i8]* @.str7, i32 0, i32 0), i8* %0) nounwind ; [#uses=0] - br label %read_fatal - -bb59: ; preds = %bb51 - br i1 undef, label %bb60, label %bb3.i156 - -bb3.i156: ; preds = %bb59 - store i8 52, i8* undef, align 1 - store i8 42, i8* undef, align 1 - %2 = call i32 (%struct.FILE*, i8*, ...)* @"\01_fprintf$LDBL128"(%struct.FILE* getelementptr inbounds ([0 x %struct.FILE]* @__sF, i32 0, i32 2), i8* getelementptr inbounds ([56 x i8]* @.str, i32 0, i32 0), i8* %0, i8* undef, i8* undef) nounwind ; [#uses=0] - br label %read_fatal - -bb60: ; preds = %bb59 - br i1 undef, label %bb78.preheader, label %rewrite - -bb78.preheader: ; preds = %bb60 - br i1 undef, label %bb62, label %bb80 - -bb62: ; preds = %bb78.preheader - br i1 undef, label %bb64, label %read_mismatch - -bb64: ; preds = %bb62 - br i1 undef, label %bb65, label %read_mismatch - -bb65: ; preds = %bb64 - br i1 undef, label %bb75, label %read_mismatch - -read_mismatch: ; preds = %bb98, %bb119.preheader, %bb72, %bb71, %bb65, %bb64, %bb62 - %3 = icmp eq i32 undef, -1 ; [#uses=1] - %iftmp.11.0 = select i1 %3, i8* getelementptr inbounds ([10 x i8]* @.str9, i32 0, i32 0), i8* getelementptr inbounds ([9 x i8]* @.str8, i32 0, i32 0) ; [#uses=1] - %4 = call i32 (%struct.FILE*, i8*, ...)* @"\01_fprintf$LDBL128"(%struct.FILE* getelementptr inbounds ([0 x %struct.FILE]* @__sF, i32 0, i32 2), i8* getelementptr inbounds ([36 x i8]* @.str10, i32 0, i32 0), i8* %0, i8* %iftmp.11.0) nounwind ; [#uses=0] - br label %read_fatal - -bb71: ; preds = %bb75 - %5 = load i32* undef, align 4 ; [#uses=1] - %6 = getelementptr inbounds %struct.gcov_info* %gi_ptr.1329, i32 0, i32 7, i32 undef, i32 2 ; [#uses=1] - %7 = load void (i64*, i32)** %6, align 4 ; [#uses=1] - %8 = call i32 @__gcov_read_unsigned() nounwind ; [#uses=1] - %9 = call i32 @__gcov_read_unsigned() nounwind ; [#uses=1] - %10 = icmp eq i32 %tmp386, %8 ; [#uses=1] - br i1 %10, label %bb72, label %read_mismatch - -bb72: ; preds = %bb71 - %11 = icmp eq i32 undef, %9 ; [#uses=1] - br i1 %11, label %bb73, label %read_mismatch - -bb73: ; preds = %bb72 - call void %7(i64* null, i32 %5) nounwind - unreachable - -bb74: ; preds = %bb75 - %12 = add i32 %13, 1 ; [#uses=1] - br label %bb75 - -bb75: ; preds = %bb74, %bb65 - %13 = phi i32 [ %12, %bb74 ], [ 0, %bb65 ] ; [#uses=2] - %tmp386 = add i32 0, 27328512 ; [#uses=1] - %14 = shl i32 1, %13 ; [#uses=1] - %15 = load i32* undef, align 4 ; [#uses=1] - %16 = and i32 %15, %14 ; [#uses=1] - %17 = icmp eq i32 %16, 0 ; [#uses=1] - br i1 %17, label %bb74, label %bb71 - -bb80: ; preds = %bb78.preheader - unreachable - -read_fatal: ; preds = %read_mismatch, %bb3.i156, %bb58 - br i1 undef, label %return, label %bb25 - -rewrite: ; preds = %bb60, %bb51 - store i32 -1, i32* getelementptr inbounds (%struct.__gcov_var* @__gcov_var, i32 0, i32 6), align 4 - br i1 undef, label %bb94, label %bb119.preheader - -bb94: ; preds = %rewrite - unreachable - -bb119.preheader: ; preds = %rewrite - br i1 undef, label %read_mismatch, label %bb98 - -bb98: ; preds = %bb119.preheader - br label %read_mismatch - -return: ; preds = %read_fatal, %entry - ret void - -bb49.1: ; preds = %bb48, %bb25 - br i1 undef, label %bb49.2, label %bb48.2 - -bb49.2: ; preds = %bb48.2, %bb49.1 - br i1 undef, label %bb49.3, label %bb48.3 - -bb48.2: ; preds = %bb49.1 - br label %bb49.2 - -bb49.3: ; preds = %bb48.3, %bb49.2 - br i1 undef, label %bb51, label %bb48.4 - -bb48.3: ; preds = %bb49.2 - br label %bb49.3 - -bb48.4: ; preds = %bb49.3 - br label %bb51 -} - -declare i32 @__gcov_read_unsigned() nounwind - -declare void @llvm.memset.i32(i8* nocapture, i8, i32, i32) nounwind diff --git a/test/CodeGen/PowerPC/atomic-1.ll b/test/CodeGen/PowerPC/atomic-1.ll index ec4e42d..a2cf170 100644 --- a/test/CodeGen/PowerPC/atomic-1.ll +++ b/test/CodeGen/PowerPC/atomic-1.ll @@ -1,21 +1,23 @@ ; RUN: llc < %s -march=ppc32 | grep lwarx | count 3 ; RUN: llc < %s -march=ppc32 | grep stwcx. | count 4 -define i32 @exchange_and_add(i32* %mem, i32 %val) nounwind { - %tmp = call i32 @llvm.atomic.load.add.i32( i32* %mem, i32 %val ) - ret i32 %tmp +define i32 @exchange_and_add(i32* %mem, i32 %val) nounwind { + %tmp = call i32 @llvm.atomic.load.add.i32.p0i32(i32* %mem, i32 %val) + ret i32 %tmp } -define i32 @exchange_and_cmp(i32* %mem) nounwind { - %tmp = call i32 @llvm.atomic.cmp.swap.i32( i32* %mem, i32 0, i32 1 ) - ret i32 %tmp +define i32 @exchange_and_cmp(i32* %mem) nounwind { + %tmp = call i32 @llvm.atomic.cmp.swap.i32.p0i32(i32* %mem, i32 0, i32 1) + ret i32 %tmp } -define i32 @exchange(i32* %mem, i32 %val) nounwind { - %tmp = call i32 @llvm.atomic.swap.i32( i32* %mem, i32 1 ) - ret i32 %tmp +define i32 @exchange(i32* %mem, i32 %val) nounwind { + %tmp = call i32 @llvm.atomic.swap.i32.p0i32(i32* %mem, i32 1) + ret i32 %tmp } -declare i32 @llvm.atomic.load.add.i32(i32*, i32) nounwind -declare i32 @llvm.atomic.cmp.swap.i32(i32*, i32, i32) nounwind -declare i32 @llvm.atomic.swap.i32(i32*, i32) nounwind +declare i32 @llvm.atomic.load.add.i32.p0i32(i32* nocapture, i32) nounwind + +declare i32 @llvm.atomic.cmp.swap.i32.p0i32(i32* nocapture, i32, i32) nounwind + +declare i32 @llvm.atomic.swap.i32.p0i32(i32* nocapture, i32) nounwind diff --git a/test/CodeGen/PowerPC/atomic-2.ll b/test/CodeGen/PowerPC/atomic-2.ll index 6d9daef..0fa2a29 100644 --- a/test/CodeGen/PowerPC/atomic-2.ll +++ b/test/CodeGen/PowerPC/atomic-2.ll @@ -1,21 +1,23 @@ ; RUN: llc < %s -march=ppc64 | grep ldarx | count 3 ; RUN: llc < %s -march=ppc64 | grep stdcx. | count 4 -define i64 @exchange_and_add(i64* %mem, i64 %val) nounwind { - %tmp = call i64 @llvm.atomic.load.add.i64( i64* %mem, i64 %val ) - ret i64 %tmp +define i64 @exchange_and_add(i64* %mem, i64 %val) nounwind { + %tmp = call i64 @llvm.atomic.load.add.i64.p0i64(i64* %mem, i64 %val) + ret i64 %tmp } -define i64 @exchange_and_cmp(i64* %mem) nounwind { - %tmp = call i64 @llvm.atomic.cmp.swap.i64( i64* %mem, i64 0, i64 1 ) - ret i64 %tmp +define i64 @exchange_and_cmp(i64* %mem) nounwind { + %tmp = call i64 @llvm.atomic.cmp.swap.i64.p0i64(i64* %mem, i64 0, i64 1) + ret i64 %tmp } -define i64 @exchange(i64* %mem, i64 %val) nounwind { - %tmp = call i64 @llvm.atomic.swap.i64( i64* %mem, i64 1 ) - ret i64 %tmp +define i64 @exchange(i64* %mem, i64 %val) nounwind { + %tmp = call i64 @llvm.atomic.swap.i64.p0i64(i64* %mem, i64 1) + ret i64 %tmp } -declare i64 @llvm.atomic.load.add.i64(i64*, i64) nounwind -declare i64 @llvm.atomic.cmp.swap.i64(i64*, i64, i64) nounwind -declare i64 @llvm.atomic.swap.i64(i64*, i64) nounwind +declare i64 @llvm.atomic.load.add.i64.p0i64(i64* nocapture, i64) nounwind + +declare i64 @llvm.atomic.cmp.swap.i64.p0i64(i64* nocapture, i64, i64) nounwind + +declare i64 @llvm.atomic.swap.i64.p0i64(i64* nocapture, i64) nounwind diff --git a/test/CodeGen/PowerPC/invalid-memcpy.ll b/test/CodeGen/PowerPC/invalid-memcpy.ll deleted file mode 100644 index 3b1f306..0000000 --- a/test/CodeGen/PowerPC/invalid-memcpy.ll +++ /dev/null @@ -1,20 +0,0 @@ -; RUN: llc < %s -march=ppc32 -; RUN: llc < %s -march=ppc64 - -; This testcase is invalid (the alignment specified for memcpy is -; greater than the alignment guaranteed for Qux or C.0.1173, but it -; should compile, not crash the code generator. - -@C.0.1173 = external constant [33 x i8] ; <[33 x i8]*> [#uses=1] - -define void @Bork() { -entry: - %Qux = alloca [33 x i8] ; <[33 x i8]*> [#uses=1] - %Qux1 = bitcast [33 x i8]* %Qux to i8* ; [#uses=1] - call void @llvm.memcpy.i64( i8* %Qux1, i8* getelementptr ([33 x i8]* @C.0.1173, i32 0, i32 0), i64 33, i32 8 ) - ret void -} - -declare void @llvm.memcpy.i64(i8*, i8*, i64, i32) - - diff --git a/test/CodeGen/Thumb/dyn-stackalloc.ll b/test/CodeGen/Thumb/dyn-stackalloc.ll index cd35be6..f3f0834 100644 --- a/test/CodeGen/Thumb/dyn-stackalloc.ll +++ b/test/CodeGen/Thumb/dyn-stackalloc.ll @@ -60,7 +60,7 @@ define void @t2(%struct.comment* %vc, i8* %tag, i8* %contents) { %tmp9 = call i8* @strcpy( i8* %tmp6, i8* %tag ) %tmp6.len = call i32 @strlen( i8* %tmp6 ) %tmp6.indexed = getelementptr i8* %tmp6, i32 %tmp6.len - call void @llvm.memcpy.i32( i8* %tmp6.indexed, i8* getelementptr ([2 x i8]* @str215, i32 0, i32 0), i32 2, i32 1 ) + call void @llvm.memcpy.p0i8.p0i8.i32(i8* %tmp6.indexed, i8* getelementptr inbounds ([2 x i8]* @str215, i32 0, i32 0), i32 2, i32 1, i1 false) %tmp15 = call i8* @strcat( i8* %tmp6, i8* %contents ) call fastcc void @comment_add( %struct.comment* %vc, i8* %tmp6 ) ret void @@ -72,6 +72,6 @@ declare i8* @strcat(i8*, i8*) declare fastcc void @comment_add(%struct.comment*, i8*) -declare void @llvm.memcpy.i32(i8*, i8*, i32, i32) +declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32, i1) nounwind declare i8* @strcpy(i8*, i8*) diff --git a/test/CodeGen/Thumb2/2009-08-04-SubregLoweringBug.ll b/test/CodeGen/Thumb2/2009-08-04-SubregLoweringBug.ll index bfea003..779e100 100644 --- a/test/CodeGen/Thumb2/2009-08-04-SubregLoweringBug.ll +++ b/test/CodeGen/Thumb2/2009-08-04-SubregLoweringBug.ll @@ -1,4 +1,3 @@ -; RUN: llc < %s -mtriple=thumbv7-apple-darwin9 -mcpu=cortex-a8 ; RUN: llc < %s -mtriple=thumbv7-apple-darwin9 -mcpu=cortex-a8 | not grep fcpys ; rdar://7117307 @@ -13,7 +12,7 @@ entry: br i1 undef, label %bb, label %bb6.preheader bb6.preheader: ; preds = %entry - call void @llvm.memcpy.i32(i8* undef, i8* undef, i32 12, i32 4) + call void @llvm.memcpy.p0i8.p0i8.i32(i8* undef, i8* undef, i32 12, i32 4, i1 false) br i1 undef, label %bb15, label %bb13 bb: ; preds = %entry @@ -31,4 +30,4 @@ bb15: ; preds = %bb13, %bb6.preheader ret void } -declare void @llvm.memcpy.i32(i8* nocapture, i8* nocapture, i32, i32) nounwind +declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32, i1) nounwind diff --git a/test/CodeGen/X86/2004-02-12-Memcpy.ll b/test/CodeGen/X86/2004-02-12-Memcpy.ll deleted file mode 100644 index f15a1b4..0000000 --- a/test/CodeGen/X86/2004-02-12-Memcpy.ll +++ /dev/null @@ -1,25 +0,0 @@ -; RUN: llc < %s -march=x86 -mtriple=i686-pc-linux-gnu | grep movs | count 1 - -@A = global [32 x i32] zeroinitializer -@B = global [32 x i32] zeroinitializer - -declare void @llvm.memcpy.i32(i8*, i8*, i32, i32) - -define void @main() nounwind { - ; dword copy - call void @llvm.memcpy.i32(i8* bitcast ([32 x i32]* @A to i8*), - i8* bitcast ([32 x i32]* @B to i8*), - i32 128, i32 4 ) - - ; word copy - call void @llvm.memcpy.i32( i8* bitcast ([32 x i32]* @A to i8*), - i8* bitcast ([32 x i32]* @B to i8*), - i32 128, i32 2 ) - - ; byte copy - call void @llvm.memcpy.i32( i8* bitcast ([32 x i32]* @A to i8*), - i8* bitcast ([32 x i32]* @B to i8*), - i32 128, i32 1 ) - - ret void -} diff --git a/test/CodeGen/X86/2006-11-28-Memcpy.ll b/test/CodeGen/X86/2006-11-28-Memcpy.ll deleted file mode 100644 index 8c1573f..0000000 --- a/test/CodeGen/X86/2006-11-28-Memcpy.ll +++ /dev/null @@ -1,34 +0,0 @@ -; PR1022, PR1023 -; RUN: llc < %s -march=x86 | grep -- -573785174 | count 2 -; RUN: llc < %s -march=x86 | grep -E {movl _?bytes2} | count 1 - -@fmt = constant [4 x i8] c"%x\0A\00" ; <[4 x i8]*> [#uses=2] -@bytes = constant [4 x i8] c"\AA\BB\CC\DD" ; <[4 x i8]*> [#uses=1] -@bytes2 = global [4 x i8] c"\AA\BB\CC\DD" ; <[4 x i8]*> [#uses=1] - -define i32 @test1() nounwind { - %y = alloca i32 ; [#uses=2] - %c = bitcast i32* %y to i8* ; [#uses=1] - %z = getelementptr [4 x i8]* @bytes, i32 0, i32 0 ; [#uses=1] - call void @llvm.memcpy.i32( i8* %c, i8* %z, i32 4, i32 1 ) - %r = load i32* %y ; [#uses=1] - %t = bitcast [4 x i8]* @fmt to i8* ; [#uses=1] - %tmp = call i32 (i8*, ...)* @printf( i8* %t, i32 %r ) ; [#uses=0] - ret i32 0 -} - -define void @test2() nounwind { - %y = alloca i32 ; [#uses=2] - %c = bitcast i32* %y to i8* ; [#uses=1] - %z = getelementptr [4 x i8]* @bytes2, i32 0, i32 0 ; [#uses=1] - call void @llvm.memcpy.i32( i8* %c, i8* %z, i32 4, i32 1 ) - %r = load i32* %y ; [#uses=1] - %t = bitcast [4 x i8]* @fmt to i8* ; [#uses=1] - %tmp = call i32 (i8*, ...)* @printf( i8* %t, i32 %r ) ; [#uses=0] - ret void -} - -declare void @llvm.memcpy.i32(i8*, i8*, i32, i32) - -declare i32 @printf(i8*, ...) - diff --git a/test/CodeGen/X86/2007-05-05-Personality.ll b/test/CodeGen/X86/2007-05-05-Personality.ll index 0f49d2e..d1fc70d 100644 --- a/test/CodeGen/X86/2007-05-05-Personality.ll +++ b/test/CodeGen/X86/2007-05-05-Personality.ll @@ -3,35 +3,35 @@ ; CHECK: .cfi_personality 0, __gnat_eh_personality ; CHECK: .cfi_lsda 0, .Lexception0 -@error = external global i8 ; [#uses=2] +@error = external global i8 define void @_ada_x() { entry: - invoke void @raise( ) - to label %eh_then unwind label %unwind - -unwind: ; preds = %entry - %eh_ptr = tail call i8* @llvm.eh.exception( ) ; [#uses=2] - %eh_select = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector.i32( i8* %eh_ptr, i8* bitcast (i32 (...)* @__gnat_eh_personality to i8*), i8* @error ) ; [#uses=1] - %eh_typeid = tail call i32 @llvm.eh.typeid.for.i32( i8* @error ) ; [#uses=1] - %tmp2 = icmp eq i32 %eh_select, %eh_typeid ; [#uses=1] - br i1 %tmp2, label %eh_then, label %Unwind - -eh_then: ; preds = %unwind, %entry - ret void - -Unwind: ; preds = %unwind - tail call i32 (...)* @_Unwind_Resume( i8* %eh_ptr ) ; :0 [#uses=0] - unreachable + invoke void @raise() + to label %eh_then unwind label %unwind + +unwind: ; preds = %entry + %eh_ptr = tail call i8* @llvm.eh.exception() + %eh_select = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gnat_eh_personality to i8*), i8* @error) + %eh_typeid = tail call i32 @llvm.eh.typeid.for(i8* @error) + %tmp2 = icmp eq i32 %eh_select, %eh_typeid + br i1 %tmp2, label %eh_then, label %Unwind + +eh_then: ; preds = %unwind, %entry + ret void + +Unwind: ; preds = %unwind + %0 = tail call i32 (...)* @_Unwind_Resume(i8* %eh_ptr) + unreachable } declare void @raise() -declare i8* @llvm.eh.exception() +declare i8* @llvm.eh.exception() nounwind readonly -declare i32 @llvm.eh.selector.i32(i8*, i8*, ...) +declare i32 @llvm.eh.selector(i8*, i8*, ...) nounwind -declare i32 @llvm.eh.typeid.for.i32(i8*) +declare i32 @llvm.eh.typeid.for(i8*) nounwind declare i32 @__gnat_eh_personality(...) diff --git a/test/CodeGen/X86/2007-06-05-LSR-Dominator.ll b/test/CodeGen/X86/2007-06-05-LSR-Dominator.ll deleted file mode 100644 index 36a97ef..0000000 --- a/test/CodeGen/X86/2007-06-05-LSR-Dominator.ll +++ /dev/null @@ -1,129 +0,0 @@ -; PR1495 -; RUN: llc < %s -march=x86 - -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-pc-linux-gnu" - %struct.AVRational = type { i32, i32 } - %struct.FFTComplex = type { float, float } - %struct.FFTContext = type { i32, i32, i16*, %struct.FFTComplex*, %struct.FFTComplex*, void (%struct.FFTContext*, %struct.FFTComplex*)*, void (%struct.MDCTContext*, float*, float*, float*)* } - %struct.MDCTContext = type { i32, i32, float*, float*, %struct.FFTContext } - %struct.Minima = type { i32, i32, i32, i32 } - %struct.codebook_t = type { i32, i8*, i32*, i32, float, float, i32, i32, i32*, float*, float* } - %struct.floor_class_t = type { i32, i32, i32, i32* } - %struct.floor_t = type { i32, i32*, i32, %struct.floor_class_t*, i32, i32, i32, %struct.Minima* } - %struct.mapping_t = type { i32, i32*, i32*, i32*, i32, i32*, i32* } - %struct.residue_t = type { i32, i32, i32, i32, i32, i32, [8 x i8]*, [2 x float]* } - %struct.venc_context_t = type { i32, i32, [2 x i32], [2 x %struct.MDCTContext], [2 x float*], i32, float*, float*, float*, float*, float, i32, %struct.codebook_t*, i32, %struct.floor_t*, i32, %struct.residue_t*, i32, %struct.mapping_t*, i32, %struct.AVRational* } - -define fastcc i32 @put_main_header(%struct.venc_context_t* %venc, i8** %out) { -entry: - br i1 false, label %bb1820, label %bb288.bb148_crit_edge - -bb288.bb148_crit_edge: ; preds = %entry - ret i32 0 - -cond_next1712: ; preds = %bb1820.bb1680_crit_edge - ret i32 0 - -bb1817: ; preds = %bb1820.bb1680_crit_edge - br label %bb1820 - -bb1820: ; preds = %bb1817, %entry - %pb.1.50 = phi i32 [ %tmp1693, %bb1817 ], [ 8, %entry ] ; [#uses=3] - br i1 false, label %bb2093, label %bb1820.bb1680_crit_edge - -bb1820.bb1680_crit_edge: ; preds = %bb1820 - %tmp1693 = add i32 %pb.1.50, 8 ; [#uses=2] - %tmp1702 = icmp slt i32 %tmp1693, 0 ; [#uses=1] - br i1 %tmp1702, label %cond_next1712, label %bb1817 - -bb2093: ; preds = %bb1820 - %tmp2102 = add i32 %pb.1.50, 65 ; [#uses=0] - %tmp2236 = add i32 %pb.1.50, 72 ; [#uses=1] - %tmp2237 = sdiv i32 %tmp2236, 8 ; [#uses=2] - br i1 false, label %bb2543, label %bb2536.bb2396_crit_edge - -bb2536.bb2396_crit_edge: ; preds = %bb2093 - ret i32 0 - -bb2543: ; preds = %bb2093 - br i1 false, label %cond_next2576, label %bb2690 - -cond_next2576: ; preds = %bb2543 - ret i32 0 - -bb2682: ; preds = %bb2690 - ret i32 0 - -bb2690: ; preds = %bb2543 - br i1 false, label %bb2682, label %bb2698 - -bb2698: ; preds = %bb2690 - br i1 false, label %cond_next2726, label %bb2831 - -cond_next2726: ; preds = %bb2698 - ret i32 0 - -bb2831: ; preds = %bb2698 - br i1 false, label %cond_next2859, label %bb2964 - -cond_next2859: ; preds = %bb2831 - br i1 false, label %bb2943, label %cond_true2866 - -cond_true2866: ; preds = %cond_next2859 - br i1 false, label %cond_true2874, label %cond_false2897 - -cond_true2874: ; preds = %cond_true2866 - ret i32 0 - -cond_false2897: ; preds = %cond_true2866 - ret i32 0 - -bb2943: ; preds = %cond_next2859 - ret i32 0 - -bb2964: ; preds = %bb2831 - br i1 false, label %cond_next2997, label %bb4589 - -cond_next2997: ; preds = %bb2964 - ret i32 0 - -bb3103: ; preds = %bb4589 - ret i32 0 - -bb4589: ; preds = %bb2964 - br i1 false, label %bb3103, label %bb4597 - -bb4597: ; preds = %bb4589 - br i1 false, label %cond_next4630, label %bb4744 - -cond_next4630: ; preds = %bb4597 - br i1 false, label %bb4744, label %cond_true4724 - -cond_true4724: ; preds = %cond_next4630 - br i1 false, label %bb4736, label %bb7531 - -bb4736: ; preds = %cond_true4724 - ret i32 0 - -bb4744: ; preds = %cond_next4630, %bb4597 - ret i32 0 - -bb7531: ; preds = %cond_true4724 - %v_addr.023.0.i6 = add i32 %tmp2237, -255 ; [#uses=1] - br label %bb.i14 - -bb.i14: ; preds = %bb.i14, %bb7531 - %n.021.0.i8 = phi i32 [ 0, %bb7531 ], [ %indvar.next, %bb.i14 ] ; [#uses=2] - %tmp..i9 = mul i32 %n.021.0.i8, -255 ; [#uses=1] - %tmp5.i11 = add i32 %v_addr.023.0.i6, %tmp..i9 ; [#uses=1] - %tmp10.i12 = icmp ugt i32 %tmp5.i11, 254 ; [#uses=1] - %indvar.next = add i32 %n.021.0.i8, 1 ; [#uses=1] - br i1 %tmp10.i12, label %bb.i14, label %bb12.loopexit.i18 - -bb12.loopexit.i18: ; preds = %bb.i14 - call void @llvm.memcpy.i32( i8* null, i8* null, i32 %tmp2237, i32 1 ) - ret i32 0 -} - -declare void @llvm.memcpy.i32(i8*, i8*, i32, i32) diff --git a/test/CodeGen/X86/2008-06-04-MemCpyLoweringBug.ll b/test/CodeGen/X86/2008-06-04-MemCpyLoweringBug.ll deleted file mode 100644 index 236b7cd..0000000 --- a/test/CodeGen/X86/2008-06-04-MemCpyLoweringBug.ll +++ /dev/null @@ -1,19 +0,0 @@ -; RUN: llc < %s -mtriple=i386-apple-darwin -mattr=+sse2 -disable-fp-elim | grep subl | grep 24 - - %struct.argument_t = type { i8*, %struct.argument_t*, i32, %struct.ipc_type_t*, i32, void (...)*, void (...)*, void (...)*, void (...)*, void (...)*, i8*, i8*, i8*, i8*, i8*, i32, i32, i32, %struct.routine*, %struct.argument_t*, %struct.argument_t*, %struct.argument_t*, %struct.argument_t*, %struct.argument_t*, %struct.argument_t*, %struct.argument_t*, i32, i32, i32, i32, i32, i32 } - %struct.ipc_type_t = type { i8*, %struct.ipc_type_t*, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i8*, i8*, i32, i32, i32, i32, i32, i32, %struct.ipc_type_t*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8* } - %struct.routine = type opaque -@"\01LC" = external constant [11 x i8] ; <[11 x i8]*> [#uses=1] - -define i8* @InArgMsgField(%struct.argument_t* %arg, i8* %str) nounwind { -entry: - %who = alloca [20 x i8] ; <[20 x i8]*> [#uses=1] - %who1 = getelementptr [20 x i8]* %who, i32 0, i32 0 ; [#uses=2] - call void @llvm.memset.i32( i8* %who1, i8 0, i32 20, i32 1 ) - call void @llvm.memcpy.i32( i8* %who1, i8* getelementptr ([11 x i8]* @"\01LC", i32 0, i32 0), i32 11, i32 1 ) - unreachable -} - -declare void @llvm.memset.i32(i8*, i8, i32, i32) nounwind - -declare void @llvm.memcpy.i32(i8*, i8*, i32, i32) nounwind diff --git a/test/CodeGen/X86/2008-10-27-StackRealignment.ll b/test/CodeGen/X86/2008-10-27-StackRealignment.ll index 3d0766c..a57f716 100644 --- a/test/CodeGen/X86/2008-10-27-StackRealignment.ll +++ b/test/CodeGen/X86/2008-10-27-StackRealignment.ll @@ -11,12 +11,12 @@ target triple = "i386-pc-linux-gnu" define void @foo(i32 %t) nounwind { %tmp1210 = alloca i8, i32 32, align 4 - call void @llvm.memset.i64(i8* %tmp1210, i8 0, i64 32, i32 4) - + call void @llvm.memset.p0i8.i64(i8* %tmp1210, i8 0, i64 32, i32 4, i1 false) %x = alloca i8, i32 %t call void @dummy(i8* %x) ret void } -declare void @dummy(i8* %x) -declare void @llvm.memset.i64(i8*, i8, i64, i32) nounwind +declare void @dummy(i8*) + +declare void @llvm.memset.p0i8.i64(i8* nocapture, i8, i64, i32, i1) nounwind diff --git a/test/CodeGen/X86/2009-01-25-NoSSE.ll b/test/CodeGen/X86/2009-01-25-NoSSE.ll index 0583ef1..8406c4a 100644 --- a/test/CodeGen/X86/2009-01-25-NoSSE.ll +++ b/test/CodeGen/X86/2009-01-25-NoSSE.ll @@ -3,18 +3,18 @@ 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" target triple = "x86_64-unknown-linux-gnu" - %struct.ktermios = type { i32, i32, i32, i32, i8, [19 x i8], i32, i32 } + +%struct.ktermios = type { i32, i32, i32, i32, i8, [19 x i8], i32, i32 } define void @foo() nounwind { entry: - %termios = alloca %struct.ktermios, align 8 - %termios1 = bitcast %struct.ktermios* %termios to i8* - call void @llvm.memset.i64(i8* %termios1, i8 0, i64 44, i32 8) - call void @bar(%struct.ktermios* %termios) nounwind - ret void + %termios = alloca %struct.ktermios, align 8 + %termios1 = bitcast %struct.ktermios* %termios to i8* + call void @llvm.memset.p0i8.i64(i8* %termios1, i8 0, i64 44, i32 8, i1 false) + call void @bar(%struct.ktermios* %termios) nounwind + ret void } -declare void @llvm.memset.i64(i8* nocapture, i8, i64, i32) nounwind - declare void @bar(%struct.ktermios*) +declare void @llvm.memset.p0i8.i64(i8* nocapture, i8, i64, i32, i1) nounwind diff --git a/test/CodeGen/X86/2009-04-27-LiveIntervalsBug.ll b/test/CodeGen/X86/2009-04-27-LiveIntervalsBug.ll deleted file mode 100644 index 0a2fcdb..0000000 --- a/test/CodeGen/X86/2009-04-27-LiveIntervalsBug.ll +++ /dev/null @@ -1,165 +0,0 @@ -; RUN: llc < %s -mtriple=i386-unknown-linux-gnu | grep cmpxchgl | not grep eax -; PR4076 - - type { i8, i8, i8 } ; type %0 - type { i32, i8** } ; type %1 - type { %3* } ; type %2 - type { %4 } ; type %3 - type { %5 } ; type %4 - type { %6, i32, %7 } ; type %5 - type { i8* } ; type %6 - type { i32, [12 x i8] } ; type %7 - type { %9 } ; type %8 - type { %10, %11*, i8 } ; type %9 - type { %11* } ; type %10 - type { i32, %6, i8*, %12, %13*, i8, i32, %28, %29, i32, %30, i32, i32, i32, i8*, i8*, i8, i8 } ; type %11 - type { %13* } ; type %12 - type { %14, i32, %13*, %21 } ; type %13 - type { %15, %16 } ; type %14 - type { i32 (...)** } ; type %15 - type { %17, i8* (i32)*, void (i8*)*, i8 } ; type %16 - type { i32 (...)**, i8*, i8*, i8*, i8*, i8*, i8*, %18 } ; type %17 - type { %19* } ; type %18 - type { i32, %20**, i32, %20**, i8** } ; type %19 - type { i32 (...)**, i32 } ; type %20 - type { %22, %25*, i8, i8, %17*, %26*, %27*, %27* } ; type %21 - type { i32 (...)**, i32, i32, i32, i32, i32, %23*, %24, [8 x %24], i32, %24*, %18 } ; type %22 - type { %23*, void (i32, %22*, i32)*, i32, i32 } ; type %23 - type { i8*, i32 } ; type %24 - type { i32 (...)**, %21 } ; type %25 - type { %20, i32*, i8, i32*, i32*, i16*, i8, [256 x i8], [256 x i8], i8 } ; type %26 - type { %20 } ; type %27 - type { void (%9*)*, i32 } ; type %28 - type { %15* } ; type %29 - type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i8* } ; type %30 -@AtomicOps_Internalx86CPUFeatures = external global %0 ; <%0*> [#uses=1] -internal constant [19 x i8] c"xxxxxxxxxxxxxxxxxx\00" ; <[19 x i8]*>:0 [#uses=1] -internal constant [47 x i8] c"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\00" ; <[47 x i8]*>:1 [#uses=1] - -define i8** @func6(i8 zeroext, i32, i32, %1*) nounwind { -;