diff options
author | Roman Divacky <rdivacky@FreeBSD.org> | 2009-12-01 11:07:05 +0000 |
---|---|---|
committer | Roman Divacky <rdivacky@FreeBSD.org> | 2009-12-01 11:07:05 +0000 |
commit | 06f9d4012fb8acea3e9861d5722b5965dbb724d9 (patch) | |
tree | ffe0478472eaa0686f11cb02c6df7d257b8719b0 /test | |
parent | 76e2e0ebfdd3d91b07a75822865ea3e9121a99ce (diff) |
Notes
Diffstat (limited to 'test')
143 files changed, 2453 insertions, 3518 deletions
diff --git a/test/Analysis/BasicAA/2008-12-09-GEP-IndicesAlias.ll b/test/Analysis/BasicAA/2008-12-09-GEP-IndicesAlias.ll deleted file mode 100644 index aaf9061953e75..0000000000000 --- a/test/Analysis/BasicAA/2008-12-09-GEP-IndicesAlias.ll +++ /dev/null @@ -1,16 +0,0 @@ -; RUN: opt < %s -aa-eval -print-all-alias-modref-info -disable-output |& grep {MustAlias:.*%R,.*%r} -; Make sure that basicaa thinks R and r are must aliases. - -define i32 @test(i8 * %P) { -entry: - %Q = bitcast i8* %P to {i32, i32}* - %R = getelementptr {i32, i32}* %Q, i32 0, i32 1 - %S = load i32* %R - - %q = bitcast i8* %P to {i32, i32}* - %r = getelementptr {i32, i32}* %q, i32 0, i32 1 - %s = load i32* %r - - %t = sub i32 %S, %s - ret i32 %t -} diff --git a/test/Analysis/BasicAA/gep-alias.ll b/test/Analysis/BasicAA/gep-alias.ll new file mode 100644 index 0000000000000..1ed031224713c --- /dev/null +++ b/test/Analysis/BasicAA/gep-alias.ll @@ -0,0 +1,171 @@ +; RUN: opt < %s -gvn -instcombine -S |& FileCheck %s + +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:128:128" + +; Make sure that basicaa thinks R and r are must aliases. +define i32 @test1(i8 * %P) { +entry: + %Q = bitcast i8* %P to {i32, i32}* + %R = getelementptr {i32, i32}* %Q, i32 0, i32 1 + %S = load i32* %R + + %q = bitcast i8* %P to {i32, i32}* + %r = getelementptr {i32, i32}* %q, i32 0, i32 1 + %s = load i32* %r + + %t = sub i32 %S, %s + ret i32 %t +; CHECK: @test1 +; CHECK: ret i32 0 +} + +define i32 @test2(i8 * %P) { +entry: + %Q = bitcast i8* %P to {i32, i32, i32}* + %R = getelementptr {i32, i32, i32}* %Q, i32 0, i32 1 + %S = load i32* %R + + %r = getelementptr {i32, i32, i32}* %Q, i32 0, i32 2 + store i32 42, i32* %r + + %s = load i32* %R + + %t = sub i32 %S, %s + ret i32 %t +; CHECK: @test2 +; CHECK: ret i32 0 +} + + +; This was a miscompilation. +define i32 @test3({float, {i32, i32, i32}}* %P) { +entry: + %P2 = getelementptr {float, {i32, i32, i32}}* %P, i32 0, i32 1 + %R = getelementptr {i32, i32, i32}* %P2, i32 0, i32 1 + %S = load i32* %R + + %r = getelementptr {i32, i32, i32}* %P2, i32 0, i32 2 + store i32 42, i32* %r + + %s = load i32* %R + + %t = sub i32 %S, %s + ret i32 %t +; CHECK: @test3 +; CHECK: ret i32 0 +} + + +;; This is reduced from the SmallPtrSet constructor. +%SmallPtrSetImpl = type { i8**, i32, i32, i32, [1 x i8*] } +%SmallPtrSet64 = type { %SmallPtrSetImpl, [64 x i8*] } + +define i32 @test4(%SmallPtrSet64* %P) { +entry: + %tmp2 = getelementptr inbounds %SmallPtrSet64* %P, i64 0, i32 0, i32 1 + store i32 64, i32* %tmp2, align 8 + %tmp3 = getelementptr inbounds %SmallPtrSet64* %P, i64 0, i32 0, i32 4, i64 64 + store i8* null, i8** %tmp3, align 8 + %tmp4 = load i32* %tmp2, align 8 + ret i32 %tmp4 +; CHECK: @test4 +; CHECK: ret i32 64 +} + +; P[i] != p[i+1] +define i32 @test5(i32* %p, i64 %i) { + %pi = getelementptr i32* %p, i64 %i + %i.next = add i64 %i, 1 + %pi.next = getelementptr i32* %p, i64 %i.next + %x = load i32* %pi + store i32 42, i32* %pi.next + %y = load i32* %pi + %z = sub i32 %x, %y + ret i32 %z +; CHECK: @test5 +; CHECK: ret i32 0 +} + +; P[i] != p[(i*4)|1] +define i32 @test6(i32* %p, i64 %i1) { + %i = shl i64 %i1, 2 + %pi = getelementptr i32* %p, i64 %i + %i.next = or i64 %i, 1 + %pi.next = getelementptr i32* %p, i64 %i.next + %x = load i32* %pi + store i32 42, i32* %pi.next + %y = load i32* %pi + %z = sub i32 %x, %y + ret i32 %z +; CHECK: @test6 +; CHECK: ret i32 0 +} + +; P[1] != P[i*4] +define i32 @test7(i32* %p, i64 %i) { + %pi = getelementptr i32* %p, i64 1 + %i.next = shl i64 %i, 2 + %pi.next = getelementptr i32* %p, i64 %i.next + %x = load i32* %pi + store i32 42, i32* %pi.next + %y = load i32* %pi + %z = sub i32 %x, %y + ret i32 %z +; CHECK: @test7 +; CHECK: ret i32 0 +} + +; P[zext(i)] != p[zext(i+1)] +; PR1143 +define i32 @test8(i32* %p, i32 %i) { + %i1 = zext i32 %i to i64 + %pi = getelementptr i32* %p, i64 %i1 + %i.next = add i32 %i, 1 + %i.next2 = zext i32 %i.next to i64 + %pi.next = getelementptr i32* %p, i64 %i.next2 + %x = load i32* %pi + store i32 42, i32* %pi.next + %y = load i32* %pi + %z = sub i32 %x, %y + ret i32 %z +; CHECK: @test8 +; CHECK: ret i32 0 +} + +define i8 @test9([4 x i8] *%P, i32 %i, i32 %j) { + %i2 = shl i32 %i, 2 + %i3 = add i32 %i2, 1 + ; P2 = P + 1 + 4*i + %P2 = getelementptr [4 x i8] *%P, i32 0, i32 %i3 + + %j2 = shl i32 %j, 2 + + ; P4 = P + 4*j + %P4 = getelementptr [4 x i8]* %P, i32 0, i32 %j2 + + %x = load i8* %P2 + store i8 42, i8* %P4 + %y = load i8* %P2 + %z = sub i8 %x, %y + ret i8 %z +; CHECK: @test9 +; CHECK: ret i8 0 +} + +define i8 @test10([4 x i8] *%P, i32 %i) { + %i2 = shl i32 %i, 2 + %i3 = add i32 %i2, 4 + ; P2 = P + 4 + 4*i + %P2 = getelementptr [4 x i8] *%P, i32 0, i32 %i3 + + ; P4 = P + 4*i + %P4 = getelementptr [4 x i8]* %P, i32 0, i32 %i2 + + %x = load i8* %P2 + store i8 42, i8* %P4 + %y = load i8* %P2 + %z = sub i8 %x, %y + ret i8 %z +; CHECK: @test10 +; CHECK: ret i8 0 +} diff --git a/test/Analysis/BasicAA/modref.ll b/test/Analysis/BasicAA/modref.ll index 02db861c609fe..3f642cff195ca 100644 --- a/test/Analysis/BasicAA/modref.ll +++ b/test/Analysis/BasicAA/modref.ll @@ -4,6 +4,7 @@ target datalayout = "E-p:64:64:64-a0:0:8-f32:32:32-f64:64:64-i1:8:8-i8:8:8-i16:1 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*) @@ -90,3 +91,35 @@ define void @test3a(i8* %P, i8 %X) { ret void ; CHECK: ret void } + +@G1 = external global i32 +@G2 = external global [4000 x i32] + +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) + %tmp2 = load i32* @G1 + %sub = sub i32 %tmp2, %tmp + ret i32 %sub +; CHECK: @test4 +; CHECK: load i32* @G +; CHECK: memset.i32 +; CHECK-NOT: load +; CHECK: sub i32 %tmp, %tmp +} + +; Verify that basicaa is handling variable length memcpy, knowing it doesn't +; 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) + %tmp2 = load i32* @G1 + %sub = sub i32 %tmp2, %tmp + ret i32 %sub +; CHECK: @test5 +; CHECK: load i32* @G +; CHECK: memcpy.i32 +; CHECK-NOT: load +; CHECK: sub i32 %tmp, %tmp +} + diff --git a/test/Analysis/ScalarEvolution/scev-aa.ll b/test/Analysis/ScalarEvolution/scev-aa.ll index 0dcf52977a0a1..e07aca2e3cb57 100644 --- a/test/Analysis/ScalarEvolution/scev-aa.ll +++ b/test/Analysis/ScalarEvolution/scev-aa.ll @@ -1,8 +1,8 @@ ; RUN: opt < %s -scev-aa -aa-eval -print-all-alias-modref-info \ ; RUN: |& FileCheck %s -; At the time of this writing, all of these CHECK lines are cases that -; plain -basicaa misses. +; At the time of this writing, -basicaa only misses the example of the form +; A[i+(j+1)] != A[i+j], which can arise from multi-dimensional array references. target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64" diff --git a/test/Assembler/msasm.ll b/test/Assembler/msasm.ll deleted file mode 100644 index 5e32963abd8eb..0000000000000 --- a/test/Assembler/msasm.ll +++ /dev/null @@ -1,36 +0,0 @@ -; RUN: llvm-as < %s | llvm-dis | FileCheck %s -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:128:128" -target triple = "i386-apple-darwin10.0" - -define void @test1() nounwind { -; CHECK: test1 -; CHECK: sideeffect -; CHECK-NOT: msasm - tail call void asm sideeffect "mov", "~{dirflag},~{fpsr},~{flags}"() nounwind - ret void -; CHECK: ret -} -define void @test2() nounwind { -; CHECK: test2 -; CHECK: sideeffect -; CHECK: msasm - tail call void asm sideeffect msasm "mov", "~{dirflag},~{fpsr},~{flags}"() nounwind - ret void -; CHECK: ret -} -define void @test3() nounwind { -; CHECK: test3 -; CHECK-NOT: sideeffect -; CHECK: msasm - tail call void asm msasm "mov", "~{dirflag},~{fpsr},~{flags}"() nounwind - ret void -; CHECK: ret -} -define void @test4() nounwind { -; CHECK: test4 -; CHECK-NOT: sideeffect -; CHECK-NOT: msasm - tail call void asm "mov", "~{dirflag},~{fpsr},~{flags}"() nounwind - ret void -; CHECK: ret -} diff --git a/test/CodeGen/ARM/2009-11-07-SubRegAsmPrinting.ll b/test/CodeGen/ARM/2009-11-07-SubRegAsmPrinting.ll index dd2845fe6aa59..7aae3acd76e6c 100644 --- a/test/CodeGen/ARM/2009-11-07-SubRegAsmPrinting.ll +++ b/test/CodeGen/ARM/2009-11-07-SubRegAsmPrinting.ll @@ -13,7 +13,7 @@ entry: %4 = fadd float 0.000000e+00, %3 ; <float> [#uses=1] %5 = fsub float 1.000000e+00, %4 ; <float> [#uses=1] ; CHECK: foo: -; CHECK: fconsts s{{[0-9]+}}, #112 +; CHECK: vmov.f32 s{{[0-9]+}}, #1.000000e+00 %6 = fsub float 1.000000e+00, undef ; <float> [#uses=2] %7 = fsub float %2, undef ; <float> [#uses=1] %8 = fsub float 0.000000e+00, undef ; <float> [#uses=3] diff --git a/test/CodeGen/ARM/2009-11-30-LiveVariablesBug.ll b/test/CodeGen/ARM/2009-11-30-LiveVariablesBug.ll new file mode 100644 index 0000000000000..efe74cfd13875 --- /dev/null +++ b/test/CodeGen/ARM/2009-11-30-LiveVariablesBug.ll @@ -0,0 +1,41 @@ +; RUN: llc -mtriple=armv7-eabi -mcpu=cortex-a8 < %s +; PR5614 + +%"als" = type { i32 (...)** } +%"av" = type { %"als" } +%"c" = type { %"lsm", %"Vec3", %"av"*, float, i8, float, %"lsm", i8, %"Vec3", %"Vec3", %"Vec3", float, float, float, %"Vec3", %"Vec3" } +%"lsm" = type { %"als", %"Vec3", %"Vec3", %"Vec3", %"Vec3" } +%"Vec3" = type { float, float, float } + +define arm_aapcs_vfpcc void @foo(%"c"* %this, %"Vec3"* nocapture %adjustment) { +entry: + switch i32 undef, label %return [ + i32 1, label %bb + i32 2, label %bb72 + i32 3, label %bb31 + i32 4, label %bb79 + i32 5, label %bb104 + ] + +bb: ; preds = %entry + ret void + +bb31: ; preds = %entry + %0 = call arm_aapcs_vfpcc %"Vec3" undef(%"lsm"* undef) ; <%"Vec3"> [#uses=1] + %mrv_gr69 = extractvalue %"Vec3" %0, 1 ; <float> [#uses=1] + %1 = fsub float %mrv_gr69, undef ; <float> [#uses=1] + store float %1, float* undef, align 4 + ret void + +bb72: ; preds = %entry + ret void + +bb79: ; preds = %entry + ret void + +bb104: ; preds = %entry + ret void + +return: ; preds = %entry + ret void +} diff --git a/test/CodeGen/ARM/bic.ll b/test/CodeGen/ARM/bic.ll index b16dcc6755b1f..1dfd6278287d7 100644 --- a/test/CodeGen/ARM/bic.ll +++ b/test/CodeGen/ARM/bic.ll @@ -1,4 +1,4 @@ -; RUN: llc < %s -march=arm | grep {bic\\W*r\[0-9\]*,\\W*r\[0-9\]*,\\W*r\[0-9\]*} | count 2 +; RUN: llc < %s -march=arm | FileCheck %s define i32 @f1(i32 %a, i32 %b) { %tmp = xor i32 %b, 4294967295 @@ -6,8 +6,12 @@ define i32 @f1(i32 %a, i32 %b) { ret i32 %tmp1 } +; CHECK: bic r0, r0, r1 + define i32 @f2(i32 %a, i32 %b) { %tmp = xor i32 %b, 4294967295 %tmp1 = and i32 %tmp, %a ret i32 %tmp1 } + +; CHECK: bic r0, r0, r1 diff --git a/test/CodeGen/ARM/fabss.ll b/test/CodeGen/ARM/fabss.ll index 46f136ba1fefb..e5b5791b3cda8 100644 --- a/test/CodeGen/ARM/fabss.ll +++ b/test/CodeGen/ARM/fabss.ll @@ -1,8 +1,8 @@ -; RUN: llc < %s -march=arm -mattr=+vfp2 | grep -E {vabs.f32\\W*s\[0-9\]+,\\W*s\[0-9\]+} | count 1 -; RUN: llc < %s -march=arm -mattr=+neon -arm-use-neon-fp=1 | grep -E {vabs.f32\\W*d\[0-9\]+,\\W*d\[0-9\]+} | count 1 -; RUN: llc < %s -march=arm -mattr=+neon -arm-use-neon-fp=0 | grep -E {vabs.f32\\W*s\[0-9\]+,\\W*s\[0-9\]+} | count 1 -; RUN: llc < %s -march=arm -mcpu=cortex-a8 | grep -E {vabs.f32\\W*d\[0-9\]+,\\W*d\[0-9\]+} | count 1 -; RUN: llc < %s -march=arm -mcpu=cortex-a9 | grep -E {vabs.f32\\W*s\[0-9\]+,\\W*s\[0-9\]+} | count 1 +; RUN: llc < %s -march=arm -mattr=+vfp2 | FileCheck %s -check-prefix=VFP2 +; RUN: llc < %s -march=arm -mattr=+neon -arm-use-neon-fp=1 | FileCheck %s -check-prefix=NFP1 +; RUN: llc < %s -march=arm -mattr=+neon -arm-use-neon-fp=0 | FileCheck %s -check-prefix=NFP0 +; RUN: llc < %s -march=arm -mcpu=cortex-a8 | FileCheck %s -check-prefix=CORTEXA8 +; RUN: llc < %s -march=arm -mcpu=cortex-a9 | FileCheck %s -check-prefix=CORTEXA9 define float @test(float %a, float %b) { entry: @@ -13,3 +13,16 @@ entry: } declare float @fabsf(float) + +; VFP2: test: +; VFP2: vabs.f32 s1, s1 + +; NFP1: test: +; NFP1: vabs.f32 d1, d1 +; NFP0: test: +; NFP0: vabs.f32 s1, s1 + +; CORTEXA8: test: +; CORTEXA8: vabs.f32 d1, d1 +; CORTEXA9: test: +; CORTEXA9: vabs.f32 s1, s1 diff --git a/test/CodeGen/ARM/fadds.ll b/test/CodeGen/ARM/fadds.ll index 1426a2dc883a7..db18a86eccd88 100644 --- a/test/CodeGen/ARM/fadds.ll +++ b/test/CodeGen/ARM/fadds.ll @@ -1,8 +1,8 @@ -; RUN: llc < %s -march=arm -mattr=+vfp2 | grep -E {vadd.f32\\W*s\[0-9\]+,\\W*s\[0-9\]+,\\W*s\[0-9\]+} | count 1 -; RUN: llc < %s -march=arm -mattr=+neon -arm-use-neon-fp=1 | grep -E {vadd.f32\\W*d\[0-9\]+,\\W*d\[0-9\]+,\\W*d\[0-9\]+} | count 1 -; RUN: llc < %s -march=arm -mattr=+neon -arm-use-neon-fp=0 | grep -E {vadd.f32\\W*s\[0-9\]+,\\W*s\[0-9\]+,\\W*s\[0-9\]+} | count 1 -; RUN: llc < %s -march=arm -mcpu=cortex-a8 | grep -E {vadd.f32\\W*d\[0-9\]+,\\W*d\[0-9\]+,\\W*d\[0-9\]+} | count 1 -; RUN: llc < %s -march=arm -mcpu=cortex-a9 | grep -E {vadd.f32\\W*s\[0-9\]+,\\W*s\[0-9\]+,\\W*s\[0-9\]+} | count 1 +; RUN: llc < %s -march=arm -mattr=+vfp2 | FileCheck %s -check-prefix=VFP2 +; RUN: llc < %s -march=arm -mattr=+neon -arm-use-neon-fp=1 | FileCheck %s -check-prefix=NFP1 +; RUN: llc < %s -march=arm -mattr=+neon -arm-use-neon-fp=0 | FileCheck %s -check-prefix=NFP0 +; RUN: llc < %s -march=arm -mcpu=cortex-a8 | FileCheck %s -check-prefix=CORTEXA8 +; RUN: llc < %s -march=arm -mcpu=cortex-a9 | FileCheck %s -check-prefix=CORTEXA9 define float @test(float %a, float %b) { entry: @@ -10,3 +10,15 @@ entry: ret float %0 } +; VFP2: test: +; VFP2: vadd.f32 s0, s1, s0 + +; NFP1: test: +; NFP1: vadd.f32 d0, d1, d0 +; NFP0: test: +; NFP0: vadd.f32 s0, s1, s0 + +; CORTEXA8: test: +; CORTEXA8: vadd.f32 d0, d1, d0 +; CORTEXA9: test: +; CORTEXA9: vadd.f32 s0, s1, s0 diff --git a/test/CodeGen/ARM/fdivs.ll b/test/CodeGen/ARM/fdivs.ll index 45803f6d3c32f..a5c86bf263430 100644 --- a/test/CodeGen/ARM/fdivs.ll +++ b/test/CodeGen/ARM/fdivs.ll @@ -1,8 +1,8 @@ -; RUN: llc < %s -march=arm -mattr=+vfp2 | grep -E {vdiv.f32\\W*s\[0-9\]+,\\W*s\[0-9\]+,\\W*s\[0-9\]+} | count 1 -; RUN: llc < %s -march=arm -mattr=+neon -arm-use-neon-fp=1 | grep -E {vdiv.f32\\W*s\[0-9\]+,\\W*s\[0-9\]+,\\W*s\[0-9\]+} | count 1 -; RUN: llc < %s -march=arm -mattr=+neon -arm-use-neon-fp=0 | grep -E {vdiv.f32\\W*s\[0-9\]+,\\W*s\[0-9\]+,\\W*s\[0-9\]+} | count 1 -; RUN: llc < %s -march=arm -mcpu=cortex-a8 | grep -E {vdiv.f32\\W*s\[0-9\]+,\\W*s\[0-9\]+,\\W*s\[0-9\]+} | count 1 -; RUN: llc < %s -march=arm -mcpu=cortex-a9 | grep -E {vdiv.f32\\W*s\[0-9\]+,\\W*s\[0-9\]+,\\W*s\[0-9\]+} | count 1 +; RUN: llc < %s -march=arm -mattr=+vfp2 | FileCheck %s -check-prefix=VFP2 +; RUN: llc < %s -march=arm -mattr=+neon -arm-use-neon-fp=1 | FileCheck %s -check-prefix=NFP1 +; RUN: llc < %s -march=arm -mattr=+neon -arm-use-neon-fp=0 | FileCheck %s -check-prefix=NFP0 +; RUN: llc < %s -march=arm -mcpu=cortex-a8 | FileCheck %s -check-prefix=CORTEXA8 +; RUN: llc < %s -march=arm -mcpu=cortex-a9 | FileCheck %s -check-prefix=CORTEXA9 define float @test(float %a, float %b) { entry: @@ -10,3 +10,15 @@ entry: ret float %0 } +; VFP2: test: +; VFP2: vdiv.f32 s0, s1, s0 + +; NFP1: test: +; NFP1: vdiv.f32 s0, s1, s0 +; NFP0: test: +; NFP0: vdiv.f32 s0, s1, s0 + +; CORTEXA8: test: +; CORTEXA8: vdiv.f32 s0, s1, s0 +; CORTEXA9: test: +; CORTEXA9: vdiv.f32 s0, s1, s0 diff --git a/test/CodeGen/ARM/fmacs.ll b/test/CodeGen/ARM/fmacs.ll index 57efa8264041c..904a58739370e 100644 --- a/test/CodeGen/ARM/fmacs.ll +++ b/test/CodeGen/ARM/fmacs.ll @@ -1,8 +1,8 @@ -; RUN: llc < %s -march=arm -mattr=+vfp2 | grep -E {vmla.f32\\W*s\[0-9\]+,\\W*s\[0-9\]+,\\W*s\[0-9\]+} | count 1 -; RUN: llc < %s -march=arm -mattr=+neon -arm-use-neon-fp=1 | grep -E {vmul.f32\\W*d\[0-9\]+,\\W*d\[0-9\]+,\\W*d\[0-9\]+} | count 1 -; RUN: llc < %s -march=arm -mattr=+neon -arm-use-neon-fp=0 | grep -E {vmla.f32\\W*s\[0-9\]+,\\W*s\[0-9\]+,\\W*s\[0-9\]+} | count 1 -; RUN: llc < %s -march=arm -mcpu=cortex-a8 | grep -E {vmul.f32\\W*d\[0-9\]+,\\W*d\[0-9\]+,\\W*d\[0-9\]+} | count 1 -; RUN: llc < %s -march=arm -mcpu=cortex-a9 | grep -E {vmla.f32\\W*s\[0-9\]+,\\W*s\[0-9\]+,\\W*s\[0-9\]+} | count 1 +; RUN: llc < %s -march=arm -mattr=+vfp2 | FileCheck %s -check-prefix=VFP2 +; RUN: llc < %s -march=arm -mattr=+neon -arm-use-neon-fp=1 | FileCheck %s -check-prefix=NFP1 +; RUN: llc < %s -march=arm -mattr=+neon -arm-use-neon-fp=0 | FileCheck %s -check-prefix=NFP0 +; RUN: llc < %s -march=arm -mcpu=cortex-a8 | FileCheck %s -check-prefix=CORTEXA8 +; RUN: llc < %s -march=arm -mcpu=cortex-a9 | FileCheck %s -check-prefix=CORTEXA9 define float @test(float %acc, float %a, float %b) { entry: @@ -11,3 +11,15 @@ entry: ret float %1 } +; VFP2: test: +; VFP2: vmla.f32 s2, s1, s0 + +; NFP1: test: +; NFP1: vmul.f32 d0, d1, d0 +; NFP0: test: +; NFP0: vmla.f32 s2, s1, s0 + +; CORTEXA8: test: +; CORTEXA8: vmul.f32 d0, d1, d0 +; CORTEXA9: test: +; CORTEXA9: vmla.f32 s2, s1, s0 diff --git a/test/CodeGen/ARM/fmscs.ll b/test/CodeGen/ARM/fmscs.ll index 31b5c52d38d84..7b9e029b676e8 100644 --- a/test/CodeGen/ARM/fmscs.ll +++ b/test/CodeGen/ARM/fmscs.ll @@ -1,8 +1,8 @@ -; RUN: llc < %s -march=arm -mattr=+vfp2 | grep -E {vnmls.f32\\W*s\[0-9\]+,\\W*s\[0-9\]+,\\W*s\[0-9\]+} | count 1 -; RUN: llc < %s -march=arm -mattr=+neon -arm-use-neon-fp=1 | grep -E {vnmls.f32\\W*s\[0-9\]+,\\W*s\[0-9\]+,\\W*s\[0-9\]+} | count 1 -; RUN: llc < %s -march=arm -mattr=+neon -arm-use-neon-fp=0 | grep -E {vnmls.f32\\W*s\[0-9\]+,\\W*s\[0-9\]+,\\W*s\[0-9\]+} | count 1 -; RUN: llc < %s -march=arm -mcpu=cortex-a8 | grep -E {vnmls.f32\\W*s\[0-9\]+,\\W*s\[0-9\]+,\\W*s\[0-9\]+} | count 1 -; RUN: llc < %s -march=arm -mcpu=cortex-a9 | grep -E {vnmls.f32\\W*s\[0-9\]+,\\W*s\[0-9\]+,\\W*s\[0-9\]+} | count 1 +; RUN: llc < %s -march=arm -mattr=+vfp2 | FileCheck %s -check-prefix=VFP2 +; RUN: llc < %s -march=arm -mattr=+neon -arm-use-neon-fp=1 | FileCheck %s -check-prefix=NFP1 +; RUN: llc < %s -march=arm -mattr=+neon -arm-use-neon-fp=0 | FileCheck %s -check-prefix=NFP0 +; RUN: llc < %s -march=arm -mcpu=cortex-a8 | FileCheck %s -check-prefix=CORTEXA8 +; RUN: llc < %s -march=arm -mcpu=cortex-a9 | FileCheck %s -check-prefix=CORTEXA9 define float @test(float %acc, float %a, float %b) { entry: @@ -11,3 +11,15 @@ entry: ret float %1 } +; VFP2: test: +; VFP2: vnmls.f32 s2, s1, s0 + +; NFP1: test: +; NFP1: vnmls.f32 s2, s1, s0 +; NFP0: test: +; NFP0: vnmls.f32 s2, s1, s0 + +; CORTEXA8: test: +; CORTEXA8: vnmls.f32 s2, s1, s0 +; CORTEXA9: test: +; CORTEXA9: vnmls.f32 s2, s1, s0 diff --git a/test/CodeGen/ARM/fmuls.ll b/test/CodeGen/ARM/fmuls.ll index 735263c9a3104..d3c9c82e97451 100644 --- a/test/CodeGen/ARM/fmuls.ll +++ b/test/CodeGen/ARM/fmuls.ll @@ -1,8 +1,8 @@ -; RUN: llc < %s -march=arm -mattr=+vfp2 | grep -E {vmul.f32\\W*s\[0-9\]+,\\W*s\[0-9\]+,\\W*s\[0-9\]+} | count 1 -; RUN: llc < %s -march=arm -mattr=+neon -arm-use-neon-fp=1 | grep -E {vmul.f32\\W*d\[0-9\]+,\\W*d\[0-9\]+,\\W*d\[0-9\]+} | count 1 -; RUN: llc < %s -march=arm -mattr=+neon -arm-use-neon-fp=0 | grep -E {vmul.f32\\W*s\[0-9\]+,\\W*s\[0-9\]+,\\W*s\[0-9\]+} | count 1 -; RUN: llc < %s -march=arm -mcpu=cortex-a8 | grep -E {vmul.f32\\W*d\[0-9\]+,\\W*d\[0-9\]+,\\W*d\[0-9\]+} | count 1 -; RUN: llc < %s -march=arm -mcpu=cortex-a9 | grep -E {vmul.f32\\W*s\[0-9\]+,\\W*s\[0-9\]+,\\W*s\[0-9\]+} | count 1 +; RUN: llc < %s -march=arm -mattr=+vfp2 | FileCheck %s -check-prefix=VFP2 +; RUN: llc < %s -march=arm -mattr=+neon -arm-use-neon-fp=1 | FileCheck %s -check-prefix=NFP1 +; RUN: llc < %s -march=arm -mattr=+neon -arm-use-neon-fp=0 | FileCheck %s -check-prefix=NFP0 +; RUN: llc < %s -march=arm -mcpu=cortex-a8 | FileCheck %s -check-prefix=CORTEXA8 +; RUN: llc < %s -march=arm -mcpu=cortex-a9 | FileCheck %s -check-prefix=CORTEXA9 define float @test(float %a, float %b) { entry: @@ -10,3 +10,15 @@ entry: ret float %0 } +; VFP2: test: +; VFP2: vmul.f32 s0, s1, s0 + +; NFP1: test: +; NFP1: vmul.f32 d0, d1, d0 +; NFP0: test: +; NFP0: vmul.f32 s0, s1, s0 + +; CORTEXA8: test: +; CORTEXA8: vmul.f32 d0, d1, d0 +; CORTEXA9: test: +; CORTEXA9: vmul.f32 s0, s1, s0 diff --git a/test/CodeGen/ARM/fnegs.ll b/test/CodeGen/ARM/fnegs.ll index bc3d42de75ca6..d6c22f14a4cab 100644 --- a/test/CodeGen/ARM/fnegs.ll +++ b/test/CodeGen/ARM/fnegs.ll @@ -1,8 +1,8 @@ -; RUN: llc < %s -march=arm -mattr=+vfp2 | grep -E {vneg.f32\\W*s\[0-9\]+,\\W*s\[0-9\]+} | count 2 -; RUN: llc < %s -march=arm -mattr=+neon -arm-use-neon-fp=1 | grep -E {vneg.f32\\W*d\[0-9\]+,\\W*d\[0-9\]+} | count 2 -; RUN: llc < %s -march=arm -mattr=+neon -arm-use-neon-fp=0 | grep -E {vneg.f32\\W*s\[0-9\]+,\\W*s\[0-9\]+} | count 2 -; RUN: llc < %s -march=arm -mcpu=cortex-a8 | grep -E {vneg.f32\\W*d\[0-9\]+,\\W*d\[0-9\]+} | count 2 -; RUN: llc < %s -march=arm -mcpu=cortex-a9 | grep -E {vneg.f32\\W*s\[0-9\]+,\\W*s\[0-9\]+} | count 2 +; RUN: llc < %s -march=arm -mattr=+vfp2 | FileCheck %s -check-prefix=VFP2 +; RUN: llc < %s -march=arm -mattr=+neon -arm-use-neon-fp=1 | FileCheck %s -check-prefix=NFP1 +; RUN: llc < %s -march=arm -mattr=+neon -arm-use-neon-fp=0 | FileCheck %s -check-prefix=NFP0 +; RUN: llc < %s -march=arm -mcpu=cortex-a8 | FileCheck %s -check-prefix=CORTEXA8 +; RUN: llc < %s -march=arm -mcpu=cortex-a9 | FileCheck %s -check-prefix=CORTEXA9 define float @test1(float* %a) { entry: @@ -13,6 +13,20 @@ entry: %retval = select i1 %3, float %1, float %0 ; <float> [#uses=1] ret float %retval } +; VFP2: test1: +; VFP2: vneg.f32 s1, s0 + +; NFP1: test1: +; NFP1: vneg.f32 d1, d0 + +; NFP0: test1: +; NFP0: vneg.f32 s1, s0 + +; CORTEXA8: test1: +; CORTEXA8: vneg.f32 d1, d0 + +; CORTEXA9: test1: +; CORTEXA9: vneg.f32 s1, s0 define float @test2(float* %a) { entry: @@ -23,3 +37,18 @@ entry: %retval = select i1 %3, float %1, float %0 ; <float> [#uses=1] ret float %retval } +; VFP2: test2: +; VFP2: vneg.f32 s1, s0 + +; NFP1: test2: +; NFP1: vneg.f32 d1, d0 + +; NFP0: test2: +; NFP0: vneg.f32 s1, s0 + +; CORTEXA8: test2: +; CORTEXA8: vneg.f32 d1, d0 + +; CORTEXA9: test2: +; CORTEXA9: vneg.f32 s1, s0 + diff --git a/test/CodeGen/ARM/fpconsts.ll b/test/CodeGen/ARM/fpconsts.ll index 4de18bc3b456e..710994d8d7362 100644 --- a/test/CodeGen/ARM/fpconsts.ll +++ b/test/CodeGen/ARM/fpconsts.ll @@ -3,7 +3,7 @@ define arm_apcscc float @t1(float %x) nounwind readnone optsize { entry: ; CHECK: t1: -; CHECK: fconsts s1, #16 +; CHECK: vmov.f32 s1, #4.000000e+00 %0 = fadd float %x, 4.000000e+00 ret float %0 } @@ -11,7 +11,7 @@ entry: define arm_apcscc double @t2(double %x) nounwind readnone optsize { entry: ; CHECK: t2: -; CHECK: fconstd d1, #8 +; CHECK: vmov.f64 d1, #3.000000e+00 %0 = fadd double %x, 3.000000e+00 ret double %0 } @@ -19,7 +19,7 @@ entry: define arm_apcscc double @t3(double %x) nounwind readnone optsize { entry: ; CHECK: t3: -; CHECK: fconstd d1, #170 +; CHECK: vmov.f64 d1, #-1.300000e+01 %0 = fmul double %x, -1.300000e+01 ret double %0 } @@ -27,7 +27,7 @@ entry: define arm_apcscc float @t4(float %x) nounwind readnone optsize { entry: ; CHECK: t4: -; CHECK: fconsts s1, #184 +; CHECK: vmov.f32 s1, #-2.400000e+01 %0 = fmul float %x, -2.400000e+01 ret float %0 } diff --git a/test/CodeGen/ARM/fptoint.ll b/test/CodeGen/ARM/fptoint.ll index 4cacc5de7eec1..299cb8f815036 100644 --- a/test/CodeGen/ARM/fptoint.ll +++ b/test/CodeGen/ARM/fptoint.ll @@ -1,5 +1,4 @@ -; RUN: llc < %s -march=arm -mattr=+v6,+vfp2 | grep -E {vmov\\W*r\[0-9\]+,\\W*s\[0-9\]+} | count 1 -; RUN: llc < %s -march=arm -mattr=+v6,+vfp2 | not grep fmrrd +; RUN: llc < %s -march=arm -mattr=+v6,+vfp2 | FileCheck %s @i = weak global i32 0 ; <i32*> [#uses=2] @u = weak global i32 0 ; <i32*> [#uses=2] @@ -45,3 +44,6 @@ define void @foo9(double %x) { store i16 %tmp, i16* null ret void } +; CHECK: foo9: +; CHECK: vmov r0, s0 + diff --git a/test/CodeGen/ARM/fsubs.ll b/test/CodeGen/ARM/fsubs.ll index f84ccdd480b22..ae98be3078924 100644 --- a/test/CodeGen/ARM/fsubs.ll +++ b/test/CodeGen/ARM/fsubs.ll @@ -1,6 +1,6 @@ -; RUN: llc < %s -march=arm -mattr=+vfp2 | grep -E {vsub.f32\\W*s\[0-9\]+,\\W*s\[0-9\]+,\\W*s\[0-9\]+} | count 1 -; RUN: llc < %s -march=arm -mattr=+neon -arm-use-neon-fp=1 | grep -E {vsub.f32\\W*d\[0-9\]+,\\W*d\[0-9\]+,\\W*d\[0-9\]+} | count 1 -; RUN: llc < %s -march=arm -mattr=+neon -arm-use-neon-fp=0 | grep -E {vsub.f32\\W*s\[0-9\]+,\\W*s\[0-9\]+,\\W*s\[0-9\]+} | count 1 +; RUN: llc < %s -march=arm -mattr=+vfp2 | FileCheck %s -check-prefix=VFP2 +; RUN: llc < %s -march=arm -mattr=+neon -arm-use-neon-fp=1 | FileCheck %s -check-prefix=NFP1 +; RUN: llc < %s -march=arm -mattr=+neon -arm-use-neon-fp=0 | FileCheck %s -check-prefix=NFP0 define float @test(float %a, float %b) { entry: @@ -8,3 +8,6 @@ entry: ret float %0 } +; VFP2: vsub.f32 s0, s1, s0 +; NFP1: vsub.f32 d0, d1, d0 +; NFP0: vsub.f32 s0, s1, s0 diff --git a/test/CodeGen/ARM/load-global.ll b/test/CodeGen/ARM/load-global.ll deleted file mode 100644 index 56a4a477f510c..0000000000000 --- a/test/CodeGen/ARM/load-global.ll +++ /dev/null @@ -1,15 +0,0 @@ -; RUN: llc < %s -mtriple=arm-apple-darwin -relocation-model=static | \ -; RUN: not grep {L_G\$non_lazy_ptr} -; RUN: llc < %s -mtriple=arm-apple-darwin -relocation-model=dynamic-no-pic | \ -; RUN: grep {L_G\$non_lazy_ptr} | count 2 -; RUN: llc < %s -mtriple=arm-apple-darwin -relocation-model=pic | \ -; RUN: grep {ldr.*pc} | count 1 -; RUN: llc < %s -mtriple=arm-linux-gnueabi -relocation-model=pic | \ -; RUN: grep {GOT} | count 1 - -@G = external global i32 - -define i32 @test1() { - %tmp = load i32* @G - ret i32 %tmp -} diff --git a/test/CodeGen/ARM/mls.ll b/test/CodeGen/ARM/mls.ll index 85407fa254b08..a6cdba4454516 100644 --- a/test/CodeGen/ARM/mls.ll +++ b/test/CodeGen/ARM/mls.ll @@ -1,4 +1,4 @@ -; RUN: llc < %s -march=arm -mattr=+v6t2 | grep {mls\\W*r\[0-9\],\\W*r\[0-9\],\\W*r\[0-9\],\\W*r\[0-9\]} | count 1 +; RUN: llc < %s -march=arm -mattr=+v6t2 | FileCheck %s define i32 @f1(i32 %a, i32 %b, i32 %c) { %tmp1 = mul i32 %a, %b @@ -12,3 +12,5 @@ define i32 @f2(i32 %a, i32 %b, i32 %c) { %tmp2 = sub i32 %tmp1, %c ret i32 %tmp2 } + +; CHECK: mls r0, r0, r1, r2 diff --git a/test/CodeGen/ARM/movt-movw-global.ll b/test/CodeGen/ARM/movt-movw-global.ll new file mode 100644 index 0000000000000..886ff3fea7a89 --- /dev/null +++ b/test/CodeGen/ARM/movt-movw-global.ll @@ -0,0 +1,20 @@ +; RUN: llc < %s | FileCheck %s +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 = "armv7-eabi" + +@foo = common global i32 0 ; <i32*> [#uses=1] + +define arm_aapcs_vfpcc i32* @bar1() nounwind readnone { +entry: +; CHECK: movw r0, :lower16:foo +; CHECK-NEXT: movt r0, :upper16:foo + ret i32* @foo +} + +define arm_aapcs_vfpcc void @bar2(i32 %baz) nounwind { +entry: +; CHECK: movw r1, :lower16:foo +; CHECK-NEXT: movt r1, :upper16:foo + store i32 %baz, i32* @foo, align 4 + ret void +} diff --git a/test/CodeGen/ARM/remat-2.ll b/test/CodeGen/ARM/remat-2.ll new file mode 100644 index 0000000000000..1a871d258e307 --- /dev/null +++ b/test/CodeGen/ARM/remat-2.ll @@ -0,0 +1,65 @@ +; RUN: llc < %s -march=arm -mattr=+v6,+vfp2 -stats -info-output-file - | grep "Number of re-materialization" + +define arm_apcscc i32 @main(i32 %argc, i8** nocapture %argv) nounwind { +entry: + br i1 undef, label %smvp.exit, label %bb.i3 + +bb.i3: ; preds = %bb.i3, %bb134 + br i1 undef, label %smvp.exit, label %bb.i3 + +smvp.exit: ; preds = %bb.i3 + %0 = fmul double undef, 2.400000e-03 ; <double> [#uses=2] + br i1 undef, label %bb138.preheader, label %bb159 + +bb138.preheader: ; preds = %smvp.exit + br label %bb138 + +bb138: ; preds = %bb138, %bb138.preheader + br i1 undef, label %bb138, label %bb145.loopexit + +bb142: ; preds = %bb.nph218.bb.nph218.split_crit_edge, %phi0.exit + %1 = fmul double undef, -1.200000e-03 ; <double> [#uses=1] + %2 = fadd double undef, %1 ; <double> [#uses=1] + %3 = fmul double %2, undef ; <double> [#uses=1] + %4 = fsub double 0.000000e+00, %3 ; <double> [#uses=1] + br i1 %14, label %phi1.exit, label %bb.i35 + +bb.i35: ; preds = %bb142 + %5 = call arm_apcscc double @sin(double %15) nounwind readonly ; <double> [#uses=1] + %6 = fmul double %5, 0x4031740AFA84AD8A ; <double> [#uses=1] + %7 = fsub double 1.000000e+00, undef ; <double> [#uses=1] + %8 = fdiv double %7, 6.000000e-01 ; <double> [#uses=1] + br label %phi1.exit + +phi1.exit: ; preds = %bb.i35, %bb142 + %.pn = phi double [ %6, %bb.i35 ], [ 0.000000e+00, %bb142 ] ; <double> [#uses=0] + %9 = phi double [ %8, %bb.i35 ], [ 0.000000e+00, %bb142 ] ; <double> [#uses=1] + %10 = fmul double undef, %9 ; <double> [#uses=0] + br i1 %14, label %phi0.exit, label %bb.i + +bb.i: ; preds = %phi1.exit + unreachable + +phi0.exit: ; preds = %phi1.exit + %11 = fsub double %4, undef ; <double> [#uses=1] + %12 = fadd double 0.000000e+00, %11 ; <double> [#uses=1] + store double %12, double* undef, align 4 + br label %bb142 + +bb145.loopexit: ; preds = %bb138 + br i1 undef, label %bb.nph218.bb.nph218.split_crit_edge, label %bb159 + +bb.nph218.bb.nph218.split_crit_edge: ; preds = %bb145.loopexit + %13 = fmul double %0, 0x401921FB54442D18 ; <double> [#uses=1] + %14 = fcmp ugt double %0, 6.000000e-01 ; <i1> [#uses=2] + %15 = fdiv double %13, 6.000000e-01 ; <double> [#uses=1] + br label %bb142 + +bb159: ; preds = %bb145.loopexit, %smvp.exit, %bb134 + unreachable + +bb166: ; preds = %bb127 + unreachable +} + +declare arm_apcscc double @sin(double) nounwind readonly diff --git a/test/CodeGen/ARM/remat.ll b/test/CodeGen/ARM/remat.ll index 50da997ed468a..9565c8bca6b04 100644 --- a/test/CodeGen/ARM/remat.ll +++ b/test/CodeGen/ARM/remat.ll @@ -1,5 +1,5 @@ ; RUN: llc < %s -mtriple=arm-apple-darwin -; RUN: llc < %s -mtriple=arm-apple-darwin -stats -info-output-file - | grep "Number of re-materialization" | grep 5 +; RUN: llc < %s -mtriple=arm-apple-darwin -stats -info-output-file - | grep "Number of re-materialization" | grep 3 %struct.CONTENTBOX = type { i32, i32, i32, i32, i32 } %struct.LOCBOX = type { i32, i32, i32, i32 } diff --git a/test/CodeGen/ARM/select-imm.ll b/test/CodeGen/ARM/select-imm.ll new file mode 100644 index 0000000000000..07edc91519df2 --- /dev/null +++ b/test/CodeGen/ARM/select-imm.ll @@ -0,0 +1,48 @@ +; RUN: llc < %s -march=arm | FileCheck %s --check-prefix=ARM +; RUN: llc < %s -march=arm -mattr=+thumb2 | FileCheck %s --check-prefix=T2 + +define arm_apcscc i32 @t1(i32 %c) nounwind readnone { +entry: +; ARM: t1: +; ARM: mov r1, #101 +; ARM: orr r1, r1, #1, 24 +; ARM: movgt r0, #123 + +; T2: t1: +; T2: movw r0, #357 +; T2: movgt r0, #123 + + %0 = icmp sgt i32 %c, 1 + %1 = select i1 %0, i32 123, i32 357 + ret i32 %1 +} + +define arm_apcscc i32 @t2(i32 %c) nounwind readnone { +entry: +; ARM: t2: +; ARM: mov r1, #101 +; ARM: orr r1, r1, #1, 24 +; ARM: movle r0, #123 + +; T2: t2: +; T2: movw r0, #357 +; T2: movle r0, #123 + + %0 = icmp sgt i32 %c, 1 + %1 = select i1 %0, i32 357, i32 123 + ret i32 %1 +} + +define arm_apcscc i32 @t3(i32 %a) nounwind readnone { +entry: +; ARM: t3: +; ARM: mov r0, #0 +; ARM: moveq r0, #1 + +; T2: t3: +; T2: mov r0, #0 +; T2: moveq r0, #1 + %0 = icmp eq i32 %a, 160 + %1 = zext i1 %0 to i32 + ret i32 %1 +} diff --git a/test/CodeGen/Generic/2007-06-06-CriticalEdgeLandingPad.ll b/test/CodeGen/Generic/2007-06-06-CriticalEdgeLandingPad.ll index 33a36452b2e55..1519fe665cae9 100644 --- a/test/CodeGen/Generic/2007-06-06-CriticalEdgeLandingPad.ll +++ b/test/CodeGen/Generic/2007-06-06-CriticalEdgeLandingPad.ll @@ -1,5 +1,4 @@ -; RUN: llc < %s -march=x86 -enable-eh -asm-verbose -o - | \ -; RUN: grep -A 3 {Llabel138.*Region start} | grep {3.*Action} +; RUN: llc < %s -march=x86 -enable-eh -asm-verbose -o - | FileCheck %s ; PR1422 ; PR1508 @@ -2864,3 +2863,8 @@ declare void @system__img_enum__image_enumeration_8(%struct.string___XUP* sret , declare i32 @memcmp(i8*, i8*, i32, ...) declare void @report__result() + +; CHECK: {{Llabel138.*Region start}} +; CHECK-NEXT: Region length +; CHECK-NEXT: Landing pad +; CHECK-NEXT: {{3.*Action}} diff --git a/test/CodeGen/MSP430/2009-11-20-NewNode.ll b/test/CodeGen/MSP430/2009-11-20-NewNode.ll new file mode 100644 index 0000000000000..887c7d6fa24e7 --- /dev/null +++ b/test/CodeGen/MSP430/2009-11-20-NewNode.ll @@ -0,0 +1,36 @@ +; RUN: llc -march=msp430 < %s +; PR5558 + +define i64 @_strtoll_r(i16 %base) nounwind { +entry: + br i1 undef, label %if.then, label %if.end27 + +if.then: ; preds = %do.end + br label %if.end27 + +if.end27: ; preds = %if.then, %do.end + %cond66 = select i1 undef, i64 -9223372036854775808, i64 9223372036854775807 ; <i64> [#uses=3] + %conv69 = sext i16 %base to i64 ; <i64> [#uses=1] + %div = udiv i64 %cond66, %conv69 ; <i64> [#uses=1] + br label %for.cond + +for.cond: ; preds = %if.end116, %if.end27 + br i1 undef, label %if.then152, label %if.then93 + +if.then93: ; preds = %for.cond + br i1 undef, label %if.end116, label %if.then152 + +if.end116: ; preds = %if.then93 + %cmp123 = icmp ugt i64 undef, %div ; <i1> [#uses=1] + %or.cond = or i1 undef, %cmp123 ; <i1> [#uses=0] + br label %for.cond + +if.then152: ; preds = %if.then93, %for.cond + br i1 undef, label %if.end182, label %if.then172 + +if.then172: ; preds = %if.then152 + ret i64 %cond66 + +if.end182: ; preds = %if.then152 + ret i64 %cond66 +} diff --git a/test/CodeGen/Mips/2009-11-16-CstPoolLoad.ll b/test/CodeGen/Mips/2009-11-16-CstPoolLoad.ll index f59639f66adfc..636b318014a55 100644 --- a/test/CodeGen/Mips/2009-11-16-CstPoolLoad.ll +++ b/test/CodeGen/Mips/2009-11-16-CstPoolLoad.ll @@ -4,7 +4,7 @@ target triple = "mips-unknown-linux" define float @h() nounwind readnone { entry: -; CHECK: lui $2, %hi($CPI1_0) +; CHECK: lw $2, %got($CPI1_0)($gp) ; CHECK: lwc1 $f0, %lo($CPI1_0)($2) ret float 0x400B333340000000 } diff --git a/test/CodeGen/PIC16/2009-07-17-PR4566-pic16.ll b/test/CodeGen/PIC16/2009-07-17-PR4566-pic16.ll index d7072dd9b5d76..b508026c21f6e 100644 --- a/test/CodeGen/PIC16/2009-07-17-PR4566-pic16.ll +++ b/test/CodeGen/PIC16/2009-07-17-PR4566-pic16.ll @@ -1,4 +1,4 @@ -; RUN: llc < %s -march=pic16 | grep {movf \\+@i + 0, \\+W} +; RUN: llc < %s -march=pic16 | FileCheck %s target datalayout = "e-p:16:8:8-i8:8:8-i16:8:8-i32:8:8-f32:32:32" target triple = "pic16-" @@ -27,3 +27,5 @@ entry: store i8 %conv8, i8* %tmp9 ret void } + +; CHECK: movf @i + 0, W diff --git a/test/CodeGen/PIC16/2009-11-20-NewNode.ll b/test/CodeGen/PIC16/2009-11-20-NewNode.ll new file mode 100644 index 0000000000000..d68f0f41c4a57 --- /dev/null +++ b/test/CodeGen/PIC16/2009-11-20-NewNode.ll @@ -0,0 +1,36 @@ +; RUN: llc -march=pic16 < %s +; PR5558 + +define i64 @_strtoll_r(i16 %base) nounwind { +entry: + br i1 undef, label %if.then, label %if.end27 + +if.then: ; preds = %do.end + br label %if.end27 + +if.end27: ; preds = %if.then, %do.end + %cond66 = select i1 undef, i64 -9223372036854775808, i64 9223372036854775807 ; <i64> [#uses=3] + %conv69 = sext i16 %base to i64 ; <i64> [#uses=1] + %div = udiv i64 %cond66, %conv69 ; <i64> [#uses=1] + br label %for.cond + +for.cond: ; preds = %if.end116, %if.end27 + br i1 undef, label %if.then152, label %if.then93 + +if.then93: ; preds = %for.cond + br i1 undef, label %if.end116, label %if.then152 + +if.end116: ; preds = %if.then93 + %cmp123 = icmp ugt i64 undef, %div ; <i1> [#uses=1] + %or.cond = or i1 undef, %cmp123 ; <i1> [#uses=0] + br label %for.cond + +if.then152: ; preds = %if.then93, %for.cond + br i1 undef, label %if.end182, label %if.then172 + +if.then172: ; preds = %if.then152 + ret i64 %cond66 + +if.end182: ; preds = %if.then152 + ret i64 %cond66 +} diff --git a/test/CodeGen/PowerPC/2009-11-25-ImpDefBug.ll b/test/CodeGen/PowerPC/2009-11-25-ImpDefBug.ll new file mode 100644 index 0000000000000..9a22a6f76c24d --- /dev/null +++ b/test/CodeGen/PowerPC/2009-11-25-ImpDefBug.ll @@ -0,0 +1,56 @@ +; RUN: llc < %s -mtriple=powerpc-apple-darwin9.5 -mcpu=g5 +; rdar://7422268 + +%struct..0EdgeT = type { i32, i32, float, float, i32, i32, i32, float, i32, i32 } + +define void @smooth_color_z_triangle(i32 %v0, i32 %v1, i32 %v2, i32 %pv) nounwind { +entry: + br i1 undef, label %return, label %bb14 + +bb14: ; preds = %entry + br i1 undef, label %bb15, label %return + +bb15: ; preds = %bb14 + br i1 undef, label %bb16, label %bb17 + +bb16: ; preds = %bb15 + br label %bb17 + +bb17: ; preds = %bb16, %bb15 + %0 = fcmp olt float undef, 0.000000e+00 ; <i1> [#uses=2] + %eTop.eMaj = select i1 %0, %struct..0EdgeT* undef, %struct..0EdgeT* null ; <%struct..0EdgeT*> [#uses=1] + br label %bb69 + +bb24: ; preds = %bb69 + br i1 undef, label %bb25, label %bb28 + +bb25: ; preds = %bb24 + br label %bb33 + +bb28: ; preds = %bb24 + br i1 undef, label %return, label %bb32 + +bb32: ; preds = %bb28 + br i1 %0, label %bb38, label %bb33 + +bb33: ; preds = %bb32, %bb25 + br i1 undef, label %bb34, label %bb38 + +bb34: ; preds = %bb33 + br label %bb38 + +bb38: ; preds = %bb34, %bb33, %bb32 + %eRight.08 = phi %struct..0EdgeT* [ %eTop.eMaj, %bb32 ], [ undef, %bb34 ], [ undef, %bb33 ] ; <%struct..0EdgeT*> [#uses=0] + %fdgOuter.0 = phi i32 [ %fdgOuter.1, %bb32 ], [ undef, %bb34 ], [ %fdgOuter.1, %bb33 ] ; <i32> [#uses=1] + %fz.3 = phi i32 [ %fz.2, %bb32 ], [ 2147483647, %bb34 ], [ %fz.2, %bb33 ] ; <i32> [#uses=1] + %1 = add i32 undef, 1 ; <i32> [#uses=0] + br label %bb69 + +bb69: ; preds = %bb38, %bb17 + %fdgOuter.1 = phi i32 [ undef, %bb17 ], [ %fdgOuter.0, %bb38 ] ; <i32> [#uses=2] + %fz.2 = phi i32 [ undef, %bb17 ], [ %fz.3, %bb38 ] ; <i32> [#uses=2] + br i1 undef, label %bb24, label %return + +return: ; preds = %bb69, %bb28, %bb14, %entry + ret void +} diff --git a/test/CodeGen/PowerPC/Frames-alloca.ll b/test/CodeGen/PowerPC/Frames-alloca.ll index 25fc626550d28..aed4fdbb2dcc8 100644 --- a/test/CodeGen/PowerPC/Frames-alloca.ll +++ b/test/CodeGen/PowerPC/Frames-alloca.ll @@ -6,23 +6,23 @@ ; RUN: llc < %s -march=ppc32 -mtriple=powerpc-apple-darwin8 -enable-ppc32-regscavenger | FileCheck %s -check-prefix=PPC32-RS ; RUN: llc < %s -march=ppc32 -mtriple=powerpc-apple-darwin8 -disable-fp-elim -enable-ppc32-regscavenger | FileCheck %s -check-prefix=PPC32-RS-NOFP -; CHECK-PPC32: stw r31, 20(r1) +; CHECK-PPC32: stw r31, -4(r1) ; CHECK-PPC32: lwz r1, 0(r1) -; CHECK-PPC32: lwz r31, 20(r1) -; CHECK-PPC32-NOFP: stw r31, 20(r1) +; CHECK-PPC32: lwz r31, -4(r1) +; CHECK-PPC32-NOFP: stw r31, -4(r1) ; CHECK-PPC32-NOFP: lwz r1, 0(r1) -; CHECK-PPC32-NOFP: lwz r31, 20(r1) +; CHECK-PPC32-NOFP: lwz r31, -4(r1) ; CHECK-PPC32-RS: stwu r1, -80(r1) ; CHECK-PPC32-RS-NOFP: stwu r1, -80(r1) -; CHECK-PPC64: std r31, 40(r1) -; CHECK-PPC64: stdu r1, -112(r1) +; CHECK-PPC64: std r31, -8(r1) +; CHECK-PPC64: stdu r1, -128(r1) ; CHECK-PPC64: ld r1, 0(r1) -; CHECK-PPC64: ld r31, 40(r1) -; CHECK-PPC64-NOFP: std r31, 40(r1) -; CHECK-PPC64-NOFP: stdu r1, -112(r1) +; CHECK-PPC64: ld r31, -8(r1) +; CHECK-PPC64-NOFP: std r31, -8(r1) +; CHECK-PPC64-NOFP: stdu r1, -128(r1) ; CHECK-PPC64-NOFP: ld r1, 0(r1) -; CHECK-PPC64-NOFP: ld r31, 40(r1) +; CHECK-PPC64-NOFP: ld r31, -8(r1) define i32* @f1(i32 %n) { %tmp = alloca i32, i32 %n ; <i32*> [#uses=1] diff --git a/test/CodeGen/PowerPC/Frames-large.ll b/test/CodeGen/PowerPC/Frames-large.ll index fda2e4ff9ce9b..302d3df28436d 100644 --- a/test/CodeGen/PowerPC/Frames-large.ll +++ b/test/CodeGen/PowerPC/Frames-large.ll @@ -22,13 +22,13 @@ define i32* @f1() nounwind { ; PPC32-NOFP: blr ; PPC32-FP: _f1: -; PPC32-FP: stw r31, 20(r1) +; PPC32-FP: stw r31, -4(r1) ; PPC32-FP: lis r0, -1 ; PPC32-FP: ori r0, r0, 32704 ; PPC32-FP: stwux r1, r1, r0 ; ... ; PPC32-FP: lwz r1, 0(r1) -; PPC32-FP: lwz r31, 20(r1) +; PPC32-FP: lwz r31, -4(r1) ; PPC32-FP: blr @@ -42,11 +42,11 @@ define i32* @f1() nounwind { ; PPC64-FP: _f1: -; PPC64-FP: std r31, 40(r1) +; PPC64-FP: std r31, -8(r1) ; PPC64-FP: lis r0, -1 -; PPC64-FP: ori r0, r0, 32656 +; PPC64-FP: ori r0, r0, 32640 ; PPC64-FP: stdux r1, r1, r0 ; ... ; PPC64-FP: ld r1, 0(r1) -; PPC64-FP: ld r31, 40(r1) +; PPC64-FP: ld r31, -8(r1) ; PPC64-FP: blr diff --git a/test/CodeGen/PowerPC/Frames-small.ll b/test/CodeGen/PowerPC/Frames-small.ll index 6875704cf30d5..404fdd01966cd 100644 --- a/test/CodeGen/PowerPC/Frames-small.ll +++ b/test/CodeGen/PowerPC/Frames-small.ll @@ -1,26 +1,26 @@ ; RUN: llc < %s -march=ppc32 -mtriple=powerpc-apple-darwin8 -o %t1 -; RUN not grep {stw r31, 20(r1)} %t1 +; RUN not grep {stw r31, -4(r1)} %t1 ; RUN: grep {stwu r1, -16448(r1)} %t1 ; RUN: grep {addi r1, r1, 16448} %t1 ; RUN: llc < %s -march=ppc32 | \ -; RUN: not grep {lwz r31, 20(r1)} +; RUN: not grep {lwz r31, -4(r1)} ; RUN: llc < %s -march=ppc32 -mtriple=powerpc-apple-darwin8 -disable-fp-elim \ ; RUN: -o %t2 -; RUN: grep {stw r31, 20(r1)} %t2 +; RUN: grep {stw r31, -4(r1)} %t2 ; RUN: grep {stwu r1, -16448(r1)} %t2 ; RUN: grep {addi r1, r1, 16448} %t2 -; RUN: grep {lwz r31, 20(r1)} %t2 +; RUN: grep {lwz r31, -4(r1)} %t2 ; RUN: llc < %s -march=ppc64 -mtriple=powerpc-apple-darwin8 -o %t3 -; RUN: not grep {std r31, 40(r1)} %t3 +; RUN: not grep {std r31, -8(r1)} %t3 ; RUN: grep {stdu r1, -16496(r1)} %t3 ; RUN: grep {addi r1, r1, 16496} %t3 -; RUN: not grep {ld r31, 40(r1)} %t3 +; RUN: not grep {ld r31, -8(r1)} %t3 ; RUN: llc < %s -march=ppc64 -mtriple=powerpc-apple-darwin8 -disable-fp-elim \ ; RUN: -o %t4 -; RUN: grep {std r31, 40(r1)} %t4 -; RUN: grep {stdu r1, -16496(r1)} %t4 -; RUN: grep {addi r1, r1, 16496} %t4 -; RUN: grep {ld r31, 40(r1)} %t4 +; RUN: grep {std r31, -8(r1)} %t4 +; RUN: grep {stdu r1, -16512(r1)} %t4 +; RUN: grep {addi r1, r1, 16512} %t4 +; RUN: grep {ld r31, -8(r1)} %t4 define i32* @f1() { %tmp = alloca i32, i32 4095 ; <i32*> [#uses=1] diff --git a/test/CodeGen/PowerPC/bswap-load-store.ll b/test/CodeGen/PowerPC/bswap-load-store.ll index 7eb3bbb8d308c..4f6bfc7299136 100644 --- a/test/CodeGen/PowerPC/bswap-load-store.ll +++ b/test/CodeGen/PowerPC/bswap-load-store.ll @@ -1,11 +1,6 @@ -; RUN: llc < %s -march=ppc32 | \ -; RUN: grep {stwbrx\\|lwbrx\\|sthbrx\\|lhbrx} | count 4 -; RUN: llc < %s -march=ppc32 | not grep rlwinm -; RUN: llc < %s -march=ppc32 | not grep rlwimi -; RUN: llc < %s -march=ppc64 | \ -; RUN: grep {stwbrx\\|lwbrx\\|sthbrx\\|lhbrx} | count 4 -; RUN: llc < %s -march=ppc64 | not grep rlwinm -; RUN: llc < %s -march=ppc64 | not grep rlwimi +; RUN: llc < %s -march=ppc32 | FileCheck %s -check-prefix=X32 +; RUN: llc < %s -march=ppc64 | FileCheck %s -check-prefix=X64 + define void @STWBRX(i32 %i, i8* %ptr, i32 %off) { %tmp1 = getelementptr i8* %ptr, i32 %off ; <i8*> [#uses=1] @@ -43,3 +38,14 @@ declare i32 @llvm.bswap.i32(i32) declare i16 @llvm.bswap.i16(i16) + +; X32: stwbrx +; X32: lwbrx +; X32: sthbrx +; X32: lhbrx + +; X64: stwbrx +; X64: lwbrx +; X64: sthbrx +; X64: lhbrx + diff --git a/test/CodeGen/PowerPC/ppc-prologue.ll b/test/CodeGen/PowerPC/ppc-prologue.ll index 581d010a901e4..e49dcb82c60df 100644 --- a/test/CodeGen/PowerPC/ppc-prologue.ll +++ b/test/CodeGen/PowerPC/ppc-prologue.ll @@ -2,7 +2,7 @@ define i32 @_Z4funci(i32 %a) ssp { ; CHECK: mflr r0 -; CHECK-NEXT: stw r31, 20(r1) +; CHECK-NEXT: stw r31, -4(r1) ; CHECK-NEXT: stw r0, 8(r1) ; CHECK-NEXT: stwu r1, -80(r1) ; CHECK-NEXT: Llabel1: diff --git a/test/CodeGen/PowerPC/rlwimi-keep-rsh.ll b/test/CodeGen/PowerPC/rlwimi-keep-rsh.ll new file mode 100644 index 0000000000000..7bce01c00afa3 --- /dev/null +++ b/test/CodeGen/PowerPC/rlwimi-keep-rsh.ll @@ -0,0 +1,28 @@ +; RUN: llc < %s -march=ppc32 -mtriple=powerpc-apple-darwin | FileCheck %s +; Formerly dropped the RHS of %tmp6 when constructing rlwimi. +; 7346117 + +@foo = external global i32 + +define void @xxx(i32 %a, i32 %b, i32 %c, i32 %d) nounwind optsize { +; CHECK: _xxx: +; CHECK: or +; CHECK: and +; CHECK: rlwimi +entry: + %tmp0 = ashr i32 %d, 31 + %tmp1 = and i32 %tmp0, 255 + %tmp2 = xor i32 %tmp1, 255 + %tmp3 = ashr i32 %b, 31 + %tmp4 = ashr i32 %a, 4 + %tmp5 = or i32 %tmp3, %tmp4 + %tmp6 = and i32 %tmp2, %tmp5 + %tmp7 = shl i32 %c, 8 + %tmp8 = or i32 %tmp6, %tmp7 + store i32 %tmp8, i32* @foo, align 4 + br label %return + +return: + ret void +; CHECK: blr +}
\ No newline at end of file diff --git a/test/CodeGen/PowerPC/vec_buildvector_loadstore.ll b/test/CodeGen/PowerPC/vec_buildvector_loadstore.ll new file mode 100644 index 0000000000000..015c08605fead --- /dev/null +++ b/test/CodeGen/PowerPC/vec_buildvector_loadstore.ll @@ -0,0 +1,37 @@ +; RUN: llc < %s -march=ppc32 -mtriple=powerpc-apple-darwin -mattr=+altivec | FileCheck %s +; Formerly this did byte loads and word stores. +@a = external global <16 x i8> +@b = external global <16 x i8> +@c = external global <16 x i8> + +define void @foo() nounwind ssp { +; CHECK: _foo: +; CHECK-NOT: stw +entry: + %tmp0 = load <16 x i8>* @a, align 16 + %tmp180.i = extractelement <16 x i8> %tmp0, i32 0 ; <i8> [#uses=1] + %tmp181.i = insertelement <16 x i8> <i8 0, i8 0, i8 undef, i8 undef, i8 undef, i8 undef, i8 undef, i8 undef, i8 undef, i8 undef, i8 undef, i8 undef, i8 undef, i8 undef, i8 undef, i8 undef>, i8 %tmp180.i, i32 2 ; <<16 x i8>> [#uses=1] + %tmp182.i = extractelement <16 x i8> %tmp0, i32 1 ; <i8> [#uses=1] + %tmp183.i = insertelement <16 x i8> %tmp181.i, i8 %tmp182.i, i32 3 ; <<16 x i8>> [#uses=1] + %tmp184.i = insertelement <16 x i8> %tmp183.i, i8 0, i32 4 ; <<16 x i8>> [#uses=1] + %tmp185.i = insertelement <16 x i8> %tmp184.i, i8 0, i32 5 ; <<16 x i8>> [#uses=1] + %tmp186.i = extractelement <16 x i8> %tmp0, i32 4 ; <i8> [#uses=1] + %tmp187.i = insertelement <16 x i8> %tmp185.i, i8 %tmp186.i, i32 6 ; <<16 x i8>> [#uses=1] + %tmp188.i = extractelement <16 x i8> %tmp0, i32 5 ; <i8> [#uses=1] + %tmp189.i = insertelement <16 x i8> %tmp187.i, i8 %tmp188.i, i32 7 ; <<16 x i8>> [#uses=1] + %tmp190.i = insertelement <16 x i8> %tmp189.i, i8 0, i32 8 ; <<16 x i8>> [#uses=1] + %tmp191.i = insertelement <16 x i8> %tmp190.i, i8 0, i32 9 ; <<16 x i8>> [#uses=1] + %tmp192.i = extractelement <16 x i8> %tmp0, i32 8 ; <i8> [#uses=1] + %tmp193.i = insertelement <16 x i8> %tmp191.i, i8 %tmp192.i, i32 10 ; <<16 x i8>> [#uses=1] + %tmp194.i = extractelement <16 x i8> %tmp0, i32 9 ; <i8> [#uses=1] + %tmp195.i = insertelement <16 x i8> %tmp193.i, i8 %tmp194.i, i32 11 ; <<16 x i8>> [#uses=1] + %tmp196.i = insertelement <16 x i8> %tmp195.i, i8 0, i32 12 ; <<16 x i8>> [#uses=1] + %tmp197.i = insertelement <16 x i8> %tmp196.i, i8 0, i32 13 ; <<16 x i8>> [#uses=1] +%tmp201 = shufflevector <16 x i8> %tmp197.i, <16 x i8> %tmp0, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 28, i32 29>; ModuleID = 'try.c' + store <16 x i8> %tmp201, <16 x i8>* @c, align 16 + br label %return + +return: ; preds = %bb2 + ret void +; CHECK: blr +} diff --git a/test/CodeGen/Thumb2/cross-rc-coalescing-2.ll b/test/CodeGen/Thumb2/cross-rc-coalescing-2.ll index eefbae53e720c..8f6449e8ffd5f 100644 --- a/test/CodeGen/Thumb2/cross-rc-coalescing-2.ll +++ b/test/CodeGen/Thumb2/cross-rc-coalescing-2.ll @@ -1,4 +1,4 @@ -; RUN: llc < %s -mtriple=thumbv7-apple-darwin9 -mcpu=cortex-a8 | grep vmov.f32 | count 4 +; RUN: llc < %s -mtriple=thumbv7-apple-darwin9 -mcpu=cortex-a8 | grep vmov.f32 | count 7 define arm_apcscc void @fht(float* nocapture %fz, i16 signext %n) nounwind { entry: diff --git a/test/CodeGen/Thumb2/ifcvt-neon.ll b/test/CodeGen/Thumb2/ifcvt-neon.ll new file mode 100644 index 0000000000000..c667909e3c117 --- /dev/null +++ b/test/CodeGen/Thumb2/ifcvt-neon.ll @@ -0,0 +1,29 @@ +; RUN: llc < %s -march=thumb -mcpu=cortex-a8 | FileCheck %s +; rdar://7368193 + +@a = common global float 0.000000e+00 ; <float*> [#uses=2] +@b = common global float 0.000000e+00 ; <float*> [#uses=1] + +define arm_apcscc float @t(i32 %c) nounwind { +entry: + %0 = icmp sgt i32 %c, 1 ; <i1> [#uses=1] + %1 = load float* @a, align 4 ; <float> [#uses=2] + %2 = load float* @b, align 4 ; <float> [#uses=2] + br i1 %0, label %bb, label %bb1 + +bb: ; preds = %entry +; CHECK: ite lt +; CHECK: vsublt.f32 +; CHECK-NEXT: vaddge.f32 + %3 = fadd float %1, %2 ; <float> [#uses=1] + br label %bb2 + +bb1: ; preds = %entry + %4 = fsub float %1, %2 ; <float> [#uses=1] + br label %bb2 + +bb2: ; preds = %bb1, %bb + %storemerge = phi float [ %4, %bb1 ], [ %3, %bb ] ; <float> [#uses=2] + store float %storemerge, float* @a + ret float %storemerge +} diff --git a/test/CodeGen/Thumb2/ldr-str-imm12.ll b/test/CodeGen/Thumb2/ldr-str-imm12.ll index 7cbe26097b54a..47d85b1aa0e57 100644 --- a/test/CodeGen/Thumb2/ldr-str-imm12.ll +++ b/test/CodeGen/Thumb2/ldr-str-imm12.ll @@ -22,8 +22,7 @@ define arm_apcscc %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 r9, [r7, #+32] -; CHECK-NEXT : str.w r9, [sp, #+28] +; CHECK: ldr.w r9, [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 i1 false, label %bb, label %bb20 @@ -53,7 +52,6 @@ bb420: ; preds = %bb20, %bb20 ; CHECK: str r{{[0-7]}}, [sp] ; CHECK: str r{{[0-7]}}, [sp, #+4] ; CHECK: str r{{[0-7]}}, [sp, #+8] -; CHECK: ldr r{{[0-7]}}, [sp, #+28] ; CHECK: str r{{[0-7]}}, [sp, #+24] store %union.rec* null, %union.rec** @zz_hold, align 4 store %union.rec* null, %union.rec** @zz_res, align 4 diff --git a/test/CodeGen/Thumb2/machine-licm.ll b/test/CodeGen/Thumb2/machine-licm.ll index 912939bf24eb4..9ab19e9d5a618 100644 --- a/test/CodeGen/Thumb2/machine-licm.ll +++ b/test/CodeGen/Thumb2/machine-licm.ll @@ -1,4 +1,5 @@ -; RUN: llc < %s -mtriple=thumbv7-apple-darwin -relocation-model=pic -disable-fp-elim | FileCheck %s +; RUN: llc < %s -mtriple=thumbv7-apple-darwin -disable-fp-elim | FileCheck %s +; RUN: llc < %s -mtriple=thumbv7-apple-darwin -relocation-model=pic -disable-fp-elim | FileCheck %s --check-prefix=PIC ; rdar://7353541 ; rdar://7354376 @@ -17,12 +18,24 @@ entry: bb.nph: ; preds = %entry ; CHECK: BB#1 ; CHECK: ldr.n r2, LCPI1_0 -; CHECK: add r2, pc -; CHECK: ldr r{{[0-9]+}}, [r2] +; CHECK: ldr r3, [r2] +; CHECK: ldr r3, [r3] +; CHECK: ldr r2, [r2] ; CHECK: LBB1_2 ; CHECK: LCPI1_0: ; CHECK-NOT: LCPI1_1: ; CHECK: .section + +; PIC: BB#1 +; PIC: ldr.n r2, LCPI1_0 +; PIC: add r2, pc +; PIC: ldr r3, [r2] +; PIC: ldr r3, [r3] +; PIC: ldr r2, [r2] +; PIC: LBB1_2 +; PIC: LCPI1_0: +; PIC-NOT: LCPI1_1: +; PIC: .section %.pre = load i32* @GV, align 4 ; <i32> [#uses=1] br label %bb diff --git a/test/CodeGen/Thumb2/thumb2-add3.ll b/test/CodeGen/Thumb2/thumb2-add3.ll index 8d472cb110b84..58fc33372cf6a 100644 --- a/test/CodeGen/Thumb2/thumb2-add3.ll +++ b/test/CodeGen/Thumb2/thumb2-add3.ll @@ -1,6 +1,9 @@ -; RUN: llc < %s -march=thumb -mattr=+thumb2 | grep {addw\\W*r\[0-9\],\\W*r\[0-9\],\\W*#\[0-9\]*} | grep {#4095} | count 1 +; RUN: llc < %s -march=thumb -mattr=+thumb2 | FileCheck %s define i32 @f1(i32 %a) { %tmp = add i32 %a, 4095 ret i32 %tmp } + +; CHECK: f1: +; CHECK: addw r0, r0, #4095 diff --git a/test/CodeGen/Thumb2/thumb2-and2.ll b/test/CodeGen/Thumb2/thumb2-and2.ll index 1e2666f403682..76c56d00473d3 100644 --- a/test/CodeGen/Thumb2/thumb2-and2.ll +++ b/test/CodeGen/Thumb2/thumb2-and2.ll @@ -1,31 +1,41 @@ -; RUN: llc < %s -march=thumb -mattr=+thumb2 | grep {and\\W*r\[0-9\],\\W*r\[0-9\],\\W*#\[0-9\]*} | grep {#171\\|#1179666\\|#872428544\\|#1448498774\\|#66846720} | count 5 +; RUN: llc < %s -march=thumb -mattr=+thumb2 | FileCheck %s ; 171 = 0x000000ab define i32 @f1(i32 %a) { %tmp = and i32 %a, 171 ret i32 %tmp } +; CHECK: f1: +; CHECK: and r0, r0, #171 ; 1179666 = 0x00120012 define i32 @f2(i32 %a) { %tmp = and i32 %a, 1179666 ret i32 %tmp } +; CHECK: f2: +; CHECK: and r0, r0, #1179666 ; 872428544 = 0x34003400 define i32 @f3(i32 %a) { %tmp = and i32 %a, 872428544 ret i32 %tmp } +; CHECK: f3: +; CHECK: and r0, r0, #872428544 ; 1448498774 = 0x56565656 define i32 @f4(i32 %a) { %tmp = and i32 %a, 1448498774 ret i32 %tmp } +; CHECK: f4: +; CHECK: and r0, r0, #1448498774 ; 66846720 = 0x03fc0000 define i32 @f5(i32 %a) { %tmp = and i32 %a, 66846720 ret i32 %tmp } +; CHECK: f5: +; CHECK: and r0, r0, #66846720 diff --git a/test/CodeGen/Thumb2/thumb2-cmn.ll b/test/CodeGen/Thumb2/thumb2-cmn.ll index 401c56a721393..eeaaa7fbdf918 100644 --- a/test/CodeGen/Thumb2/thumb2-cmn.ll +++ b/test/CodeGen/Thumb2/thumb2-cmn.ll @@ -1,32 +1,36 @@ -; RUN: llc < %s -march=thumb -mattr=+thumb2 | grep {cmn\\.w\\W*r\[0-9\],\\W*r\[0-9\]$} | count 4 -; RUN: llc < %s -march=thumb -mattr=+thumb2 | grep {cmn\\.w\\W*r\[0-9\],\\W*r\[0-9\],\\W*lsl\\W*#5$} | count 1 -; RUN: llc < %s -march=thumb -mattr=+thumb2 | grep {cmn\\.w\\W*r\[0-9\],\\W*r\[0-9\],\\W*lsr\\W*#6$} | count 1 -; RUN: llc < %s -march=thumb -mattr=+thumb2 | grep {cmn\\.w\\W*r\[0-9\],\\W*r\[0-9\],\\W*asr\\W*#7$} | count 1 -; RUN: llc < %s -march=thumb -mattr=+thumb2 | grep {cmn\\.w\\W*r\[0-9\],\\W*r\[0-9\],\\W*ror\\W*#8$} | count 1 +; RUN: llc < %s -march=thumb -mattr=+thumb2 | FileCheck %s define i1 @f1(i32 %a, i32 %b) { %nb = sub i32 0, %b %tmp = icmp ne i32 %a, %nb ret i1 %tmp } +; CHECK: f1: +; CHECK: cmn.w r0, r1 define i1 @f2(i32 %a, i32 %b) { %nb = sub i32 0, %b %tmp = icmp ne i32 %nb, %a ret i1 %tmp } +; CHECK: f2: +; CHECK: cmn.w r0, r1 define i1 @f3(i32 %a, i32 %b) { %nb = sub i32 0, %b %tmp = icmp eq i32 %a, %nb ret i1 %tmp } +; CHECK: f3: +; CHECK: cmn.w r0, r1 define i1 @f4(i32 %a, i32 %b) { %nb = sub i32 0, %b %tmp = icmp eq i32 %nb, %a ret i1 %tmp } +; CHECK: f4: +; CHECK: cmn.w r0, r1 define i1 @f5(i32 %a, i32 %b) { %tmp = shl i32 %b, 5 @@ -34,6 +38,8 @@ define i1 @f5(i32 %a, i32 %b) { %tmp1 = icmp eq i32 %nb, %a ret i1 %tmp1 } +; CHECK: f5: +; CHECK: cmn.w r0, r1, lsl #5 define i1 @f6(i32 %a, i32 %b) { %tmp = lshr i32 %b, 6 @@ -41,6 +47,8 @@ define i1 @f6(i32 %a, i32 %b) { %tmp1 = icmp ne i32 %nb, %a ret i1 %tmp1 } +; CHECK: f6: +; CHECK: cmn.w r0, r1, lsr #6 define i1 @f7(i32 %a, i32 %b) { %tmp = ashr i32 %b, 7 @@ -48,6 +56,8 @@ define i1 @f7(i32 %a, i32 %b) { %tmp1 = icmp eq i32 %a, %nb ret i1 %tmp1 } +; CHECK: f7: +; CHECK: cmn.w r0, r1, asr #7 define i1 @f8(i32 %a, i32 %b) { %l8 = shl i32 %a, 24 @@ -57,3 +67,6 @@ define i1 @f8(i32 %a, i32 %b) { %tmp1 = icmp ne i32 %a, %nb ret i1 %tmp1 } +; CHECK: f8: +; CHECK: cmn.w r0, r0, ror #8 + diff --git a/test/CodeGen/Thumb2/thumb2-mla.ll b/test/CodeGen/Thumb2/thumb2-mla.ll index be66425d7e66c..c4cc749ea5c7a 100644 --- a/test/CodeGen/Thumb2/thumb2-mla.ll +++ b/test/CodeGen/Thumb2/thumb2-mla.ll @@ -1,13 +1,17 @@ -; RUN: llc < %s -march=thumb -mattr=+thumb2 | grep {mla\\W*r\[0-9\],\\W*r\[0-9\],\\W*r\[0-9\],\\W*r\[0-9\]} | count 2 +; RUN: llc < %s -march=thumb -mattr=+thumb2 | FileCheck %s define i32 @f1(i32 %a, i32 %b, i32 %c) { %tmp1 = mul i32 %a, %b %tmp2 = add i32 %c, %tmp1 ret i32 %tmp2 } +; CHECK: f1: +; CHECK: mla r0, r0, r1, r2 define i32 @f2(i32 %a, i32 %b, i32 %c) { %tmp1 = mul i32 %a, %b %tmp2 = add i32 %tmp1, %c ret i32 %tmp2 } +; CHECK: f2: +; CHECK: mla r0, r0, r1, r2 diff --git a/test/CodeGen/Thumb2/thumb2-mls.ll b/test/CodeGen/Thumb2/thumb2-mls.ll index 782def966615d..fc9e6bab48cb9 100644 --- a/test/CodeGen/Thumb2/thumb2-mls.ll +++ b/test/CodeGen/Thumb2/thumb2-mls.ll @@ -1,10 +1,12 @@ -; RUN: llc < %s -march=thumb -mattr=+thumb2 | grep {mls\\W*r\[0-9\],\\W*r\[0-9\],\\W*r\[0-9\],\\W*r\[0-9\]} | count 1 +; RUN: llc < %s -march=thumb -mattr=+thumb2 | FileCheck %s define i32 @f1(i32 %a, i32 %b, i32 %c) { %tmp1 = mul i32 %a, %b %tmp2 = sub i32 %c, %tmp1 ret i32 %tmp2 } +; CHECK: f1: +; CHECK: mls r0, r0, r1, r2 ; sub doesn't commute, so no mls for this one define i32 @f2(i32 %a, i32 %b, i32 %c) { @@ -12,3 +14,6 @@ define i32 @f2(i32 %a, i32 %b, i32 %c) { %tmp2 = sub i32 %tmp1, %c ret i32 %tmp2 } +; CHECK: f2: +; CHECK: muls r0, r1 + diff --git a/test/CodeGen/Thumb2/thumb2-mov2.ll b/test/CodeGen/Thumb2/thumb2-mov2.ll deleted file mode 100644 index 64e2ddcf3fe3d..0000000000000 --- a/test/CodeGen/Thumb2/thumb2-mov2.ll +++ /dev/null @@ -1,73 +0,0 @@ -; RUN: llc < %s -march=thumb -mattr=+thumb2 | FileCheck %s - -define i32 @t2MOVTi16_ok_1(i32 %a) { -; CHECK: t2MOVTi16_ok_1: -; CHECK: movt r0, #1234 - %1 = and i32 %a, 65535 - %2 = shl i32 1234, 16 - %3 = or i32 %1, %2 - - ret i32 %3 -} - -define i32 @t2MOVTi16_test_1(i32 %a) { -; CHECK: t2MOVTi16_test_1: -; CHECK: movt r0, #1234 - %1 = shl i32 255, 8 - %2 = shl i32 1234, 8 - %3 = or i32 %1, 255 ; This give us 0xFFFF in %3 - %4 = shl i32 %2, 8 ; This gives us (1234 << 16) in %4 - %5 = and i32 %a, %3 - %6 = or i32 %4, %5 - - ret i32 %6 -} - -define i32 @t2MOVTi16_test_2(i32 %a) { -; CHECK: t2MOVTi16_test_2: -; CHECK: movt r0, #1234 - %1 = shl i32 255, 8 - %2 = shl i32 1234, 8 - %3 = or i32 %1, 255 ; This give us 0xFFFF in %3 - %4 = shl i32 %2, 6 - %5 = and i32 %a, %3 - %6 = shl i32 %4, 2 ; This gives us (1234 << 16) in %6 - %7 = or i32 %5, %6 - - ret i32 %7 -} - -define i32 @t2MOVTi16_test_3(i32 %a) { -; CHECK: t2MOVTi16_test_3: -; CHECK: movt r0, #1234 - %1 = shl i32 255, 8 - %2 = shl i32 1234, 8 - %3 = or i32 %1, 255 ; This give us 0xFFFF in %3 - %4 = shl i32 %2, 6 - %5 = and i32 %a, %3 - %6 = shl i32 %4, 2 ; This gives us (1234 << 16) in %6 - %7 = lshr i32 %6, 6 - %8 = shl i32 %7, 6 - %9 = or i32 %5, %8 - - ret i32 %9 -} - -define i32 @t2MOVTi16_test_nomatch_1(i32 %a) { -; CHECK: t2MOVTi16_test_nomatch_1: -; CHECK: #8388608 -; CHECK: movw r1, #65535 -; CHECK-NEXT: movt r1, #154 -; CHECK: #1720320 - %1 = shl i32 255, 8 - %2 = shl i32 1234, 8 - %3 = or i32 %1, 255 ; This give us 0xFFFF in %3 - %4 = shl i32 %2, 6 - %5 = and i32 %a, %3 - %6 = shl i32 %4, 2 ; This gives us (1234 << 16) in %6 - %7 = lshr i32 %6, 3 - %8 = or i32 %5, %7 - ret i32 %8 -} - - diff --git a/test/CodeGen/Thumb2/thumb2-mov3.ll b/test/CodeGen/Thumb2/thumb2-mov3.ll deleted file mode 100644 index 46af6fb16c499..0000000000000 --- a/test/CodeGen/Thumb2/thumb2-mov3.ll +++ /dev/null @@ -1,41 +0,0 @@ -; RUN: llc < %s -march=thumb -mattr=+thumb2 | FileCheck %s - -; 171 = 0x000000ab -define i32 @f1(i32 %a) { -; CHECK: f1: -; CHECK: movs r0, #171 - %tmp = add i32 0, 171 - ret i32 %tmp -} - -; 1179666 = 0x00120012 -define i32 @f2(i32 %a) { -; CHECK: f2: -; CHECK: mov.w r0, #1179666 - %tmp = add i32 0, 1179666 - ret i32 %tmp -} - -; 872428544 = 0x34003400 -define i32 @f3(i32 %a) { -; CHECK: f3: -; CHECK: mov.w r0, #872428544 - %tmp = add i32 0, 872428544 - ret i32 %tmp -} - -; 1448498774 = 0x56565656 -define i32 @f4(i32 %a) { -; CHECK: f4: -; CHECK: mov.w r0, #1448498774 - %tmp = add i32 0, 1448498774 - ret i32 %tmp -} - -; 66846720 = 0x03fc0000 -define i32 @f5(i32 %a) { -; CHECK: f5: -; CHECK: mov.w r0, #66846720 - %tmp = add i32 0, 66846720 - ret i32 %tmp -} diff --git a/test/CodeGen/Thumb2/thumb2-mov4.ll b/test/CodeGen/Thumb2/thumb2-mov4.ll deleted file mode 100644 index 06fa238263ab0..0000000000000 --- a/test/CodeGen/Thumb2/thumb2-mov4.ll +++ /dev/null @@ -1,6 +0,0 @@ -; RUN: llc < %s -march=thumb -mattr=+thumb2 | grep {movw\\W*r\[0-9\],\\W*#\[0-9\]*} | grep {#65535} | count 1 - -define i32 @f6(i32 %a) { - %tmp = add i32 0, 65535 - ret i32 %tmp -} diff --git a/test/CodeGen/Thumb2/thumb2-orn.ll b/test/CodeGen/Thumb2/thumb2-orn.ll index d4222c2b2dacc..97a3fd75f0685 100644 --- a/test/CodeGen/Thumb2/thumb2-orn.ll +++ b/test/CodeGen/Thumb2/thumb2-orn.ll @@ -1,32 +1,37 @@ -; RUN: llc < %s -march=thumb -mattr=+thumb2 | grep {orn\\W*r\[0-9\]*,\\W*r\[0-9\]*,\\W*r\[0-9\]*$} | count 4 -; RUN: llc < %s -march=thumb -mattr=+thumb2 | grep {orn\\W*r\[0-9\],\\W*r\[0-9\],\\W*r\[0-9\],\\W*lsl\\W*#5$} | count 1 -; RUN: llc < %s -march=thumb -mattr=+thumb2 | grep {orn\\W*r\[0-9\],\\W*r\[0-9\],\\W*r\[0-9\],\\W*lsr\\W*#6$} | count 1 -; RUN: llc < %s -march=thumb -mattr=+thumb2 | grep {orn\\W*r\[0-9\],\\W*r\[0-9\],\\W*r\[0-9\],\\W*asr\\W*#7$} | count 1 -; RUN: llc < %s -march=thumb -mattr=+thumb2 | grep {orn\\W*r\[0-9\],\\W*r\[0-9\],\\W*r\[0-9\],\\W*ror\\W*#8$} | count 1 +; RUN: llc < %s -march=thumb -mattr=+thumb2 | FileCheck %s + define i32 @f1(i32 %a, i32 %b) { %tmp = xor i32 %b, 4294967295 %tmp1 = or i32 %a, %tmp ret i32 %tmp1 } +; CHECK: f1: +; CHECK: orn r0, r0, r1 define i32 @f2(i32 %a, i32 %b) { %tmp = xor i32 %b, 4294967295 %tmp1 = or i32 %tmp, %a ret i32 %tmp1 } +; CHECK: f2: +; CHECK: orn r0, r0, r1 define i32 @f3(i32 %a, i32 %b) { %tmp = xor i32 4294967295, %b %tmp1 = or i32 %a, %tmp ret i32 %tmp1 } +; CHECK: f3: +; CHECK: orn r0, r0, r1 define i32 @f4(i32 %a, i32 %b) { %tmp = xor i32 4294967295, %b %tmp1 = or i32 %tmp, %a ret i32 %tmp1 } +; CHECK: f4: +; CHECK: orn r0, r0, r1 define i32 @f5(i32 %a, i32 %b) { %tmp = shl i32 %b, 5 @@ -34,6 +39,8 @@ define i32 @f5(i32 %a, i32 %b) { %tmp2 = or i32 %a, %tmp1 ret i32 %tmp2 } +; CHECK: f5: +; CHECK: orn r0, r0, r1, lsl #5 define i32 @f6(i32 %a, i32 %b) { %tmp = lshr i32 %b, 6 @@ -41,6 +48,8 @@ define i32 @f6(i32 %a, i32 %b) { %tmp2 = or i32 %a, %tmp1 ret i32 %tmp2 } +; CHECK: f6: +; CHECK: orn r0, r0, r1, lsr #6 define i32 @f7(i32 %a, i32 %b) { %tmp = ashr i32 %b, 7 @@ -48,6 +57,8 @@ define i32 @f7(i32 %a, i32 %b) { %tmp2 = or i32 %a, %tmp1 ret i32 %tmp2 } +; CHECK: f7: +; CHECK: orn r0, r0, r1, asr #7 define i32 @f8(i32 %a, i32 %b) { %l8 = shl i32 %a, 24 @@ -57,3 +68,5 @@ define i32 @f8(i32 %a, i32 %b) { %tmp2 = or i32 %a, %tmp1 ret i32 %tmp2 } +; CHECK: f8: +; CHECK: orn r0, r0, r0, ror #8 diff --git a/test/CodeGen/Thumb2/thumb2-orn2.ll b/test/CodeGen/Thumb2/thumb2-orn2.ll index 7b018826a621c..34ab3a56663c9 100644 --- a/test/CodeGen/Thumb2/thumb2-orn2.ll +++ b/test/CodeGen/Thumb2/thumb2-orn2.ll @@ -1,5 +1,5 @@ -; RUN: llc < %s -march=thumb -mattr=+thumb2 | grep {orn\\W*r\[0-9\]*,\\W*r\[0-9\]*,\\W*#\[0-9\]*} |\ -; RUN: grep {#187\\|#11141290\\|#-872363008\\|#1114112} | count 4 +; RUN: llc < %s -march=thumb -mattr=+thumb2 | FileCheck %s + ; 0x000000bb = 187 define i32 @f1(i32 %a) { @@ -7,6 +7,8 @@ define i32 @f1(i32 %a) { %tmp2 = or i32 %a, %tmp1 ret i32 %tmp2 } +; CHECK: f1: +; CHECK: orn r0, r0, #187 ; 0x00aa00aa = 11141290 define i32 @f2(i32 %a) { @@ -14,6 +16,8 @@ define i32 @f2(i32 %a) { %tmp2 = or i32 %a, %tmp1 ret i32 %tmp2 } +; CHECK: f2: +; CHECK: orn r0, r0, #11141290 ; 0xcc00cc00 = 3422604288 define i32 @f3(i32 %a) { @@ -21,6 +25,8 @@ define i32 @f3(i32 %a) { %tmp2 = or i32 %a, %tmp1 ret i32 %tmp2 } +; CHECK: f3: +; CHECK: orn r0, r0, #-872363008 ; 0x00110000 = 1114112 define i32 @f5(i32 %a) { @@ -28,3 +34,5 @@ define i32 @f5(i32 %a) { %tmp2 = or i32 %a, %tmp1 ret i32 %tmp2 } +; CHECK: f5: +; CHECK: orn r0, r0, #1114112 diff --git a/test/CodeGen/Thumb2/thumb2-orr2.ll b/test/CodeGen/Thumb2/thumb2-orr2.ll index 759a5b8dd8944..8f7a3c2a61a91 100644 --- a/test/CodeGen/Thumb2/thumb2-orr2.ll +++ b/test/CodeGen/Thumb2/thumb2-orr2.ll @@ -1,31 +1,42 @@ -; RUN: llc < %s -march=thumb -mattr=+thumb2 | grep {orr\\W*r\[0-9\]*,\\W*r\[0-9\]*,\\W*#\[0-9\]*} | grep {#187\\|#11141290\\|#-872363008\\|#1145324612\\|#1114112} | count 5 +; RUN: llc < %s -march=thumb -mattr=+thumb2 | FileCheck %s + ; 0x000000bb = 187 define i32 @f1(i32 %a) { %tmp2 = or i32 %a, 187 ret i32 %tmp2 } +; CHECK: f1: +; CHECK: orr r0, r0, #187 ; 0x00aa00aa = 11141290 define i32 @f2(i32 %a) { %tmp2 = or i32 %a, 11141290 ret i32 %tmp2 } +; CHECK: f2: +; CHECK: orr r0, r0, #11141290 ; 0xcc00cc00 = 3422604288 define i32 @f3(i32 %a) { %tmp2 = or i32 %a, 3422604288 ret i32 %tmp2 } +; CHECK: f3: +; CHECK: orr r0, r0, #-872363008 ; 0x44444444 = 1145324612 define i32 @f4(i32 %a) { %tmp2 = or i32 %a, 1145324612 ret i32 %tmp2 } +; CHECK: f4: +; CHECK: orr r0, r0, #1145324612 ; 0x00110000 = 1114112 define i32 @f5(i32 %a) { %tmp2 = or i32 %a, 1114112 ret i32 %tmp2 } +; CHECK: f5: +; CHECK: orr r0, r0, #1114112 diff --git a/test/CodeGen/Thumb2/thumb2-ror.ll b/test/CodeGen/Thumb2/thumb2-ror.ll index 01adb528087be..0200116fc31ad 100644 --- a/test/CodeGen/Thumb2/thumb2-ror.ll +++ b/test/CodeGen/Thumb2/thumb2-ror.ll @@ -1,4 +1,5 @@ -; RUN: llc < %s -march=thumb -mattr=+thumb2 | grep {ror\\.w\\W*r\[0-9\]*,\\W*r\[0-9\]*,\\W*#\[0-9\]*} | grep 22 | count 1 +; RUN: llc < %s -march=thumb -mattr=+thumb2 | FileCheck %s + define i32 @f1(i32 %a) { %l8 = shl i32 %a, 10 @@ -6,3 +7,5 @@ define i32 @f1(i32 %a) { %tmp = or i32 %l8, %r8 ret i32 %tmp } +; CHECK: f1: +; CHECK: ror.w r0, r0, #22 diff --git a/test/CodeGen/Thumb2/thumb2-rsb.ll b/test/CodeGen/Thumb2/thumb2-rsb.ll index 4611e94350343..15185be946214 100644 --- a/test/CodeGen/Thumb2/thumb2-rsb.ll +++ b/test/CodeGen/Thumb2/thumb2-rsb.ll @@ -1,30 +1,35 @@ -; RUN: llc < %s -march=thumb -mattr=+thumb2 | grep {rsb\\W*r\[0-9\],\\W*r\[0-9\],\\W*r\[0-9\],\\W*lsl\\W*#5$} | count 1 -; RUN: llc < %s -march=thumb -mattr=+thumb2 | grep {rsb\\W*r\[0-9\],\\W*r\[0-9\],\\W*r\[0-9\],\\W*lsr\\W*#6$} | count 1 -; RUN: llc < %s -march=thumb -mattr=+thumb2 | grep {rsb\\W*r\[0-9\],\\W*r\[0-9\],\\W*r\[0-9\],\\W*asr\\W*#7$} | count 1 -; RUN: llc < %s -march=thumb -mattr=+thumb2 | grep {rsb\\W*r\[0-9\],\\W*r\[0-9\],\\W*r\[0-9\],\\W*ror\\W*#8$} | count 1 +; RUN: llc < %s -march=thumb -mattr=+thumb2 | FileCheck %s -define i32 @f2(i32 %a, i32 %b) { +define i32 @f1(i32 %a, i32 %b) { %tmp = shl i32 %b, 5 %tmp1 = sub i32 %tmp, %a ret i32 %tmp1 } +; CHECK: f1: +; CHECK: rsb r0, r0, r1, lsl #5 -define i32 @f3(i32 %a, i32 %b) { +define i32 @f2(i32 %a, i32 %b) { %tmp = lshr i32 %b, 6 %tmp1 = sub i32 %tmp, %a ret i32 %tmp1 } +; CHECK: f2: +; CHECK: rsb r0, r0, r1, lsr #6 -define i32 @f4(i32 %a, i32 %b) { +define i32 @f3(i32 %a, i32 %b) { %tmp = ashr i32 %b, 7 %tmp1 = sub i32 %tmp, %a ret i32 %tmp1 } +; CHECK: f3: +; CHECK: rsb r0, r0, r1, asr #7 -define i32 @f5(i32 %a, i32 %b) { +define i32 @f4(i32 %a, i32 %b) { %l8 = shl i32 %a, 24 %r8 = lshr i32 %a, 8 %tmp = or i32 %l8, %r8 %tmp1 = sub i32 %tmp, %a ret i32 %tmp1 } +; CHECK: f4: +; CHECK: rsb r0, r0, r0, ror #8 diff --git a/test/CodeGen/Thumb2/thumb2-rsb2.ll b/test/CodeGen/Thumb2/thumb2-rsb2.ll index 84a379677ad4c..61fb619c40e76 100644 --- a/test/CodeGen/Thumb2/thumb2-rsb2.ll +++ b/test/CodeGen/Thumb2/thumb2-rsb2.ll @@ -1,31 +1,41 @@ -; RUN: llc < %s -march=thumb -mattr=+thumb2 | grep {rsb\\.w\\W*r\[0-9\],\\W*r\[0-9\],\\W*#\[0-9\]*} | grep {#171\\|#1179666\\|#872428544\\|#1448498774\\|#66846720} | count 5 +; RUN: llc < %s -march=thumb -mattr=+thumb2 | FileCheck %s ; 171 = 0x000000ab define i32 @f1(i32 %a) { %tmp = sub i32 171, %a ret i32 %tmp } +; CHECK: f1: +; CHECK: rsb.w r0, r0, #171 ; 1179666 = 0x00120012 define i32 @f2(i32 %a) { %tmp = sub i32 1179666, %a ret i32 %tmp } +; CHECK: f2: +; CHECK: rsb.w r0, r0, #1179666 ; 872428544 = 0x34003400 define i32 @f3(i32 %a) { %tmp = sub i32 872428544, %a ret i32 %tmp } +; CHECK: f3: +; CHECK: rsb.w r0, r0, #872428544 ; 1448498774 = 0x56565656 define i32 @f4(i32 %a) { %tmp = sub i32 1448498774, %a ret i32 %tmp } +; CHECK: f4: +; CHECK: rsb.w r0, r0, #1448498774 ; 66846720 = 0x03fc0000 define i32 @f5(i32 %a) { %tmp = sub i32 66846720, %a ret i32 %tmp } +; CHECK: f5: +; CHECK: rsb.w r0, r0, #66846720 diff --git a/test/CodeGen/Thumb2/thumb2-select_xform.ll b/test/CodeGen/Thumb2/thumb2-select_xform.ll index 44fa2458c1e4e..7fc2e2a49bd86 100644 --- a/test/CodeGen/Thumb2/thumb2-select_xform.ll +++ b/test/CodeGen/Thumb2/thumb2-select_xform.ll @@ -2,9 +2,9 @@ define i32 @t1(i32 %a, i32 %b, i32 %c) nounwind { ; CHECK: t1 -; CHECK: mvn r0, #-2147483648 +; CHECK: sub.w r0, r1, #-2147483648 ; CHECK: cmp r2, #10 -; CHECK: add.w r0, r1, r0 +; CHECK: sub.w r0, r0, #1 ; CHECK: it gt ; CHECK: movgt r0, r1 %tmp1 = icmp sgt i32 %c, 10 diff --git a/test/CodeGen/Thumb2/thumb2-sub2.ll b/test/CodeGen/Thumb2/thumb2-sub2.ll index 6813f76d89326..bb99cbd67fcf2 100644 --- a/test/CodeGen/Thumb2/thumb2-sub2.ll +++ b/test/CodeGen/Thumb2/thumb2-sub2.ll @@ -1,6 +1,8 @@ -; RUN: llc < %s -march=thumb -mattr=+thumb2 | grep {subw\\W*r\[0-9\],\\W*r\[0-9\],\\W*#\[0-9\]*} | grep {#4095} | count 1 +; RUN: llc < %s -march=thumb -mattr=+thumb2 | FileCheck %s define i32 @f1(i32 %a) { %tmp = sub i32 %a, 4095 ret i32 %tmp } +; CHECK: f1: +; CHECK: subw r0, r0, #4095 diff --git a/test/CodeGen/Thumb2/thumb2-teq.ll b/test/CodeGen/Thumb2/thumb2-teq.ll index 634d318c85c40..69f03837f4bf2 100644 --- a/test/CodeGen/Thumb2/thumb2-teq.ll +++ b/test/CodeGen/Thumb2/thumb2-teq.ll @@ -1,5 +1,5 @@ -; RUN: llc < %s -march=thumb -mattr=+thumb2 | grep {teq\\.w\\W*r\[0-9\],\\W*#\[0-9\]*} | \ -; RUN: grep {#187\\|#11141290\\|#-872363008\\|#1114112\\|#-572662307} | count 10 +; RUN: llc < %s -march=thumb -mattr=+thumb2 | FileCheck %s + ; 0x000000bb = 187 define i1 @f1(i32 %a) { @@ -7,6 +7,8 @@ define i1 @f1(i32 %a) { %tmp1 = icmp ne i32 %tmp, 0 ret i1 %tmp1 } +; CHECK: f1: +; CHECK: teq.w r0, #187 ; 0x000000bb = 187 define i1 @f2(i32 %a) { @@ -14,6 +16,8 @@ define i1 @f2(i32 %a) { %tmp1 = icmp eq i32 0, %tmp ret i1 %tmp1 } +; CHECK: f2: +; CHECK: teq.w r0, #187 ; 0x00aa00aa = 11141290 define i1 @f3(i32 %a) { @@ -21,6 +25,8 @@ define i1 @f3(i32 %a) { %tmp1 = icmp eq i32 %tmp, 0 ret i1 %tmp1 } +; CHECK: f3: +; CHECK: teq.w r0, #11141290 ; 0x00aa00aa = 11141290 define i1 @f4(i32 %a) { @@ -28,6 +34,8 @@ define i1 @f4(i32 %a) { %tmp1 = icmp ne i32 0, %tmp ret i1 %tmp1 } +; CHECK: f4: +; CHECK: teq.w r0, #11141290 ; 0xcc00cc00 = 3422604288 define i1 @f5(i32 %a) { @@ -35,6 +43,8 @@ define i1 @f5(i32 %a) { %tmp1 = icmp ne i32 %tmp, 0 ret i1 %tmp1 } +; CHECK: f5: +; CHECK: teq.w r0, #-872363008 ; 0xcc00cc00 = 3422604288 define i1 @f6(i32 %a) { @@ -42,6 +52,8 @@ define i1 @f6(i32 %a) { %tmp1 = icmp eq i32 0, %tmp ret i1 %tmp1 } +; CHECK: f6: +; CHECK: teq.w r0, #-872363008 ; 0xdddddddd = 3722304989 define i1 @f7(i32 %a) { @@ -49,6 +61,8 @@ define i1 @f7(i32 %a) { %tmp1 = icmp eq i32 %tmp, 0 ret i1 %tmp1 } +; CHECK: f7: +; CHECK: teq.w r0, #-572662307 ; 0xdddddddd = 3722304989 define i1 @f8(i32 %a) { @@ -56,6 +70,8 @@ define i1 @f8(i32 %a) { %tmp1 = icmp ne i32 0, %tmp ret i1 %tmp1 } +; CHECK: f8: +; CHECK: teq.w r0, #-572662307 ; 0x00110000 = 1114112 define i1 @f9(i32 %a) { @@ -63,6 +79,8 @@ define i1 @f9(i32 %a) { %tmp1 = icmp ne i32 %tmp, 0 ret i1 %tmp1 } +; CHECK: f9: +; CHECK: teq.w r0, #1114112 ; 0x00110000 = 1114112 define i1 @f10(i32 %a) { @@ -70,3 +88,6 @@ define i1 @f10(i32 %a) { %tmp1 = icmp eq i32 0, %tmp ret i1 %tmp1 } +; CHECK: f10: +; CHECK: teq.w r0, #1114112 + diff --git a/test/CodeGen/Thumb2/thumb2-tst.ll b/test/CodeGen/Thumb2/thumb2-tst.ll index 525a817fe37ef..d905217189f4a 100644 --- a/test/CodeGen/Thumb2/thumb2-tst.ll +++ b/test/CodeGen/Thumb2/thumb2-tst.ll @@ -1,5 +1,5 @@ -; RUN: llc < %s -march=thumb -mattr=+thumb2 | grep {tst\\.w\\W*r\[0-9\],\\W*#\[0-9\]*} | \ -; RUN: grep {#187\\|#11141290\\|#-872363008\\|#1114112\\|#-572662307} | count 10 +; RUN: llc < %s -march=thumb -mattr=+thumb2 | FileCheck %s + ; 0x000000bb = 187 define i1 @f1(i32 %a) { @@ -7,6 +7,8 @@ define i1 @f1(i32 %a) { %tmp1 = icmp ne i32 %tmp, 0 ret i1 %tmp1 } +; CHECK: f1: +; CHECK: tst.w r0, #187 ; 0x000000bb = 187 define i1 @f2(i32 %a) { @@ -14,6 +16,8 @@ define i1 @f2(i32 %a) { %tmp1 = icmp eq i32 0, %tmp ret i1 %tmp1 } +; CHECK: f2: +; CHECK: tst.w r0, #187 ; 0x00aa00aa = 11141290 define i1 @f3(i32 %a) { @@ -21,6 +25,8 @@ define i1 @f3(i32 %a) { %tmp1 = icmp eq i32 %tmp, 0 ret i1 %tmp1 } +; CHECK: f3: +; CHECK: tst.w r0, #11141290 ; 0x00aa00aa = 11141290 define i1 @f4(i32 %a) { @@ -28,6 +34,8 @@ define i1 @f4(i32 %a) { %tmp1 = icmp ne i32 0, %tmp ret i1 %tmp1 } +; CHECK: f4: +; CHECK: tst.w r0, #11141290 ; 0xcc00cc00 = 3422604288 define i1 @f5(i32 %a) { @@ -35,6 +43,8 @@ define i1 @f5(i32 %a) { %tmp1 = icmp ne i32 %tmp, 0 ret i1 %tmp1 } +; CHECK: f5: +; CHECK: tst.w r0, #-872363008 ; 0xcc00cc00 = 3422604288 define i1 @f6(i32 %a) { @@ -42,6 +52,8 @@ define i1 @f6(i32 %a) { %tmp1 = icmp eq i32 0, %tmp ret i1 %tmp1 } +; CHECK: f6: +; CHECK: tst.w r0, #-872363008 ; 0xdddddddd = 3722304989 define i1 @f7(i32 %a) { @@ -49,6 +61,8 @@ define i1 @f7(i32 %a) { %tmp1 = icmp eq i32 %tmp, 0 ret i1 %tmp1 } +; CHECK: f7: +; CHECK: tst.w r0, #-572662307 ; 0xdddddddd = 3722304989 define i1 @f8(i32 %a) { @@ -56,6 +70,8 @@ define i1 @f8(i32 %a) { %tmp1 = icmp ne i32 0, %tmp ret i1 %tmp1 } +; CHECK: f8: +; CHECK: tst.w r0, #-572662307 ; 0x00110000 = 1114112 define i1 @f9(i32 %a) { @@ -63,6 +79,8 @@ define i1 @f9(i32 %a) { %tmp1 = icmp ne i32 %tmp, 0 ret i1 %tmp1 } +; CHECK: f9: +; CHECK: tst.w r0, #1114112 ; 0x00110000 = 1114112 define i1 @f10(i32 %a) { @@ -70,3 +88,5 @@ define i1 @f10(i32 %a) { %tmp1 = icmp eq i32 0, %tmp ret i1 %tmp1 } +; CHECK: f10: +; CHECK: tst.w r0, #1114112 diff --git a/test/CodeGen/X86/2008-08-05-SpillerBug.ll b/test/CodeGen/X86/2008-08-05-SpillerBug.ll index 1d166f4881586..67e14ffae5e68 100644 --- a/test/CodeGen/X86/2008-08-05-SpillerBug.ll +++ b/test/CodeGen/X86/2008-08-05-SpillerBug.ll @@ -1,4 +1,4 @@ -; RUN: llc < %s -mtriple=i386-apple-darwin -disable-fp-elim -stats |& grep asm-printer | grep 59 +; RUN: llc < %s -mtriple=i386-apple-darwin -disable-fp-elim -stats |& grep asm-printer | grep 58 ; PR2568 @g_3 = external global i16 ; <i16*> [#uses=1] diff --git a/test/CodeGen/X86/2009-03-13-PHIElimBug.ll b/test/CodeGen/X86/2009-03-13-PHIElimBug.ll index 878fa51d5dc31..ad7f9f7d1c11e 100644 --- a/test/CodeGen/X86/2009-03-13-PHIElimBug.ll +++ b/test/CodeGen/X86/2009-03-13-PHIElimBug.ll @@ -1,4 +1,4 @@ -; RUN: llc < %s -march=x86 | grep -A 2 {call.*f} | grep movl +; RUN: llc < %s -march=x86 | FileCheck %s ; Check the register copy comes after the call to f and before the call to g ; PR3784 @@ -26,3 +26,7 @@ lpad: ; preds = %cont, %entry %y = phi i32 [ %a, %entry ], [ %aa, %cont ] ; <i32> [#uses=1] ret i32 %y } + +; CHECK: call{{.*}}f +; CHECK-NEXT: Llabel1: +; CHECK-NEXT: movl %eax, %esi diff --git a/test/CodeGen/X86/2009-03-16-PHIElimInLPad.ll b/test/CodeGen/X86/2009-03-16-PHIElimInLPad.ll index adbd241cd98fa..11c410173fcb2 100644 --- a/test/CodeGen/X86/2009-03-16-PHIElimInLPad.ll +++ b/test/CodeGen/X86/2009-03-16-PHIElimInLPad.ll @@ -1,4 +1,4 @@ -; RUN: llc < %s -march=x86 -asm-verbose | grep -A 1 lpad | grep Llabel +; RUN: llc < %s -march=x86 -asm-verbose | FileCheck %s ; Check that register copies in the landing pad come after the EH_LABEL declare i32 @f() @@ -19,3 +19,6 @@ lpad: ; preds = %cont, %entry %v = phi i32 [ %x, %entry ], [ %a, %cont ] ; <i32> [#uses=1] ret i32 %v } + +; CHECK: lpad +; CHECK-NEXT: Llabel diff --git a/test/CodeGen/X86/2009-09-19-SchedCustomLoweringBug.ll b/test/CodeGen/X86/2009-09-19-SchedCustomLoweringBug.ll index f3cf1d5e70197..d372da336769e 100644 --- a/test/CodeGen/X86/2009-09-19-SchedCustomLoweringBug.ll +++ b/test/CodeGen/X86/2009-09-19-SchedCustomLoweringBug.ll @@ -10,6 +10,7 @@ entry: bb: ; preds = %bb1, %entry ; CHECK: addl $1 +; CHECK-NEXT: movl %e ; CHECK-NEXT: adcl $0 %i.0 = phi i64 [ 0, %entry ], [ %0, %bb1 ] ; <i64> [#uses=1] %0 = add nsw i64 %i.0, 1 ; <i64> [#uses=2] diff --git a/test/CodeGen/X86/2009-10-08-MachineLICMBug.ll b/test/CodeGen/X86/2009-10-08-MachineLICMBug.ll index ef10ae59ab6b2..91c5440b278f2 100644 --- a/test/CodeGen/X86/2009-10-08-MachineLICMBug.ll +++ b/test/CodeGen/X86/2009-10-08-MachineLICMBug.ll @@ -1,4 +1,4 @@ -; RUN: llc < %s -mtriple=i386-apple-darwin -relocation-model=pic -stats |& grep {machine-licm} | grep 1 +; RUN: llc < %s -mtriple=i386-apple-darwin -relocation-model=pic -stats |& grep {machine-licm} | grep 2 ; rdar://7274692 %0 = type { [125 x i32] } diff --git a/test/CodeGen/X86/2009-11-25-ImpDefBug.ll b/test/CodeGen/X86/2009-11-25-ImpDefBug.ll new file mode 100644 index 0000000000000..7606c0e1acc97 --- /dev/null +++ b/test/CodeGen/X86/2009-11-25-ImpDefBug.ll @@ -0,0 +1,116 @@ +; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu +; pr5600 + +%struct..0__pthread_mutex_s = type { i32, i32, i32, i32, i32, i32, %struct.__pthread_list_t } +%struct.ASN1ObjHeader = type { i8, %"struct.__gmp_expr<__mpz_struct [1],__mpz_struct [1]>", i64, i32, i32, i32 } +%struct.ASN1Object = type { i32 (...)**, i32, i32, i64 } +%struct.ASN1Unit = type { [4 x i32 (%struct.ASN1ObjHeader*, %struct.ASN1Object**)*], %"struct.std::ASN1ObjList" } +%"struct.__gmp_expr<__mpz_struct [1],__mpz_struct [1]>" = type { [1 x %struct.__mpz_struct] } +%struct.__mpz_struct = type { i32, i32, i64* } +%struct.__pthread_list_t = type { %struct.__pthread_list_t*, %struct.__pthread_list_t* } +%struct.pthread_attr_t = type { i64, [48 x i8] } +%struct.pthread_mutex_t = type { %struct..0__pthread_mutex_s } +%struct.pthread_mutexattr_t = type { i32 } +%"struct.std::ASN1ObjList" = type { %"struct.std::_Vector_base<ASN1Object*,std::allocator<ASN1Object*> >" } +%"struct.std::_Vector_base<ASN1Object*,std::allocator<ASN1Object*> >" = type { %"struct.std::_Vector_base<ASN1Object*,std::allocator<ASN1Object*> >::_Vector_impl" } +%"struct.std::_Vector_base<ASN1Object*,std::allocator<ASN1Object*> >::_Vector_impl" = type { %struct.ASN1Object**, %struct.ASN1Object**, %struct.ASN1Object** } +%struct.xmstream = type { i8*, i64, i64, i64, i8 } + +declare void @_ZNSt6vectorIP10ASN1ObjectSaIS1_EE13_M_insert_auxEN9__gnu_cxx17__normal_iteratorIPS1_S3_EERKS1_(%"struct.std::ASN1ObjList"* nocapture, i64, %struct.ASN1Object** nocapture) + +declare i32 @_Z17LoadObjectFromBERR8xmstreamPP10ASN1ObjectPPF10ASN1StatusP13ASN1ObjHeaderS3_E(%struct.xmstream*, %struct.ASN1Object**, i32 (%struct.ASN1ObjHeader*, %struct.ASN1Object**)**) + +define i32 @_ZN8ASN1Unit4loadER8xmstreamjm18ASN1LengthEncoding(%struct.ASN1Unit* %this, %struct.xmstream* nocapture %stream, i32 %numObjects, i64 %size, i32 %lEncoding) { +entry: + br label %meshBB85 + +bb5: ; preds = %bb13.fragment.cl135, %bb13.fragment.cl, %bb.i.i.bbcl.disp, %bb13.fragment + %0 = invoke i32 @_Z17LoadObjectFromBERR8xmstreamPP10ASN1ObjectPPF10ASN1StatusP13ASN1ObjHeaderS3_E(%struct.xmstream* undef, %struct.ASN1Object** undef, i32 (%struct.ASN1ObjHeader*, %struct.ASN1Object**)** undef) + to label %meshBB81.bbcl.disp unwind label %lpad ; <i32> [#uses=0] + +bb10.fragment: ; preds = %bb13.fragment.bbcl.disp + br i1 undef, label %bb1.i.fragment.bbcl.disp, label %bb.i.i.bbcl.disp + +bb1.i.fragment: ; preds = %bb1.i.fragment.bbcl.disp + invoke void @_ZNSt6vectorIP10ASN1ObjectSaIS1_EE13_M_insert_auxEN9__gnu_cxx17__normal_iteratorIPS1_S3_EERKS1_(%"struct.std::ASN1ObjList"* undef, i64 undef, %struct.ASN1Object** undef) + to label %meshBB81.bbcl.disp unwind label %lpad + +bb13.fragment: ; preds = %bb13.fragment.bbcl.disp + br i1 undef, label %meshBB81.bbcl.disp, label %bb5 + +bb.i4: ; preds = %bb.i4.bbcl.disp, %bb1.i.fragment.bbcl.disp + ret i32 undef + +bb1.i5: ; preds = %bb.i1 + ret i32 undef + +lpad: ; preds = %bb1.i.fragment.cl, %bb1.i.fragment, %bb5 + %.SV10.phi807 = phi i8* [ undef, %bb1.i.fragment.cl ], [ undef, %bb1.i.fragment ], [ undef, %bb5 ] ; <i8*> [#uses=1] + %1 = load i8* %.SV10.phi807, align 8 ; <i8> [#uses=0] + br i1 undef, label %meshBB81.bbcl.disp, label %bb13.fragment.bbcl.disp + +bb.i1: ; preds = %bb.i.i.bbcl.disp + br i1 undef, label %meshBB81.bbcl.disp, label %bb1.i5 + +meshBB81: ; preds = %meshBB81.bbcl.disp, %bb.i.i.bbcl.disp + br i1 undef, label %meshBB81.bbcl.disp, label %bb.i4.bbcl.disp + +meshBB85: ; preds = %meshBB81.bbcl.disp, %bb.i4.bbcl.disp, %bb1.i.fragment.bbcl.disp, %bb.i.i.bbcl.disp, %entry + br i1 undef, label %meshBB81.bbcl.disp, label %bb13.fragment.bbcl.disp + +bb.i.i.bbcl.disp: ; preds = %bb10.fragment + switch i8 undef, label %meshBB85 [ + i8 123, label %bb.i1 + i8 97, label %bb5 + i8 44, label %meshBB81 + i8 1, label %meshBB81.cl + i8 51, label %meshBB81.cl141 + ] + +bb1.i.fragment.cl: ; preds = %bb1.i.fragment.bbcl.disp + invoke void @_ZNSt6vectorIP10ASN1ObjectSaIS1_EE13_M_insert_auxEN9__gnu_cxx17__normal_iteratorIPS1_S3_EERKS1_(%"struct.std::ASN1ObjList"* undef, i64 undef, %struct.ASN1Object** undef) + to label %meshBB81.bbcl.disp unwind label %lpad + +bb1.i.fragment.bbcl.disp: ; preds = %bb10.fragment + switch i8 undef, label %bb.i4 [ + i8 97, label %bb1.i.fragment + i8 7, label %bb1.i.fragment.cl + i8 35, label %bb.i4.cl + i8 77, label %meshBB85 + ] + +bb13.fragment.cl: ; preds = %bb13.fragment.bbcl.disp + br i1 undef, label %meshBB81.bbcl.disp, label %bb5 + +bb13.fragment.cl135: ; preds = %bb13.fragment.bbcl.disp + br i1 undef, label %meshBB81.bbcl.disp, label %bb5 + +bb13.fragment.bbcl.disp: ; preds = %meshBB85, %lpad + switch i8 undef, label %bb10.fragment [ + i8 67, label %bb13.fragment.cl + i8 108, label %bb13.fragment + i8 58, label %bb13.fragment.cl135 + ] + +bb.i4.cl: ; preds = %bb.i4.bbcl.disp, %bb1.i.fragment.bbcl.disp + ret i32 undef + +bb.i4.bbcl.disp: ; preds = %meshBB81.cl141, %meshBB81.cl, %meshBB81 + switch i8 undef, label %bb.i4 [ + i8 35, label %bb.i4.cl + i8 77, label %meshBB85 + ] + +meshBB81.cl: ; preds = %meshBB81.bbcl.disp, %bb.i.i.bbcl.disp + br i1 undef, label %meshBB81.bbcl.disp, label %bb.i4.bbcl.disp + +meshBB81.cl141: ; preds = %meshBB81.bbcl.disp, %bb.i.i.bbcl.disp + br i1 undef, label %meshBB81.bbcl.disp, label %bb.i4.bbcl.disp + +meshBB81.bbcl.disp: ; preds = %meshBB81.cl141, %meshBB81.cl, %bb13.fragment.cl135, %bb13.fragment.cl, %bb1.i.fragment.cl, %meshBB85, %meshBB81, %bb.i1, %lpad, %bb13.fragment, %bb1.i.fragment, %bb5 + switch i8 undef, label %meshBB85 [ + i8 44, label %meshBB81 + i8 1, label %meshBB81.cl + i8 51, label %meshBB81.cl141 + ] +} diff --git a/test/CodeGen/X86/cmp1.ll b/test/CodeGen/X86/cmp1.ll deleted file mode 100644 index d4aa399ae95d5..0000000000000 --- a/test/CodeGen/X86/cmp1.ll +++ /dev/null @@ -1,7 +0,0 @@ -; RUN: llc < %s -march=x86-64 | grep -v cmp - -define i64 @foo(i64 %x) { - %t = icmp slt i64 %x, 1 - %r = zext i1 %t to i64 - ret i64 %r -} diff --git a/test/CodeGen/X86/fp_constant_op.ll b/test/CodeGen/X86/fp_constant_op.ll index 8e823ede56a03..b3ec5388d704f 100644 --- a/test/CodeGen/X86/fp_constant_op.ll +++ b/test/CodeGen/X86/fp_constant_op.ll @@ -1,6 +1,4 @@ -; RUN: llc < %s -march=x86 -x86-asm-syntax=intel -mcpu=i486 | \ -; RUN: grep {fadd\\|fsub\\|fdiv\\|fmul} | not grep -i ST - +; RUN: llc < %s -march=x86 -x86-asm-syntax=intel -mcpu=i486 | FileCheck %s ; Test that the load of the constant is folded into the operation. @@ -8,28 +6,41 @@ define double @foo_add(double %P) { %tmp.1 = fadd double %P, 1.230000e+02 ; <double> [#uses=1] ret double %tmp.1 } +; CHECK: foo_add: +; CHECK: fadd DWORD PTR define double @foo_mul(double %P) { %tmp.1 = fmul double %P, 1.230000e+02 ; <double> [#uses=1] ret double %tmp.1 } +; CHECK: foo_mul: +; CHECK: fmul DWORD PTR define double @foo_sub(double %P) { %tmp.1 = fsub double %P, 1.230000e+02 ; <double> [#uses=1] ret double %tmp.1 } +; CHECK: foo_sub: +; CHECK: fadd DWORD PTR define double @foo_subr(double %P) { %tmp.1 = fsub double 1.230000e+02, %P ; <double> [#uses=1] ret double %tmp.1 } +; CHECK: foo_subr: +; CHECK: fsub QWORD PTR define double @foo_div(double %P) { %tmp.1 = fdiv double %P, 1.230000e+02 ; <double> [#uses=1] ret double %tmp.1 } +; CHECK: foo_div: +; CHECK: fdiv DWORD PTR define double @foo_divr(double %P) { %tmp.1 = fdiv double 1.230000e+02, %P ; <double> [#uses=1] ret double %tmp.1 } +; CHECK: foo_divr: +; CHECK: fdiv QWORD PTR + diff --git a/test/CodeGen/X86/palignr-2.ll b/test/CodeGen/X86/palignr-2.ll index 2936641e95d9f..116d4c71814a2 100644 --- a/test/CodeGen/X86/palignr-2.ll +++ b/test/CodeGen/X86/palignr-2.ll @@ -9,12 +9,12 @@ define void @t1(<2 x i64> %a, <2 x i64> %b) nounwind ssp { entry: ; CHECK: t1: ; palignr $3, %xmm1, %xmm0 - %0 = tail call <2 x i64> @llvm.x86.ssse3.palign.r.128(<2 x i64> %a, <2 x i64> %b, i32 24) nounwind readnone + %0 = tail call <2 x i64> @llvm.x86.ssse3.palign.r.128(<2 x i64> %a, <2 x i64> %b, i8 24) nounwind readnone store <2 x i64> %0, <2 x i64>* bitcast ([4 x i32]* @c to <2 x i64>*), align 16 ret void } -declare <2 x i64> @llvm.x86.ssse3.palign.r.128(<2 x i64>, <2 x i64>, i32) nounwind readnone +declare <2 x i64> @llvm.x86.ssse3.palign.r.128(<2 x i64>, <2 x i64>, i8) nounwind readnone define void @t2() nounwind ssp { entry: @@ -22,7 +22,7 @@ entry: ; palignr $4, _b, %xmm0 %0 = load <2 x i64>* bitcast ([4 x i32]* @b to <2 x i64>*), align 16 ; <<2 x i64>> [#uses=1] %1 = load <2 x i64>* bitcast ([4 x i32]* @a to <2 x i64>*), align 16 ; <<2 x i64>> [#uses=1] - %2 = tail call <2 x i64> @llvm.x86.ssse3.palign.r.128(<2 x i64> %1, <2 x i64> %0, i32 32) nounwind readnone + %2 = tail call <2 x i64> @llvm.x86.ssse3.palign.r.128(<2 x i64> %1, <2 x i64> %0, i8 32) nounwind readnone store <2 x i64> %2, <2 x i64>* bitcast ([4 x i32]* @c to <2 x i64>*), align 16 ret void } diff --git a/test/CodeGen/X86/pic-load-remat.ll b/test/CodeGen/X86/pic-load-remat.ll index d930f76a7747e..77297521cd0d8 100644 --- a/test/CodeGen/X86/pic-load-remat.ll +++ b/test/CodeGen/X86/pic-load-remat.ll @@ -1,10 +1,4 @@ ; RUN: llc < %s -mtriple=i686-apple-darwin -mattr=+sse2 -relocation-model=pic | grep psllw | grep pb -; XFAIL: * - -; This is XFAIL'd because MachineLICM is now hoisting all of the loads, and the pic -; base appears killed in the entry block when remat is making its decisions. Remat's -; simple heuristic decides against rematting because it doesn't want to extend the -; live-range of the pic base; this isn't necessarily optimal. define void @f() nounwind { entry: diff --git a/test/CodeGen/X86/scalar_widen_div.ll b/test/CodeGen/X86/scalar_widen_div.ll new file mode 100644 index 0000000000000..fc67e4417c4a8 --- /dev/null +++ b/test/CodeGen/X86/scalar_widen_div.ll @@ -0,0 +1,154 @@ +; RUN: llc < %s -disable-mmx -march=x86-64 -mattr=+sse42 | FileCheck %s + +; Verify when widening a divide/remainder operation, we only generate a +; divide/rem per element since divide/remainder can trap. + +define void @vectorDiv (<2 x i32> addrspace(1)* %nsource, <2 x i32> addrspace(1)* %dsource, <2 x i32> addrspace(1)* %qdest) nounwind { +; CHECK: idivl +; CHECK: idivl +; CHECK-NOT: idivl +; CHECK: ret +entry: + %nsource.addr = alloca <2 x i32> addrspace(1)*, align 4 + %dsource.addr = alloca <2 x i32> addrspace(1)*, align 4 + %qdest.addr = alloca <2 x i32> addrspace(1)*, align 4 + %index = alloca i32, align 4 + store <2 x i32> addrspace(1)* %nsource, <2 x i32> addrspace(1)** %nsource.addr + store <2 x i32> addrspace(1)* %dsource, <2 x i32> addrspace(1)** %dsource.addr + store <2 x i32> addrspace(1)* %qdest, <2 x i32> addrspace(1)** %qdest.addr + %tmp = load <2 x i32> addrspace(1)** %qdest.addr + %tmp1 = load i32* %index + %arrayidx = getelementptr <2 x i32> addrspace(1)* %tmp, i32 %tmp1 + %tmp2 = load <2 x i32> addrspace(1)** %nsource.addr + %tmp3 = load i32* %index + %arrayidx4 = getelementptr <2 x i32> addrspace(1)* %tmp2, i32 %tmp3 + %tmp5 = load <2 x i32> addrspace(1)* %arrayidx4 + %tmp6 = load <2 x i32> addrspace(1)** %dsource.addr + %tmp7 = load i32* %index + %arrayidx8 = getelementptr <2 x i32> addrspace(1)* %tmp6, i32 %tmp7 + %tmp9 = load <2 x i32> addrspace(1)* %arrayidx8 + %tmp10 = sdiv <2 x i32> %tmp5, %tmp9 + store <2 x i32> %tmp10, <2 x i32> addrspace(1)* %arrayidx + ret void +} + +define <3 x i8> @test_char_div(<3 x i8> %num, <3 x i8> %div) { +; CHECK: idivb +; CHECK: idivb +; CHECK: idivb +; CHECK-NOT: idivb +; CHECK: ret + %div.r = sdiv <3 x i8> %num, %div + ret <3 x i8> %div.r +} + +define <3 x i8> @test_uchar_div(<3 x i8> %num, <3 x i8> %div) { +; CHECK: divb +; CHECK: divb +; CHECK: divb +; CHECK-NOT: divb +; CHECK: ret + %div.r = udiv <3 x i8> %num, %div + ret <3 x i8> %div.r +} + +define <5 x i16> @test_short_div(<5 x i16> %num, <5 x i16> %div) { +; CHECK: idivw +; CHECK: idivw +; CHECK: idivw +; CHECK: idivw +; CHECK: idivw +; CHECK-NOT: idivw +; CHECK: ret + %div.r = sdiv <5 x i16> %num, %div + ret <5 x i16> %div.r +} + +define <4 x i16> @test_ushort_div(<4 x i16> %num, <4 x i16> %div) { +; CHECK: divw +; CHECK: divw +; CHECK: divw +; CHECK: divw +; CHECK-NOT: divw +; CHECK: ret + %div.r = udiv <4 x i16> %num, %div + ret <4 x i16> %div.r +} + +define <3 x i32> @test_uint_div(<3 x i32> %num, <3 x i32> %div) { +; CHECK: divl +; CHECK: divl +; CHECK: divl +; CHECK-NOT: divl +; CHECK: ret + %div.r = udiv <3 x i32> %num, %div + ret <3 x i32> %div.r +} + +define <3 x i64> @test_long_div(<3 x i64> %num, <3 x i64> %div) { +; CHECK: idivq +; CHECK: idivq +; CHECK: idivq +; CHECK-NOT: idivq +; CHECK: ret + %div.r = sdiv <3 x i64> %num, %div + ret <3 x i64> %div.r +} + +define <3 x i64> @test_ulong_div(<3 x i64> %num, <3 x i64> %div) { +; CHECK: divq +; CHECK: divq +; CHECK: divq +; CHECK-NOT: divq +; CHECK: ret + %div.r = udiv <3 x i64> %num, %div + ret <3 x i64> %div.r +} + + +define <4 x i8> @test_char_rem(<4 x i8> %num, <4 x i8> %rem) { +; CHECK: idivb +; CHECK: idivb +; CHECK: idivb +; CHECK: idivb +; CHECK-NOT: idivb +; CHECK: ret + %rem.r = srem <4 x i8> %num, %rem + ret <4 x i8> %rem.r +} + +define <5 x i16> @test_short_rem(<5 x i16> %num, <5 x i16> %rem) { +; CHECK: idivw +; CHECK: idivw +; CHECK: idivw +; CHECK: idivw +; CHECK: idivw +; CHECK-NOT: idivw +; CHECK: ret + %rem.r = srem <5 x i16> %num, %rem + ret <5 x i16> %rem.r +} + +define <4 x i32> @test_uint_rem(<4 x i32> %num, <4 x i32> %rem) { +; CHECK: idivl +; CHECK: idivl +; CHECK: idivl +; CHECK: idivl +; CHECK-NOT: idivl +; CHECK: ret + %rem.r = srem <4 x i32> %num, %rem + ret <4 x i32> %rem.r +} + + +define <5 x i64> @test_ulong_rem(<5 x i64> %num, <5 x i64> %rem) { +; CHECK: divq +; CHECK: divq +; CHECK: divq +; CHECK: divq +; CHECK: divq +; CHECK-NOT: divq +; CHECK: ret + %rem.r = urem <5 x i64> %num, %rem + ret <5 x i64> %rem.r +} diff --git a/test/CodeGen/X86/tailcall-fastisel.ll b/test/CodeGen/X86/tailcall-fastisel.ll new file mode 100644 index 0000000000000..d54fb4115b078 --- /dev/null +++ b/test/CodeGen/X86/tailcall-fastisel.ll @@ -0,0 +1,13 @@ +; RUN: llc < %s -march=x86-64 -tailcallopt -fast-isel | grep TAILCALL + +; Fast-isel shouldn't attempt to handle this tail call, and it should +; cleanly terminate instruction selection in the block after it's +; done to avoid emitting invalid MachineInstrs. + +%0 = type { i64, i32, i8* } + +define fastcc i8* @"visit_array_aux<`Reference>"(%0 %arg, i32 %arg1) nounwind { +fail: ; preds = %entry + %tmp20 = tail call fastcc i8* @"visit_array_aux<`Reference>"(%0 %arg, i32 undef) ; <i8*> [#uses=1] + ret i8* %tmp20 +} diff --git a/test/CodeGen/X86/tailcall-stackalign.ll b/test/CodeGen/X86/tailcall-stackalign.ll index 110472c8b9f3b..0233139e80828 100644 --- a/test/CodeGen/X86/tailcall-stackalign.ll +++ b/test/CodeGen/X86/tailcall-stackalign.ll @@ -1,4 +1,4 @@ -; RUN: llc < %s -mtriple=i686-unknown-linux -tailcallopt | grep -A 1 call | grep -A 1 tailcaller | grep subl | grep 12 +; RUN: llc < %s -mtriple=i686-unknown-linux -tailcallopt | FileCheck %s ; Linux has 8 byte alignment so the params cause stack size 20 when tailcallopt ; is enabled, ensure that a normal fastcc call has matching stack size @@ -19,6 +19,5 @@ define i32 @main(i32 %argc, i8** %argv) { ret i32 0 } - - - +; CHECK: call tailcaller +; CHECK-NEXT: subl $12 diff --git a/test/CodeGen/X86/trunc-to-bool.ll b/test/CodeGen/X86/trunc-to-bool.ll index 374d404a968cf..bfab1aef90143 100644 --- a/test/CodeGen/X86/trunc-to-bool.ll +++ b/test/CodeGen/X86/trunc-to-bool.ll @@ -1,13 +1,13 @@ ; An integer truncation to i1 should be done with an and instruction to make ; sure only the LSBit survives. Test that this is the case both for a returned ; value and as the operand of a branch. -; RUN: llc < %s -march=x86 | grep {\\(and\\)\\|\\(test.*\\\$1\\)} | \ -; RUN: count 5 +; RUN: llc < %s -march=x86 | FileCheck %s define i1 @test1(i32 %X) zeroext { %Y = trunc i32 %X to i1 ret i1 %Y } +; CHECK: andl $1, %eax define i1 @test2(i32 %val, i32 %mask) { entry: @@ -20,6 +20,7 @@ ret_true: ret_false: ret i1 false } +; CHECK: testb $1, %al define i32 @test3(i8* %ptr) { %val = load i8* %ptr @@ -30,6 +31,7 @@ cond_true: cond_false: ret i32 42 } +; CHECK: testb $1, %al define i32 @test4(i8* %ptr) { %tmp = ptrtoint i8* %ptr to i1 @@ -39,6 +41,7 @@ cond_true: cond_false: ret i32 42 } +; CHECK: testb $1, %al define i32 @test6(double %d) { %tmp = fptosi double %d to i1 @@ -48,4 +51,4 @@ cond_true: cond_false: ret i32 42 } - +; CHECK: testb $1 diff --git a/test/Feature/md_on_instruction2.ll b/test/Feature/md_on_instruction2.ll deleted file mode 100644 index da9e49ebfb2f3..0000000000000 --- a/test/Feature/md_on_instruction2.ll +++ /dev/null @@ -1,22 +0,0 @@ -; RUN: llvm-as < %s | llvm-dis | grep " !dbg " | count 4 -define i32 @foo() nounwind ssp { -entry: - %retval = alloca i32 ; <i32*> [#uses=2] - call void @llvm.dbg.func.start(metadata !0) - store i32 42, i32* %retval, !dbg !3 - br label %0, !dbg !3 - -; <label>:0 ; preds = %entry - call void @llvm.dbg.region.end(metadata !0) - %1 = load i32* %retval, !dbg !3 ; <i32> [#uses=1] - ret i32 %1, !dbg !3 -} - -declare void @llvm.dbg.func.start(metadata) nounwind readnone - -declare void @llvm.dbg.region.end(metadata) nounwind readnone - -!0 = metadata !{i32 458798, i32 0, metadata !1, metadata !"foo", metadata !"foo", metadata !"foo", metadata !1, i32 1, metadata !2, i1 false, i1 true} -!1 = metadata !{i32 458769, i32 0, i32 12, metadata !"foo.c", metadata !"/tmp", metadata !"clang 1.0", i1 true, i1 false, metadata !"", i32 0} -!2 = metadata !{i32 458788, metadata !1, metadata !"int", metadata !1, i32 0, i64 32, i64 32, i64 0, i32 0, i32 5} -!3 = metadata !{i32 1, i32 13, metadata !1, metadata !1} diff --git a/test/Feature/testswitch.ll b/test/Feature/testswitch.ll deleted file mode 100644 index 417f56b58d0b1..0000000000000 --- a/test/Feature/testswitch.ll +++ /dev/null @@ -1,26 +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 - - %int = type i32 - -define i32 @squared(i32 %i0) { - switch i32 %i0, label %Default [ - i32 1, label %Case1 - i32 2, label %Case2 - i32 4, label %Case4 - ] - -Default: ; preds = %0 - ret i32 -1 - -Case1: ; preds = %0 - ret i32 1 - -Case2: ; preds = %0 - ret i32 4 - -Case4: ; preds = %0 - ret i32 16 -} - diff --git a/test/FrontendC++/2006-11-30-Pubnames.cpp b/test/FrontendC++/2006-11-30-Pubnames.cpp index 48ad827f76c83..64214a8d0094f 100644 --- a/test/FrontendC++/2006-11-30-Pubnames.cpp +++ b/test/FrontendC++/2006-11-30-Pubnames.cpp @@ -7,7 +7,11 @@ // RUN: %llvmdsymutil %t.exe // RUN: echo {break main\nrun\np Pubnames::pubname} > %t.in // RUN: gdb -q -batch -n -x %t.in %t.exe | tee %t.out | grep {\$1 = 10} -// XFAIL: alpha,arm +// +// XFAIL: alpha,arm,powerpc-apple-darwin +// FIXME: This doesn't work for PPC Darwin because we turned off debugging on +// that platform. + struct Pubnames { static int pubname; }; diff --git a/test/FrontendC++/2009-08-03-Varargs.cpp b/test/FrontendC++/2009-08-03-Varargs.cpp deleted file mode 100644 index cea3894c84e68..0000000000000 --- a/test/FrontendC++/2009-08-03-Varargs.cpp +++ /dev/null @@ -1,5 +0,0 @@ -// RUN: %llvmgxx %s -S -emit-llvm -o - | grep _Z1az\(\.\.\.\) -// XFAIL: * -// PR4678 -void a(...) { -} diff --git a/test/FrontendC++/m64-ptr.cpp b/test/FrontendC++/m64-ptr.cpp new file mode 100644 index 0000000000000..7685cfeaa026c --- /dev/null +++ b/test/FrontendC++/m64-ptr.cpp @@ -0,0 +1,18 @@ +// RUN: %llvmgxx %s -S -o - | FileCheck %s + +// Make sure pointers are passed as pointers, not converted to int. +// The first load should be of type i8** in either 32 or 64 bit mode. +// This formerly happened on x86-64, 7375899. + +class StringRef { +public: + const char *Data; + long Len; +}; +void foo(StringRef X); +void bar(StringRef &A) { +// CHECK: @_Z3barR9StringRef +// CHECK: load i8** + foo(A); +// CHECK: ret void +} diff --git a/test/FrontendC++/msasm.cpp b/test/FrontendC++/msasm.cpp deleted file mode 100644 index d8d1f378618d4..0000000000000 --- a/test/FrontendC++/msasm.cpp +++ /dev/null @@ -1,23 +0,0 @@ -// RUN: %llvmgxx %s -fasm-blocks -S -o - | FileCheck %s -// Complicated expression as jump target -// XFAIL: * -// XTARGET: x86,i386,i686 - -void Method3() -{ -// CHECK: Method3 -// CHECK-NOT: msasm - asm("foo:"); -// CHECK: return -} - -void Method4() -{ -// CHECK: Method4 -// CHECK: msasm - asm { - bar: - } -// CHECK: return -} - diff --git a/test/FrontendC/2009-02-17-BitField-dbg.c b/test/FrontendC/2009-02-17-BitField-dbg.c index 36ee2e6f0ef70..7ab14fd27a688 100644 --- a/test/FrontendC/2009-02-17-BitField-dbg.c +++ b/test/FrontendC/2009-02-17-BitField-dbg.c @@ -5,6 +5,10 @@ // RUN: echo {ptype mystruct} > %t2 // RUN: gdb -q -batch -n -x %t2 2009-02-17-BitField-dbg.o | \ // RUN: tee 2009-02-17-BitField-dbg.out | grep "int a : 4" +// +// XFAIL: powerpc-apple-darwin +// FIXME: This doesn't work for PPC Darwin because we turned off debugging on +// that platform. struct { int a:4; diff --git a/test/FrontendC/cstring-align.c b/test/FrontendC/cstring-align.c new file mode 100644 index 0000000000000..2e3fc8b4e4773 --- /dev/null +++ b/test/FrontendC/cstring-align.c @@ -0,0 +1,16 @@ +// RUN: %llvmgcc %s -c -Os -m32 -emit-llvm -o - | llc -march=x86 -mtriple=i386-apple-darwin10 | FileCheck %s -check-prefix=DARWIN32 +// RUN: %llvmgcc %s -c -Os -m64 -emit-llvm -o - | llc -march=x86-64 -mtriple=x86_64-apple-darwin10 | FileCheck %s -check-prefix=DARWIN64 + +extern void func(const char *, const char *); + +void long_function_name() { + func("%s: the function name", __func__); +} + +// DARWIN64: .align 3 +// DARWIN64: ___func__. +// DARWIN64: .asciz "long_function_name" + +// DARWIN32: .align 2 +// DARWIN32: ___func__. +// DARWIN32: .asciz "long_function_name" diff --git a/test/FrontendC/memcpy_chk.c b/test/FrontendC/memcpy_chk.c deleted file mode 100644 index 7c07931c079c6..0000000000000 --- a/test/FrontendC/memcpy_chk.c +++ /dev/null @@ -1,28 +0,0 @@ -// RUN: %llvmgcc -S -emit-llvm -O1 %s -o - | grep call | grep memcpy_chk | count 3 -// RUN: %llvmgcc -S -emit-llvm -O1 %s -o - | grep call | grep {llvm.memcpy} | count 3 -// rdar://6716432 - -void *t1(void *d, void *s) { - return __builtin___memcpy_chk(d, s, 16, 0); -} - -void *t2(void *d, void *s) { - return __builtin___memcpy_chk(d, s, 16, 10); -} - -void *t3(void *d, void *s) { - return __builtin___memcpy_chk(d, s, 16, 17); -} - -void *t4(void *d, void *s, unsigned len) { - return __builtin___memcpy_chk(d, s, len, 17); -} - -char buf[10]; -void *t5(void *s, unsigned len) { - return __builtin___memcpy_chk(buf, s, 5, __builtin_object_size(buf, 0)); -} - -void *t6(void *d, void *s) { - return __builtin___memcpy_chk(d, s, 16, __builtin_object_size(d, 0)); -} diff --git a/test/FrontendC/memset_chk.c b/test/FrontendC/memset_chk.c deleted file mode 100644 index b347dd0b7e790..0000000000000 --- a/test/FrontendC/memset_chk.c +++ /dev/null @@ -1,6 +0,0 @@ -// RUN: %llvmgcc -S -emit-llvm -O1 %s -o - | grep call | not grep memset_chk -// rdar://6728562 - -void t(void *ptr) { - __builtin___memset_chk(ptr, 0, 32, __builtin_object_size (ptr, 0)); -} diff --git a/test/FrontendC/msasm.c b/test/FrontendC/msasm.c deleted file mode 100644 index 18375bdf34fed..0000000000000 --- a/test/FrontendC/msasm.c +++ /dev/null @@ -1,23 +0,0 @@ -// RUN: %llvmgcc %s -fasm-blocks -S -o - | FileCheck %s -// Complicated expression as jump target -// XFAIL: * -// XTARGET: x86,i386,i686 - -void Method3() -{ -// CHECK: Method3 -// CHECK-NOT: msasm - asm("foo:"); -// CHECK: return -} - -void Method4() -{ -// CHECK: Method4 -// CHECK: msasm - asm { - bar: - } -// CHECK: return -} - diff --git a/test/FrontendC/object_size.c b/test/FrontendC/object_size.c deleted file mode 100644 index 0ddd66bc38cb6..0000000000000 --- a/test/FrontendC/object_size.c +++ /dev/null @@ -1,16 +0,0 @@ -// RUN: %llvmgcc -S -emit-llvm -O1 %s -o - | grep ret | grep {\\-1} | count 1 -// RUN: %llvmgcc -S -emit-llvm -O1 %s -o - | grep ret | grep {0} | count 1 -// RUN: %llvmgcc -S -emit-llvm -O1 %s -o - | grep ret | grep {8} | count 1 - -unsigned t1(void *d) { - return __builtin_object_size(d, 0); -} - -unsigned t2(void *d) { - return __builtin_object_size(d, 2); -} - -char buf[8]; -unsigned t3() { - return __builtin_object_size(buf, 0); -} diff --git a/test/FrontendC/pr4349.c b/test/FrontendC/pr4349.c index 890482ea06a57..fbd7e56eba153 100644 --- a/test/FrontendC/pr4349.c +++ b/test/FrontendC/pr4349.c @@ -1,9 +1,4 @@ -// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | grep svars2 | grep {\\\[2 x \\\[2 x i8\\\]\\\]} -// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | grep svars2 | grep {, i\[\[:digit:\]\]\\+ 1)} | count 1 -// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | grep svars3 | grep {\\\[2 x i16\\\]} -// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | grep svars3 | grep {, i\[\[:digit:\]\]\\+ 1)} | count 1 -// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | grep svars4 | grep {\\\[2 x \\\[2 x i8\\\]\\\]} | count 1 -// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | grep svars4 | grep {, i\[\[:digit:\]\]\\+ 1, i\[\[:digit:\]\]\\+ 1)} | count 1 +// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | FileCheck %s // PR 4349 union reg @@ -21,18 +16,22 @@ struct svar { void *ptr; }; +// CHECK: @svars1 = global [1 x %struct.svar] [%struct.svar { i8* bitcast (%struct.cpu* @cpu to i8*) }] struct svar svars1[] = { { &((cpu.pc).w[0]) } }; +// CHECK: @svars2 = global [1 x %struct.svar] [%struct.svar { i8* getelementptr ([2 x i8]* bitcast (%struct.cpu* @cpu to [2 x i8]*), i{{[0-9]+}} 0, i{{[0-9]+}} 1) }] struct svar svars2[] = { { &((cpu.pc).b[0][1]) } }; +// CHECK: @svars3 = global [1 x %struct.svar] [%struct.svar { i8* bitcast (i16* getelementptr ([2 x i16]* bitcast (%struct.cpu* @cpu to [2 x i16]*), i{{[0-9]+}} 0, i{{[0-9]+}} 1) to i8*) }] struct svar svars3[] = { { &((cpu.pc).w[1]) } }; +// CHECK: @svars4 = global [1 x %struct.svar] [%struct.svar { i8* getelementptr ([2 x [2 x i8]]* bitcast (%struct.cpu* @cpu to [2 x [2 x i8]]*), i{{[0-9]+}} 0, i{{[0-9]+}} 1, i{{[0-9]+}} 1) }] struct svar svars4[] = { { &((cpu.pc).b[1][1]) } diff --git a/test/FrontendObjC/2009-11-30-Objc-ID.m b/test/FrontendObjC/2009-11-30-Objc-ID.m new file mode 100644 index 0000000000000..dadccdc2dffb3 --- /dev/null +++ b/test/FrontendObjC/2009-11-30-Objc-ID.m @@ -0,0 +1,14 @@ +// RUN: %llvmgcc -S -O0 -g %s -o - | llvm-as | \ +// RUN: llc --disable-fp-elim -o %t.s -O0 +// RUN: grep id %t.s | grep DW_AT_name +@interface A +-(id) blah; +@end + +@implementation A +-(id)blah { + int i = 1; + i++; + return i; +} +@end diff --git a/test/TableGen/UnsetBitInit.td b/test/TableGen/UnsetBitInit.td new file mode 100644 index 0000000000000..91342ecb96635 --- /dev/null +++ b/test/TableGen/UnsetBitInit.td @@ -0,0 +1,10 @@ +// RUN: tblgen %s +class x { + field bits<32> A; +} + +class y<bits<2> B> : x { + let A{21-20} = B; +} + +def z : y<{0,?}>; diff --git a/test/Transforms/CondProp/2006-08-14-SingleEntryPhiCrash.ll b/test/Transforms/CondProp/2006-08-14-SingleEntryPhiCrash.ll deleted file mode 100644 index 754d19d166e8e..0000000000000 --- a/test/Transforms/CondProp/2006-08-14-SingleEntryPhiCrash.ll +++ /dev/null @@ -1,462 +0,0 @@ -; RUN: opt < %s -condprop -disable-output -; PR877 -target datalayout = "E-p:32:32" -target triple = "powerpc-apple-darwin9.0.0d1" - %"struct.kc::impl_Ccode_option" = type { %"struct.kc::impl_abstract_phylum" } - %"struct.kc::impl_ID" = type { %"struct.kc::impl_abstract_phylum", %"struct.kc::impl_Ccode_option"*, %"struct.kc::impl_casestring__Str"*, i32, %"struct.kc::impl_casestring__Str"* } - %"struct.kc::impl_abstract_phylum" = type { i32 (...)** } - %"struct.kc::impl_casestring__Str" = type { %"struct.kc::impl_abstract_phylum", i8* } - %"struct.kc::impl_elem_patternrepresentation" = type { %"struct.kc::impl_abstract_phylum", i32, %"struct.kc::impl_casestring__Str"*, %"struct.kc::impl_ID"* } - %"struct.kc::impl_outmostpatterns" = type { %"struct.kc::impl_Ccode_option", %"struct.kc::impl_elem_patternrepresentation"*, %"struct.kc::impl_outmostpatterns"* } - %"struct.kc::impl_patternrepresentations" = type { %"struct.kc::impl_Ccode_option", %"struct.kc::impl_outmostpatterns"*, %"struct.kc::impl_patternrepresentations"* } - -define void @_ZN2kc16compare_patternsEPNS_26impl_patternrepresentationES1_PNS_27impl_patternrepresentationsE() { -entry: - br label %bb1269.outer.outer.outer.outer - -cond_true: ; preds = %cond_true1298 - br label %bb1269.outer69 - -cond_false: ; preds = %cond_true1298 - br i1 false, label %cond_next, label %bb51 - -cond_next: ; preds = %cond_false - br i1 false, label %bb52, label %bb51 - -bb51: ; preds = %cond_next, %cond_false - br label %bb52 - -bb52: ; preds = %bb51, %cond_next - br i1 false, label %cond_false82, label %cond_true55 - -cond_true55: ; preds = %bb52 - br i1 false, label %UnifiedReturnBlock, label %cond_true57 - -cond_true57: ; preds = %cond_true55 - br label %UnifiedReturnBlock - -cond_false82: ; preds = %bb52 - br i1 false, label %cond_next97, label %bb113 - -cond_next97: ; preds = %cond_false82 - br i1 false, label %bb114, label %bb113 - -bb113: ; preds = %cond_next97, %cond_false82 - br label %bb114 - -bb114: ; preds = %bb113, %cond_next97 - br i1 false, label %cond_false151, label %cond_true117 - -cond_true117: ; preds = %bb114 - br i1 false, label %UnifiedReturnBlock, label %cond_true120 - -cond_true120: ; preds = %cond_true117 - br label %UnifiedReturnBlock - -cond_false151: ; preds = %bb114 - br i1 false, label %cond_next166, label %bb182 - -cond_next166: ; preds = %cond_false151 - br i1 false, label %bb183, label %bb182 - -bb182: ; preds = %cond_next166, %cond_false151 - br label %bb183 - -bb183: ; preds = %bb182, %cond_next166 - br i1 false, label %cond_false256, label %cond_true186 - -cond_true186: ; preds = %bb183 - br i1 false, label %cond_true207, label %cond_false214 - -cond_true207: ; preds = %cond_true186 - br label %bb1269.outer38.backedge - -bb1269.outer38.backedge: ; preds = %cond_true545, %cond_true432, %cond_true320, %cond_true207 - br label %bb1269.outer38 - -cond_false214: ; preds = %cond_true186 - br i1 false, label %cond_true228, label %cond_false235 - -cond_true228: ; preds = %cond_false214 - br label %bb1269.outer21.backedge - -bb1269.outer21.backedge: ; preds = %cond_true566, %cond_true453, %cond_true341, %cond_true228 - br label %bb1269.outer21 - -cond_false235: ; preds = %cond_false214 - br i1 false, label %UnifiedReturnBlock, label %cond_false250 - -cond_false250: ; preds = %cond_false235 - br label %UnifiedUnreachableBlock - -cond_false256: ; preds = %bb183 - br i1 false, label %cond_next271, label %bb287 - -cond_next271: ; preds = %cond_false256 - br i1 false, label %bb288, label %bb287 - -bb287: ; preds = %cond_next271, %cond_false256 - br label %bb288 - -bb288: ; preds = %bb287, %cond_next271 - br i1 false, label %cond_false369, label %cond_true291 - -cond_true291: ; preds = %bb288 - br i1 false, label %cond_true320, label %cond_false327 - -cond_true320: ; preds = %cond_true291 - br label %bb1269.outer38.backedge - -cond_false327: ; preds = %cond_true291 - br i1 false, label %cond_true341, label %cond_false348 - -cond_true341: ; preds = %cond_false327 - br label %bb1269.outer21.backedge - -cond_false348: ; preds = %cond_false327 - br i1 false, label %UnifiedReturnBlock, label %cond_false363 - -cond_false363: ; preds = %cond_false348 - br label %UnifiedUnreachableBlock - -cond_false369: ; preds = %bb288 - br i1 false, label %cond_next384, label %bb400 - -cond_next384: ; preds = %cond_false369 - br i1 false, label %bb401, label %bb400 - -bb400: ; preds = %cond_next384, %cond_false369 - br label %bb401 - -bb401: ; preds = %bb400, %cond_next384 - br i1 false, label %cond_false481, label %cond_true404 - -cond_true404: ; preds = %bb401 - br i1 false, label %cond_true432, label %cond_false439 - -cond_true432: ; preds = %cond_true404 - br label %bb1269.outer38.backedge - -cond_false439: ; preds = %cond_true404 - br i1 false, label %cond_true453, label %cond_false460 - -cond_true453: ; preds = %cond_false439 - br label %bb1269.outer21.backedge - -cond_false460: ; preds = %cond_false439 - br i1 false, label %UnifiedReturnBlock, label %cond_false475 - -cond_false475: ; preds = %cond_false460 - br label %UnifiedUnreachableBlock - -cond_false481: ; preds = %bb401 - br i1 false, label %cond_next496, label %bb512 - -cond_next496: ; preds = %cond_false481 - br i1 false, label %bb513, label %bb512 - -bb512: ; preds = %cond_next496, %cond_false481 - br label %bb513 - -bb513: ; preds = %bb512, %cond_next496 - br i1 false, label %cond_false594, label %cond_true516 - -cond_true516: ; preds = %bb513 - br i1 false, label %cond_true545, label %cond_false552 - -cond_true545: ; preds = %cond_true516 - br label %bb1269.outer38.backedge - -cond_false552: ; preds = %cond_true516 - br i1 false, label %cond_true566, label %cond_false573 - -cond_true566: ; preds = %cond_false552 - br label %bb1269.outer21.backedge - -cond_false573: ; preds = %cond_false552 - br i1 false, label %UnifiedReturnBlock, label %cond_false588 - -cond_false588: ; preds = %cond_false573 - br label %UnifiedUnreachableBlock - -cond_false594: ; preds = %bb513 - br i1 false, label %cond_next609, label %bb625 - -cond_next609: ; preds = %cond_false594 - br i1 false, label %bb626, label %bb625 - -bb625: ; preds = %cond_next609, %cond_false594 - br label %bb626 - -bb626: ; preds = %bb625, %cond_next609 - br i1 false, label %cond_false707, label %cond_true629 - -cond_true629: ; preds = %bb626 - br i1 false, label %cond_true658, label %cond_false665 - -cond_true658: ; preds = %cond_true629 - br label %bb1269.outer2.backedge - -bb1269.outer2.backedge: ; preds = %cond_true679, %cond_true658 - br label %bb1269.outer2 - -cond_false665: ; preds = %cond_true629 - br i1 false, label %cond_true679, label %cond_false686 - -cond_true679: ; preds = %cond_false665 - br label %bb1269.outer2.backedge - -cond_false686: ; preds = %cond_false665 - br i1 false, label %UnifiedReturnBlock, label %cond_false701 - -cond_false701: ; preds = %cond_false686 - br label %UnifiedUnreachableBlock - -cond_false707: ; preds = %bb626 - br i1 false, label %cond_next722, label %bb738 - -cond_next722: ; preds = %cond_false707 - br i1 false, label %bb739, label %bb738 - -bb738: ; preds = %cond_next722, %cond_false707 - br label %bb739 - -bb739: ; preds = %bb738, %cond_next722 - br i1 false, label %cond_false820, label %cond_true742 - -cond_true742: ; preds = %bb739 - br i1 false, label %cond_true771, label %cond_false778 - -cond_true771: ; preds = %cond_true742 - br label %bb1269.outer.backedge - -bb1269.outer.backedge: ; preds = %cond_true792, %cond_true771 - br label %bb1269.outer - -cond_false778: ; preds = %cond_true742 - br i1 false, label %cond_true792, label %cond_false799 - -cond_true792: ; preds = %cond_false778 - br label %bb1269.outer.backedge - -cond_false799: ; preds = %cond_false778 - br i1 false, label %UnifiedReturnBlock, label %cond_false814 - -cond_false814: ; preds = %cond_false799 - br label %UnifiedUnreachableBlock - -cond_false820: ; preds = %bb739 - br i1 false, label %cond_next835, label %bb851 - -cond_next835: ; preds = %cond_false820 - br i1 false, label %bb852, label %bb851 - -bb851: ; preds = %cond_next835, %cond_false820 - br label %bb852 - -bb852: ; preds = %bb851, %cond_next835 - br i1 false, label %cond_false933, label %cond_true855 - -cond_true855: ; preds = %bb852 - br i1 false, label %cond_true884, label %cond_false891 - -cond_true884: ; preds = %cond_true855 - br label %bb1269.outer.outer.backedge - -bb1269.outer.outer.backedge: ; preds = %cond_true905, %cond_true884 - br label %bb1269.outer.outer - -cond_false891: ; preds = %cond_true855 - br i1 false, label %cond_true905, label %cond_false912 - -cond_true905: ; preds = %cond_false891 - br label %bb1269.outer.outer.backedge - -cond_false912: ; preds = %cond_false891 - br i1 false, label %UnifiedReturnBlock, label %cond_false927 - -cond_false927: ; preds = %cond_false912 - br label %UnifiedUnreachableBlock - -cond_false933: ; preds = %bb852 - br i1 false, label %cond_next948, label %bb964 - -cond_next948: ; preds = %cond_false933 - br i1 false, label %bb965, label %bb964 - -bb964: ; preds = %cond_next948, %cond_false933 - br label %bb965 - -bb965: ; preds = %bb964, %cond_next948 - br i1 false, label %cond_false1046, label %cond_true968 - -cond_true968: ; preds = %bb965 - br i1 false, label %cond_true997, label %cond_false1004 - -cond_true997: ; preds = %cond_true968 - br label %bb1269.outer.outer.outer.backedge - -bb1269.outer.outer.outer.backedge: ; preds = %cond_true1018, %cond_true997 - br label %bb1269.outer.outer.outer - -cond_false1004: ; preds = %cond_true968 - br i1 false, label %cond_true1018, label %cond_false1025 - -cond_true1018: ; preds = %cond_false1004 - br label %bb1269.outer.outer.outer.backedge - -cond_false1025: ; preds = %cond_false1004 - br i1 false, label %UnifiedReturnBlock, label %cond_false1040 - -cond_false1040: ; preds = %cond_false1025 - br label %UnifiedUnreachableBlock - -cond_false1046: ; preds = %bb965 - br i1 false, label %cond_next1061, label %bb1077 - -cond_next1061: ; preds = %cond_false1046 - br i1 false, label %bb1078, label %bb1077 - -bb1077: ; preds = %cond_next1061, %cond_false1046 - br label %bb1078 - -bb1078: ; preds = %bb1077, %cond_next1061 - %tmp1080 = phi i1 [ true, %bb1077 ], [ false, %cond_next1061 ] ; <i1> [#uses=1] - br i1 %tmp1080, label %cond_false1159, label %cond_true1081 - -cond_true1081: ; preds = %bb1078 - br i1 false, label %cond_true1110, label %cond_false1117 - -cond_true1110: ; preds = %cond_true1081 - br label %bb1269.outer.outer.outer.outer.backedge - -bb1269.outer.outer.outer.outer.backedge: ; preds = %cond_true1131, %cond_true1110 - br label %bb1269.outer.outer.outer.outer - -cond_false1117: ; preds = %cond_true1081 - br i1 false, label %cond_true1131, label %cond_false1138 - -cond_true1131: ; preds = %cond_false1117 - br label %bb1269.outer.outer.outer.outer.backedge - -cond_false1138: ; preds = %cond_false1117 - br i1 false, label %UnifiedReturnBlock, label %cond_false1153 - -cond_false1153: ; preds = %cond_false1138 - br label %UnifiedUnreachableBlock - -cond_false1159: ; preds = %bb1078 - %tmp.i119.lcssa35.lcssa.lcssa.lcssa.lcssa.lcssa = phi %"struct.kc::impl_elem_patternrepresentation"* [ null, %bb1078 ] ; <%"struct.kc::impl_elem_patternrepresentation"*> [#uses=0] - br i1 false, label %UnifiedReturnBlock, label %cond_false1174 - -cond_false1174: ; preds = %cond_false1159 - br i1 false, label %UnifiedReturnBlock, label %cond_false1189 - -cond_false1189: ; preds = %cond_false1174 - br i1 false, label %UnifiedReturnBlock, label %cond_false1204 - -cond_false1204: ; preds = %cond_false1189 - br i1 false, label %UnifiedReturnBlock, label %cond_false1219 - -cond_false1219: ; preds = %cond_false1204 - br i1 false, label %UnifiedReturnBlock, label %cond_true1222 - -cond_true1222: ; preds = %cond_false1219 - br label %UnifiedReturnBlock - -bb1269.outer.outer.outer.outer: ; preds = %bb1269.outer.outer.outer.outer.backedge, %entry - br label %bb1269.outer.outer.outer - -bb1269.outer.outer.outer: ; preds = %bb1269.outer.outer.outer.outer, %bb1269.outer.outer.outer.backedge - br label %bb1269.outer.outer - -bb1269.outer.outer: ; preds = %bb1269.outer.outer.outer, %bb1269.outer.outer.backedge - br label %bb1269.outer - -bb1269.outer: ; preds = %bb1269.outer.outer, %bb1269.outer.backedge - br label %bb1269.outer2 - -bb1269.outer2: ; preds = %bb1269.outer, %bb1269.outer2.backedge - br label %bb1269.outer21 - -bb1269.outer21: ; preds = %bb1269.outer2, %bb1269.outer21.backedge - br label %bb1269.outer38 - -bb1269.outer38: ; preds = %bb1269.outer21, %bb1269.outer38.backedge - br label %bb1269.outer54 - -bb1269.outer54: ; preds = %bb1269.outer38 - br label %bb1269.outer69 - -bb1269.outer69: ; preds = %bb1269.outer54, %cond_true - br label %bb1269 - -bb1269: ; preds = %bb1269.outer69 - br i1 false, label %cond_next1281, label %bb1294 - -cond_next1281: ; preds = %bb1269 - br i1 false, label %cond_true1298, label %bb1294 - -bb1294: ; preds = %cond_next1281, %bb1269 - br i1 false, label %cond_true1331, label %cond_next1313 - -cond_true1298: ; preds = %cond_next1281 - br i1 false, label %cond_false, label %cond_true - -cond_next1313: ; preds = %bb1294 - br i1 false, label %cond_true1331, label %cond_next1355 - -cond_true1331: ; preds = %cond_next1313, %bb1294 - br i1 false, label %cond_false1346, label %cond_true1342 - -cond_true1342: ; preds = %cond_true1331 - br label %cond_next1350 - -cond_false1346: ; preds = %cond_true1331 - br label %cond_next1350 - -cond_next1350: ; preds = %cond_false1346, %cond_true1342 - br label %bb.i - -bb.i: ; preds = %bb.i, %cond_next1350 - br i1 false, label %_ZN2kc18impl_abstract_list8freelistEv.exit, label %bb.i - -_ZN2kc18impl_abstract_list8freelistEv.exit: ; preds = %bb.i - br label %cond_next1355 - -cond_next1355: ; preds = %_ZN2kc18impl_abstract_list8freelistEv.exit, %cond_next1313 - br i1 false, label %cond_next1363, label %bb1388 - -cond_next1363: ; preds = %cond_next1355 - br i1 false, label %UnifiedReturnBlock, label %cond_true1366 - -cond_true1366: ; preds = %cond_next1363 - br label %UnifiedReturnBlock - -bb1388: ; preds = %cond_next1355 - br i1 false, label %UnifiedReturnBlock, label %bb1414.preheader - -bb1414.preheader: ; preds = %bb1388 - br label %bb1414 - -bb1414: ; preds = %cond_true1426, %bb1414.preheader - br i1 false, label %cond_true1426, label %bb1429 - -cond_true1426: ; preds = %bb1414 - br label %bb1414 - -bb1429: ; preds = %bb1414 - br i1 false, label %cond_true1431, label %UnifiedReturnBlock - -cond_true1431: ; preds = %bb1429 - br i1 false, label %UnifiedReturnBlock, label %cond_true1434 - -cond_true1434: ; preds = %cond_true1431 - br label %UnifiedReturnBlock - -UnifiedUnreachableBlock: ; preds = %cond_false1153, %cond_false1040, %cond_false927, %cond_false814, %cond_false701, %cond_false588, %cond_false475, %cond_false363, %cond_false250 - unreachable - -UnifiedReturnBlock: ; preds = %cond_true1434, %cond_true1431, %bb1429, %bb1388, %cond_true1366, %cond_next1363, %cond_true1222, %cond_false1219, %cond_false1204, %cond_false1189, %cond_false1174, %cond_false1159, %cond_false1138, %cond_false1025, %cond_false912, %cond_false799, %cond_false686, %cond_false573, %cond_false460, %cond_false348, %cond_false235, %cond_true120, %cond_true117, %cond_true57, %cond_true55 - ret void -} diff --git a/test/Transforms/CondProp/2006-11-01-PhiNodeCrash.ll b/test/Transforms/CondProp/2006-11-01-PhiNodeCrash.ll deleted file mode 100644 index 4df8ff94499a7..0000000000000 --- a/test/Transforms/CondProp/2006-11-01-PhiNodeCrash.ll +++ /dev/null @@ -1,1084 +0,0 @@ -; RUN: opt < %s -condprop -disable-output -; PR979 - -target datalayout = "e-p:32:32" -target triple = "i686-pc-linux-gnu" -deplibs = [ "c", "crtend" ] - %struct.IO_APIC_reg_00 = type { i32 } - %struct.Qdisc = type { i32 (%struct.sk_buff*, %struct.Qdisc*)*, %struct.sk_buff* (%struct.Qdisc*)*, i32, %struct.Qdisc_ops*, %struct.Qdisc*, i32, %struct.IO_APIC_reg_00, %struct.sk_buff_head, %struct.net_device*, %struct.tc_stats, i32 (%struct.sk_buff*, %struct.Qdisc*)*, %struct.Qdisc*, [1 x i8] } - %struct.Qdisc_class_ops = type { i32 (%struct.Qdisc*, i32, %struct.Qdisc*, %struct.Qdisc**)*, %struct.Qdisc* (%struct.Qdisc*, i32)*, i32 (%struct.Qdisc*, i32)*, void (%struct.Qdisc*, i32)*, i32 (%struct.Qdisc*, i32, i32, %struct._agp_version**, i32*)*, i32 (%struct.Qdisc*, i32)*, void (%struct.Qdisc*, %struct.qdisc_walker*)*, %struct.tcf_proto** (%struct.Qdisc*, i32)*, i32 (%struct.Qdisc*, i32, i32)*, void (%struct.Qdisc*, i32)*, i32 (%struct.Qdisc*, i32, %struct.sk_buff*, %struct.tcmsg*)* } - %struct.Qdisc_ops = type { %struct.Qdisc_ops*, %struct.Qdisc_class_ops*, [16 x i8], i32, i32 (%struct.sk_buff*, %struct.Qdisc*)*, %struct.sk_buff* (%struct.Qdisc*)*, i32 (%struct.sk_buff*, %struct.Qdisc*)*, i32 (%struct.Qdisc*)*, i32 (%struct.Qdisc*, %struct._agp_version*)*, void (%struct.Qdisc*)*, void (%struct.Qdisc*)*, i32 (%struct.Qdisc*, %struct._agp_version*)*, i32 (%struct.Qdisc*, %struct.sk_buff*)* } - %struct.ViceFid = type { i32, i32, i32 } - %struct.__wait_queue = type { i32, %struct.task_struct*, %struct.list_head } - %struct.__wait_queue_head = type { %struct.IO_APIC_reg_00, %struct.list_head } - %struct._agp_version = type { i16, i16 } - %struct._drm_i810_overlay_t = type { i32, i32 } - %struct.address_space = type { %struct.list_head, %struct.list_head, %struct.list_head, i32, %struct.address_space_operations*, %struct.inode*, %struct.vm_area_struct*, %struct.vm_area_struct*, %struct.IO_APIC_reg_00, i32 } - %struct.address_space_operations = type { i32 (%struct.page*)*, i32 (%struct.file*, %struct.page*)*, i32 (%struct.page*)*, i32 (%struct.file*, %struct.page*, i32, i32)*, i32 (%struct.file*, %struct.page*, i32, i32)*, i32 (%struct.address_space*, i32)*, i32 (%struct.page*, i32)*, i32 (%struct.page*, i32)*, i32 (i32, %struct.inode*, %struct.kiobuf*, i32, i32)*, i32 (i32, %struct.file*, %struct.kiobuf*, i32, i32)*, void (%struct.page*)* } - %struct.audio_buf_info = type { i32, i32, i32, i32 } - %struct.autofs_packet_hdr = type { i32, i32 } - %struct.block_device = type { %struct.list_head, %struct.IO_APIC_reg_00, %struct.inode*, i16, i32, %struct.block_device_operations*, %struct.semaphore, %struct.list_head } - %struct.block_device_operations = type { i32 (%struct.inode*, %struct.file*)*, i32 (%struct.inode*, %struct.file*)*, i32 (%struct.inode*, %struct.file*, i32, i32)*, i32 (i16)*, i32 (i16)*, %struct.module* } - %struct.bluez_skb_cb = type { i32 } - %struct.buffer_head = type { %struct.buffer_head*, i32, i16, i16, i16, %struct.IO_APIC_reg_00, i16, i32, i32, %struct.buffer_head*, %struct.buffer_head*, %struct.buffer_head*, %struct.buffer_head*, %struct.buffer_head**, i8*, %struct.page*, void (%struct.buffer_head*, i32)*, i8*, i32, %struct.__wait_queue_head, %struct.list_head } - %struct.char_device = type { %struct.list_head, %struct.IO_APIC_reg_00, i16, %struct.IO_APIC_reg_00, %struct.semaphore } - %struct.completion = type { i32, %struct.__wait_queue_head } - %struct.cramfs_info = type { i32, i32, i32, i32 } - %struct.dentry = type { %struct.IO_APIC_reg_00, i32, %struct.inode*, %struct.dentry*, %struct.list_head, %struct.list_head, %struct.list_head, %struct.list_head, %struct.list_head, i32, %struct.qstr, i32, %struct.dentry_operations*, %struct.super_block*, i32, i8*, [16 x i8] } - %struct.dentry_operations = type { i32 (%struct.dentry*, i32)*, i32 (%struct.dentry*, %struct.qstr*)*, i32 (%struct.dentry*, %struct.qstr*, %struct.qstr*)*, i32 (%struct.dentry*)*, void (%struct.dentry*)*, void (%struct.dentry*, %struct.inode*)* } - %struct.dev_mc_list = type { %struct.dev_mc_list*, [8 x i8], i8, i32, i32 } - %struct.dnotify_struct = type { %struct.dnotify_struct*, i32, i32, %struct.file*, %struct.files_struct* } - %struct.dquot = type { %struct.list_head, %struct.list_head, %struct.list_head, %struct.__wait_queue_head, %struct.__wait_queue_head, i32, i32, %struct.super_block*, i32, i16, i64, i16, i16, i32, %struct.mem_dqblk } - %struct.dquot_operations = type { void (%struct.inode*, i32)*, void (%struct.inode*)*, i32 (%struct.inode*, i64, i32)*, i32 (%struct.inode*, i32)*, void (%struct.inode*, i64)*, void (%struct.inode*, i32)*, i32 (%struct.inode*, %struct.iattr*)*, i32 (%struct.dquot*)* } - %struct.drm_clip_rect = type { i16, i16, i16, i16 } - %struct.drm_ctx_priv_map = type { i32, i8* } - %struct.drm_mga_indices = type { i32, i32, i32, i32 } - %struct.dst_entry = type { %struct.dst_entry*, %struct.IO_APIC_reg_00, i32, %struct.net_device*, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, %struct.neighbour*, %struct.hh_cache*, i32 (%struct.sk_buff*)*, i32 (%struct.sk_buff*)*, %struct.dst_ops*, [0 x i8] } - %struct.dst_ops = type { i16, i16, i32, i32 ()*, %struct.dst_entry* (%struct.dst_entry*, i32)*, %struct.dst_entry* (%struct.dst_entry*, %struct.sk_buff*)*, void (%struct.dst_entry*)*, %struct.dst_entry* (%struct.dst_entry*)*, void (%struct.sk_buff*)*, i32, %struct.IO_APIC_reg_00, %struct.kmem_cache_s* } - %struct.e820entry = type { i64, i64, i32 } - %struct.exec_domain = type { i8*, void (i32, %struct.pt_regs*)*, i8, i8, i32*, i32*, %struct.map_segment*, %struct.map_segment*, %struct.map_segment*, %struct.map_segment*, %struct.module*, %struct.exec_domain* } - %struct.ext2_inode_info = type { [15 x i32], i32, i32, i8, i8, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 } - %struct.ext3_inode_info = type { [15 x i32], i32, i32, i32, i32, i32, i32, i32, i32, i32, %struct.list_head, i64, %struct.rw_semaphore } - %struct.fasync_struct = type { i32, i32, %struct.fasync_struct*, %struct.file* } - %struct.file = type { %struct.list_head, %struct.dentry*, %struct.vfsmount*, %struct.file_operations*, %struct.IO_APIC_reg_00, i32, i16, i64, i32, i32, i32, i32, i32, %struct.audio_buf_info, i32, i32, i32, i32, i8*, %struct.kiobuf*, i32 } - %struct.file_lock = type { %struct.file_lock*, %struct.list_head, %struct.list_head, %struct.files_struct*, i32, %struct.__wait_queue_head, %struct.file*, i8, i8, i64, i64, void (%struct.file_lock*)*, void (%struct.file_lock*)*, void (%struct.file_lock*)*, %struct.fasync_struct*, i32, { %struct.nfs_lock_info } } - %struct.file_operations = type { %struct.module*, i64 (%struct.file*, i64, i32)*, i32 (%struct.file*, i8*, i32, i64*)*, i32 (%struct.file*, i8*, i32, i64*)*, i32 (%struct.file*, i8*, i32 (i8*, i8*, i32, i64, i32, i32)*)*, i32 (%struct.file*, %struct.poll_table_struct*)*, i32 (%struct.inode*, %struct.file*, i32, i32)*, i32 (%struct.file*, %struct.vm_area_struct*)*, i32 (%struct.inode*, %struct.file*)*, i32 (%struct.file*)*, i32 (%struct.inode*, %struct.file*)*, i32 (%struct.file*, %struct.dentry*, i32)*, i32 (i32, %struct.file*, i32)*, i32 (%struct.file*, i32, %struct.file_lock*)*, i32 (%struct.file*, %struct.iovec*, i32, i64*)*, i32 (%struct.file*, %struct.iovec*, i32, i64*)*, i32 (%struct.file*, %struct.page*, i32, i32, i64*, i32)*, i32 (%struct.file*, i32, i32, i32, i32)* } - %struct.file_system_type = type { i8*, i32, %struct.super_block* (%struct.super_block*, i8*, i32)*, %struct.module*, %struct.file_system_type*, %struct.list_head } - %struct.files_struct = type { %struct.IO_APIC_reg_00, %typedef.rwlock_t, i32, i32, i32, %struct.file**, %typedef.__kernel_fd_set*, %typedef.__kernel_fd_set*, %typedef.__kernel_fd_set, %typedef.__kernel_fd_set, [32 x %struct.file*] } - %struct.fs_disk_quota = type { i8, i8, i16, i32, i64, i64, i64, i64, i64, i64, i32, i32, i16, i16, i32, i64, i64, i64, i32, i16, i16, [8 x i8] } - %struct.fs_quota_stat = type { i8, i16, i8, %struct.e820entry, %struct.e820entry, i32, i32, i32, i32, i16, i16 } - %struct.fs_struct = type { %struct.IO_APIC_reg_00, %typedef.rwlock_t, i32, %struct.dentry*, %struct.dentry*, %struct.dentry*, %struct.vfsmount*, %struct.vfsmount*, %struct.vfsmount* } - %struct.hh_cache = type { %struct.hh_cache*, %struct.IO_APIC_reg_00, i16, i32, i32 (%struct.sk_buff*)*, %typedef.rwlock_t, [32 x i32] } - %struct.i387_fxsave_struct = type { i16, i16, i16, i16, i32, i32, i32, i32, i32, i32, [32 x i32], [32 x i32], [56 x i32] } - %struct.iattr = type { i32, i16, i32, i32, i64, i32, i32, i32, i32 } - %struct.if_dqblk = type { i64, i64, i64, i64, i64, i64, i64, i64, i32 } - %struct.if_dqinfo = type { i64, i64, i32, i32 } - %struct.ifmap = type { i32, i32, i16, i8, i8, i8 } - %struct.ifreq = type { { [16 x i8] }, %typedef.dvd_authinfo } - %struct.inode = type { %struct.list_head, %struct.list_head, %struct.list_head, %struct.list_head, %struct.list_head, i32, %struct.IO_APIC_reg_00, i16, i16, i16, i32, i32, i16, i64, i32, i32, i32, i32, i32, i32, i32, i16, %struct.semaphore, %struct.rw_semaphore, %struct.semaphore, %struct.inode_operations*, %struct.file_operations*, %struct.super_block*, %struct.__wait_queue_head, %struct.file_lock*, %struct.address_space*, %struct.address_space, [2 x %struct.dquot*], %struct.list_head, %struct.pipe_inode_info*, %struct.block_device*, %struct.char_device*, i32, %struct.dnotify_struct*, i32, i32, i8, %struct.IO_APIC_reg_00, i32, i32, { %struct.ext2_inode_info, %struct.ext3_inode_info, %struct.msdos_inode_info, %struct.iso_inode_info, %struct.nfs_inode_info, %struct._drm_i810_overlay_t, %struct.shmem_inode_info, %struct.proc_inode_info, %struct.socket, %struct.usbdev_inode_info, i8* } } - %struct.inode_operations = type { i32 (%struct.inode*, %struct.dentry*, i32)*, %struct.dentry* (%struct.inode*, %struct.dentry*)*, i32 (%struct.dentry*, %struct.inode*, %struct.dentry*)*, i32 (%struct.inode*, %struct.dentry*)*, i32 (%struct.inode*, %struct.dentry*, i8*)*, i32 (%struct.inode*, %struct.dentry*, i32)*, i32 (%struct.inode*, %struct.dentry*)*, i32 (%struct.inode*, %struct.dentry*, i32, i32)*, i32 (%struct.inode*, %struct.dentry*, %struct.inode*, %struct.dentry*)*, i32 (%struct.dentry*, i8*, i32)*, i32 (%struct.dentry*, %struct.nameidata*)*, void (%struct.inode*)*, i32 (%struct.inode*, i32)*, i32 (%struct.dentry*)*, i32 (%struct.dentry*, %struct.iattr*)*, i32 (%struct.dentry*, %struct.iattr*)*, i32 (%struct.dentry*, i8*, i8*, i32, i32)*, i32 (%struct.dentry*, i8*, i8*, i32)*, i32 (%struct.dentry*, i8*, i32)*, i32 (%struct.dentry*, i8*)* } - %struct.iovec = type { i8*, i32 } - %struct.ip_options = type { i32, i8, i8, i8, i8, i8, i8, i8, i8, [0 x i8] } - %struct.isapnp_dma = type { i8, i8, %struct.isapnp_resources*, %struct.isapnp_dma* } - %struct.isapnp_irq = type { i16, i8, i8, %struct.isapnp_resources*, %struct.isapnp_irq* } - %struct.isapnp_mem = type { i32, i32, i32, i32, i8, i8, %struct.isapnp_resources*, %struct.isapnp_mem* } - %struct.isapnp_mem32 = type { [17 x i8], %struct.isapnp_resources*, %struct.isapnp_mem32* } - %struct.isapnp_port = type { i16, i16, i8, i8, i8, i8, %struct.isapnp_resources*, %struct.isapnp_port* } - %struct.isapnp_resources = type { i16, i16, %struct.isapnp_port*, %struct.isapnp_irq*, %struct.isapnp_dma*, %struct.isapnp_mem*, %struct.isapnp_mem32*, %struct.pci_dev*, %struct.isapnp_resources*, %struct.isapnp_resources* } - %struct.iso_inode_info = type { i32, i8, [3 x i8], i32, i32 } - %struct.iw_handler_def = type opaque - %struct.iw_statistics = type opaque - %struct.k_sigaction = type { %struct.sigaction } - %struct.kern_ipc_perm = type { i32, i32, i32, i32, i32, i16, i32 } - %struct.kiobuf = type { i32, i32, i32, i32, i32, %struct.page**, %struct.buffer_head**, i32*, %struct.IO_APIC_reg_00, i32, void (%struct.kiobuf*)*, %struct.__wait_queue_head } - %struct.kmem_cache_s = type { %struct.list_head, %struct.list_head, %struct.list_head, i32, i32, i32, %struct.IO_APIC_reg_00, i32, i32, i32, i32, i32, i32, %struct.kmem_cache_s*, i32, i32, void (i8*, %struct.kmem_cache_s*, i32)*, void (i8*, %struct.kmem_cache_s*, i32)*, i32, [20 x i8], %struct.list_head, [32 x %struct._drm_i810_overlay_t*], i32 } - %struct.linux_binfmt = type { %struct.linux_binfmt*, %struct.module*, i32 (%struct.linux_binprm*, %struct.pt_regs*)*, i32 (%struct.file*)*, i32 (i32, %struct.pt_regs*, %struct.file*)*, i32, i32 (%struct.linux_binprm*, i8*)* } - %struct.linux_binprm = type { [128 x i8], [32 x %struct.page*], i32, i32, %struct.file*, i32, i32, i32, i32, i32, i32, i32, i8*, i32, i32 } - %struct.list_head = type { %struct.list_head*, %struct.list_head* } - %struct.llva_sigcontext = type { %typedef.llva_icontext_t, %typedef.llva_fp_state_t, i32, i32, i32, i32, [1 x i32], i8* } - %struct.map_segment = type opaque - %struct.mem_dqblk = type { i32, i32, i64, i32, i32, i32, i32, i32 } - %struct.mem_dqinfo = type { %struct.quota_format_type*, i32, i32, i32, { %struct.ViceFid } } - %struct.mm_struct = type { %struct.vm_area_struct*, %struct.rb_root_s, %struct.vm_area_struct*, %struct.IO_APIC_reg_00*, %struct.IO_APIC_reg_00, %struct.IO_APIC_reg_00, i32, %struct.rw_semaphore, %struct.IO_APIC_reg_00, %struct.list_head, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, %struct.iovec } - %struct.module = type { i32, %struct.module*, i8*, i32, %struct.IO_APIC_reg_00, i32, i32, i32, %struct.drm_ctx_priv_map*, %struct.module_ref*, %struct.module_ref*, i32 ()*, void ()*, %struct._drm_i810_overlay_t*, %struct._drm_i810_overlay_t*, %struct.module_persist*, %struct.module_persist*, i32 ()*, i32, i8*, i8*, i8*, i8*, i8* } - %struct.module_persist = type opaque - %struct.module_ref = type { %struct.module*, %struct.module*, %struct.module_ref* } - %struct.msdos_inode_info = type { i32, i32, i32, i32, i32, i32, %struct.inode*, %struct.list_head } - %struct.msghdr = type { i8*, i32, %struct.iovec*, i32, i8*, i32, i32 } - %struct.msq_setbuf = type { i32, i32, i32, i16 } - %struct.nameidata = type { %struct.dentry*, %struct.vfsmount*, %struct.qstr, i32, i32 } - %struct.namespace = type { %struct.IO_APIC_reg_00, %struct.vfsmount*, %struct.list_head, %struct.rw_semaphore } - %struct.neigh_ops = type { i32, void (%struct.neighbour*)*, void (%struct.neighbour*, %struct.sk_buff*)*, void (%struct.neighbour*, %struct.sk_buff*)*, i32 (%struct.sk_buff*)*, i32 (%struct.sk_buff*)*, i32 (%struct.sk_buff*)*, i32 (%struct.sk_buff*)* } - %struct.neigh_parms = type { %struct.neigh_parms*, i32 (%struct.neighbour*)*, %struct.neigh_table*, i32, i8*, i8*, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 } - %struct.neigh_table = type { %struct.neigh_table*, i32, i32, i32, i32 (i8*, %struct.net_device*)*, i32 (%struct.neighbour*)*, i32 (%struct.pneigh_entry*)*, void (%struct.pneigh_entry*)*, void (%struct.sk_buff*)*, i8*, %struct.neigh_parms, i32, i32, i32, i32, i32, %struct.timer_list, %struct.timer_list, %struct.sk_buff_head, i32, %typedef.rwlock_t, i32, %struct.neigh_parms*, %struct.kmem_cache_s*, %struct.tasklet_struct, %struct.audio_buf_info, [32 x %struct.neighbour*], [16 x %struct.pneigh_entry*] } - %struct.neighbour = type { %struct.neighbour*, %struct.neigh_table*, %struct.neigh_parms*, %struct.net_device*, i32, i32, i32, i8, i8, i8, i8, %struct.IO_APIC_reg_00, %typedef.rwlock_t, [8 x i8], %struct.hh_cache*, %struct.IO_APIC_reg_00, i32 (%struct.sk_buff*)*, %struct.sk_buff_head, %struct.timer_list, %struct.neigh_ops*, [0 x i8] } - %struct.net_bridge_port = type opaque - %struct.net_device = type { [16 x i8], i32, i32, i32, i32, i32, i32, i8, i8, i32, %struct.net_device*, i32 (%struct.net_device*)*, %struct.net_device*, i32, i32, %struct.net_device_stats* (%struct.net_device*)*, %struct.iw_statistics* (%struct.net_device*)*, %struct.iw_handler_def*, i32, i32, i16, i16, i16, i16, i32, i16, i16, i8*, %struct.net_device*, [8 x i8], [8 x i8], i8, %struct.dev_mc_list*, i32, i32, i32, i32, %struct.timer_list, i8*, i8*, i8*, i8*, i8*, %struct.list_head, i32, i32, %struct.Qdisc*, %struct.Qdisc*, %struct.Qdisc*, %struct.Qdisc*, i32, %struct.IO_APIC_reg_00, i32, %struct.IO_APIC_reg_00, %struct.IO_APIC_reg_00, i32, i32, void (%struct.net_device*)*, void (%struct.net_device*)*, i32 (%struct.net_device*)*, i32 (%struct.net_device*)*, i32 (%struct.sk_buff*, %struct.net_device*)*, i32 (%struct.net_device*, i32*)*, i32 (%struct.sk_buff*, %struct.net_device*, i16, i8*, i8*, i32)*, i32 (%struct.sk_buff*)*, void (%struct.net_device*)*, i32 (%struct.net_device*, i8*)*, i32 (%struct.net_device*, %struct.ifreq*, i32)*, i32 (%struct.net_device*, %struct.ifmap*)*, i32 (%struct.neighbour*, %struct.hh_cache*)*, void (%struct.hh_cache*, %struct.net_device*, i8*)*, i32 (%struct.net_device*, i32)*, void (%struct.net_device*)*, void (%struct.net_device*, %struct.vlan_group*)*, void (%struct.net_device*, i16)*, void (%struct.net_device*, i16)*, i32 (%struct.sk_buff*, i8*)*, i32 (%struct.net_device*, %struct.neigh_parms*)*, i32 (%struct.net_device*, %struct.dst_entry*)*, %struct.module*, %struct.net_bridge_port* } - %struct.net_device_stats = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 } - %struct.nf_conntrack = type { %struct.IO_APIC_reg_00, void (%struct.nf_conntrack*)* } - %struct.nf_ct_info = type { %struct.nf_conntrack* } - %struct.nfs_fh = type { i16, [64 x i8] } - %struct.nfs_inode_info = type { i64, %struct.nfs_fh, i16, i32, i64, i64, i64, i32, i32, i32, [2 x i32], %struct.list_head, %struct.list_head, %struct.list_head, %struct.list_head, i32, i32, i32, i32, %struct.rpc_cred* } - %struct.nfs_lock_info = type { i32, i32, %struct.nlm_host* } - %struct.nlm_host = type opaque - %struct.open_request = type { %struct.open_request*, i32, i32, i16, i16, i8, i8, i16, i32, i32, i32, i32, %struct.or_calltable*, %struct.sock*, { %struct.tcp_v4_open_req } } - %struct.or_calltable = type { i32, i32 (%struct.sock*, %struct.open_request*, %struct.dst_entry*)*, void (%struct.sk_buff*, %struct.open_request*)*, void (%struct.open_request*)*, void (%struct.sk_buff*)* } - %struct.page = type { %struct.list_head, %struct.address_space*, i32, %struct.page*, %struct.IO_APIC_reg_00, i32, %struct.list_head, %struct.page**, %struct.buffer_head* } - %struct.pci_bus = type { %struct.list_head, %struct.pci_bus*, %struct.list_head, %struct.list_head, %struct.pci_dev*, [4 x %struct.resource*], %struct.pci_ops*, i8*, %struct.proc_dir_entry*, i8, i8, i8, i8, [48 x i8], i16, i16, i32, i8, i8, i8, i8 } - %struct.pci_dev = type { %struct.list_head, %struct.list_head, %struct.pci_bus*, %struct.pci_bus*, i8*, %struct.proc_dir_entry*, i32, i16, i16, i16, i16, i32, i8, i8, %struct.pci_driver*, i8*, i64, i32, [4 x i16], [4 x i16], i32, [12 x %struct.resource], [2 x %struct.resource], [2 x %struct.resource], [90 x i8], [8 x i8], i32, i32, i16, i16, i32 (%struct.pci_dev*)*, i32 (%struct.pci_dev*)*, i32 (%struct.pci_dev*)* } - %struct.pci_device_id = type { i32, i32, i32, i32, i32, i32, i32 } - %struct.pci_driver = type { %struct.list_head, i8*, %struct.pci_device_id*, i32 (%struct.pci_dev*, %struct.pci_device_id*)*, void (%struct.pci_dev*)*, i32 (%struct.pci_dev*, i32)*, i32 (%struct.pci_dev*, i32)*, i32 (%struct.pci_dev*)*, i32 (%struct.pci_dev*, i32, i32)* } - %struct.pci_ops = type { i32 (%struct.pci_dev*, i32, i8*)*, i32 (%struct.pci_dev*, i32, i16*)*, i32 (%struct.pci_dev*, i32, i32*)*, i32 (%struct.pci_dev*, i32, i8)*, i32 (%struct.pci_dev*, i32, i16)*, i32 (%struct.pci_dev*, i32, i32)* } - %struct.pipe_inode_info = type { %struct.__wait_queue_head, i8*, i32, i32, i32, i32, i32, i32, i32, i32 } - %struct.pneigh_entry = type { %struct.pneigh_entry*, %struct.net_device*, [0 x i8] } - %struct.poll_table_entry = type { %struct.file*, %struct.__wait_queue, %struct.__wait_queue_head* } - %struct.poll_table_page = type { %struct.poll_table_page*, %struct.poll_table_entry*, [0 x %struct.poll_table_entry] } - %struct.poll_table_struct = type { i32, %struct.poll_table_page* } - %struct.proc_dir_entry = type { i16, i16, i8*, i16, i16, i32, i32, i32, %struct.inode_operations*, %struct.file_operations*, i32 (i8*, i8**, i32, i32)*, %struct.module*, %struct.proc_dir_entry*, %struct.proc_dir_entry*, %struct.proc_dir_entry*, i8*, i32 (i8*, i8**, i32, i32, i32*, i8*)*, i32 (%struct.file*, i8*, i32, i8*)*, %struct.IO_APIC_reg_00, i32, i16 } - %struct.proc_inode_info = type { %struct.task_struct*, i32, { i32 (%struct.task_struct*, i8*)* }, %struct.file* } - %struct.proto = type { void (%struct.sock*, i32)*, i32 (%struct.sock*, %struct.sockaddr*, i32)*, i32 (%struct.sock*, i32)*, %struct.sock* (%struct.sock*, i32, i32*)*, i32 (%struct.sock*, i32, i32)*, i32 (%struct.sock*)*, i32 (%struct.sock*)*, void (%struct.sock*, i32)*, i32 (%struct.sock*, i32, i32, i8*, i32)*, i32 (%struct.sock*, i32, i32, i8*, i32*)*, i32 (%struct.sock*, %struct.msghdr*, i32)*, i32 (%struct.sock*, %struct.msghdr*, i32, i32, i32, i32*)*, i32 (%struct.sock*, %struct.sockaddr*, i32)*, i32 (%struct.sock*, %struct.sk_buff*)*, void (%struct.sock*)*, void (%struct.sock*)*, i32 (%struct.sock*, i16)*, [32 x i8], [32 x { i32, [28 x i8] }] } - %struct.proto_ops = type { i32, i32 (%struct.socket*)*, i32 (%struct.socket*, %struct.sockaddr*, i32)*, i32 (%struct.socket*, %struct.sockaddr*, i32, i32)*, i32 (%struct.socket*, %struct.socket*)*, i32 (%struct.socket*, %struct.socket*, i32)*, i32 (%struct.socket*, %struct.sockaddr*, i32*, i32)*, i32 (%struct.file*, %struct.socket*, %struct.poll_table_struct*)*, i32 (%struct.socket*, i32, i32)*, i32 (%struct.socket*, i32)*, i32 (%struct.socket*, i32)*, i32 (%struct.socket*, i32, i32, i8*, i32)*, i32 (%struct.socket*, i32, i32, i8*, i32*)*, i32 (%struct.socket*, %struct.msghdr*, i32, %struct.scm_cookie*)*, i32 (%struct.socket*, %struct.msghdr*, i32, i32, %struct.scm_cookie*)*, i32 (%struct.file*, %struct.socket*, %struct.vm_area_struct*)*, i32 (%struct.socket*, %struct.page*, i32, i32, i32)* } - %struct.pt_regs = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 } - %struct.qdisc_walker = type { i32, i32, i32, i32 (%struct.Qdisc*, i32, %struct.qdisc_walker*)* } - %struct.qstr = type { i8*, i32, i32 } - %struct.quota_format_ops = type { i32 (%struct.super_block*, i32)*, i32 (%struct.super_block*, i32)*, i32 (%struct.super_block*, i32)*, i32 (%struct.super_block*, i32)*, i32 (%struct.dquot*)*, i32 (%struct.dquot*)* } - %struct.quota_format_type = type { i32, %struct.quota_format_ops*, %struct.module*, %struct.quota_format_type* } - %struct.quota_info = type { i32, %struct.semaphore, %struct.semaphore, [2 x %struct.file*], [2 x %struct.mem_dqinfo], [2 x %struct.quota_format_ops*] } - %struct.quotactl_ops = type { i32 (%struct.super_block*, i32, i32, i8*)*, i32 (%struct.super_block*, i32)*, i32 (%struct.super_block*, i32)*, i32 (%struct.super_block*, i32, %struct.if_dqinfo*)*, i32 (%struct.super_block*, i32, %struct.if_dqinfo*)*, i32 (%struct.super_block*, i32, i32, %struct.if_dqblk*)*, i32 (%struct.super_block*, i32, i32, %struct.if_dqblk*)*, i32 (%struct.super_block*, %struct.fs_quota_stat*)*, i32 (%struct.super_block*, i32, i32)*, i32 (%struct.super_block*, i32, i32, %struct.fs_disk_quota*)*, i32 (%struct.super_block*, i32, i32, %struct.fs_disk_quota*)* } - %struct.rb_node_s = type { %struct.rb_node_s*, i32, %struct.rb_node_s*, %struct.rb_node_s* } - %struct.rb_root_s = type { %struct.rb_node_s* } - %struct.resource = type { i8*, i32, i32, i32, %struct.resource*, %struct.resource*, %struct.resource* } - %struct.revectored_struct = type { [8 x i32] } - %struct.rpc_auth = type { [8 x %struct.rpc_cred*], i32, i32, i32, i32, i32, %struct.rpc_authops* } - %struct.rpc_authops = type { i32, i8*, %struct.rpc_auth* (%struct.rpc_clnt*)*, void (%struct.rpc_auth*)*, %struct.rpc_cred* (i32)* } - %struct.rpc_clnt = type { %struct.IO_APIC_reg_00, %struct.rpc_xprt*, %struct.rpc_procinfo*, i32, i8*, i8*, %struct.rpc_auth*, %struct.rpc_stat*, i32, i32, i32, %struct.rpc_rtt, %struct.msq_setbuf, %struct.rpc_wait_queue, i32, [32 x i8] } - %struct.rpc_cred = type { %struct.rpc_cred*, %struct.rpc_auth*, %struct.rpc_credops*, i32, %struct.IO_APIC_reg_00, i16, i32, i32 } - %struct.rpc_credops = type { void (%struct.rpc_cred*)*, i32 (%struct.rpc_cred*, i32)*, i32* (%struct.rpc_task*, i32*, i32)*, i32 (%struct.rpc_task*)*, i32* (%struct.rpc_task*, i32*)* } - %struct.rpc_message = type { i32, i8*, i8*, %struct.rpc_cred* } - %struct.rpc_procinfo = type { i8*, i32 (i8*, i32*, i8*)*, i32 (i8*, i32*, i8*)*, i32, i32, i32 } - %struct.rpc_program = type { i8*, i32, i32, %struct.rpc_version**, %struct.rpc_stat* } - %struct.rpc_rqst = type { %struct.rpc_xprt*, %struct.rpc_timeout, %struct.xdr_buf, %struct.xdr_buf, %struct.rpc_task*, i32, %struct.rpc_rqst*, i32, i32, %struct.list_head, %struct.xdr_buf, [2 x i32], i32, i32, i32, i32 } - %struct.rpc_rtt = type { i32, [5 x i32], [5 x i32], %struct.IO_APIC_reg_00 } - %struct.rpc_stat = type { %struct.rpc_program*, i32, i32, i32, i32, i32, i32, i32, i32, i32 } - %struct.rpc_task = type { %struct.list_head, i32, %struct.list_head, %struct.rpc_clnt*, %struct.rpc_rqst*, i32, %struct.rpc_wait_queue*, %struct.rpc_message, i32*, i8, i8, i8, void (%struct.rpc_task*)*, void (%struct.rpc_task*)*, void (%struct.rpc_task*)*, void (%struct.rpc_task*)*, void (%struct.rpc_task*)*, i8*, %struct.timer_list, %struct.__wait_queue_head, i32, i16, i8, i32, i16 } - %struct.rpc_timeout = type { i32, i32, i32, i32, i16, i8 } - %struct.rpc_version = type { i32, i32, %struct.rpc_procinfo* } - %struct.rpc_wait_queue = type { %struct.list_head, i8* } - %struct.rpc_xprt = type { %struct.socket*, %struct.sock*, %struct.rpc_timeout, %struct.sockaddr_in, i32, i32, i32, i32, i32, %struct.rpc_wait_queue, %struct.rpc_wait_queue, %struct.rpc_wait_queue, %struct.rpc_wait_queue, %struct.rpc_rqst*, [16 x %struct.rpc_rqst], i32, i8, i32, i32, i32, i32, i32, i32, %struct.IO_APIC_reg_00, %struct.IO_APIC_reg_00, %struct.rpc_task*, %struct.list_head, void (%struct.sock*, i32)*, void (%struct.sock*)*, void (%struct.sock*)*, %struct.__wait_queue_head } - %struct.rw_semaphore = type { i32, %struct.IO_APIC_reg_00, %struct.list_head } - %struct.scm_cookie = type { %struct.ViceFid, %struct.scm_fp_list*, i32 } - %struct.scm_fp_list = type { i32, [255 x %struct.file*] } - %struct.sem_array = type { %struct.kern_ipc_perm, i32, i32, %struct._drm_i810_overlay_t*, %struct.sem_queue*, %struct.sem_queue**, %struct.sem_undo*, i32 } - %struct.sem_queue = type { %struct.sem_queue*, %struct.sem_queue**, %struct.task_struct*, %struct.sem_undo*, i32, i32, %struct.sem_array*, i32, %struct.sembuf*, i32, i32 } - %struct.sem_undo = type { %struct.sem_undo*, %struct.sem_undo*, i32, i16* } - %struct.semaphore = type { %struct.IO_APIC_reg_00, i32, %struct.__wait_queue_head } - %struct.sembuf = type { i16, i16, i16 } - %struct.seq_file = type { i8*, i32, i32, i32, i64, %struct.semaphore, %struct.seq_operations*, i8* } - %struct.seq_operations = type { i8* (%struct.seq_file*, i64*)*, void (%struct.seq_file*, i8*)*, i8* (%struct.seq_file*, i8*, i64*)*, i32 (%struct.seq_file*, i8*)* } - %struct.shmem_inode_info = type { %struct.IO_APIC_reg_00, i32, [16 x %struct.IO_APIC_reg_00], i8**, i32, i32, %struct.list_head, %struct.inode* } - %struct.sigaction = type { void (i32)*, i32, void ()*, %typedef.__kernel_fsid_t } - %struct.siginfo = type { i32, i32, i32, { [29 x i32] } } - %struct.signal_struct = type { %struct.IO_APIC_reg_00, [64 x %struct.k_sigaction], %struct.IO_APIC_reg_00 } - %struct.sigpending = type { %struct.sigqueue*, %struct.sigqueue**, %typedef.__kernel_fsid_t } - %struct.sigqueue = type { %struct.sigqueue*, %struct.siginfo } - %struct.sk_buff = type { %struct.sk_buff*, %struct.sk_buff*, %struct.sk_buff_head*, %struct.sock*, %struct._drm_i810_overlay_t, %struct.net_device*, %struct.net_device*, { i8* }, { i8* }, { i8* }, %struct.dst_entry*, [48 x i8], i32, i32, i32, i8, i8, i8, i8, i32, %struct.IO_APIC_reg_00, i16, i16, i32, i8*, i8*, i8*, i8*, void (%struct.sk_buff*)*, i32, i32, %struct.nf_ct_info*, i32 } - %struct.sk_buff_head = type { %struct.sk_buff*, %struct.sk_buff*, i32, %struct.IO_APIC_reg_00 } - %struct.sock = type { i32, i32, i16, i16, i32, %struct.sock*, %struct.sock**, %struct.sock*, %struct.sock**, i8, i8, i16, i16, i8, i8, %struct.IO_APIC_reg_00, %struct.semaphore, i32, %struct.__wait_queue_head*, %struct.dst_entry*, %typedef.rwlock_t, %struct.IO_APIC_reg_00, %struct.sk_buff_head, %struct.IO_APIC_reg_00, %struct.sk_buff_head, %struct.IO_APIC_reg_00, i32, i32, i32, i32, i32, %struct.sock*, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i32, i32, i32, i32, %struct.sock*, { %struct.sk_buff*, %struct.sk_buff* }, %typedef.rwlock_t, %struct.sk_buff_head, %struct.proto*, { %struct.tcp_opt }, i32, i32, i16, i16, i32, i16, i8, i8, %struct.ViceFid, i32, i32, i32, { %struct.unix_opt }, %struct.timer_list, %struct._drm_i810_overlay_t, %struct.socket*, i8*, void (%struct.sock*)*, void (%struct.sock*, i32)*, void (%struct.sock*)*, void (%struct.sock*)*, i32 (%struct.sock*, %struct.sk_buff*)*, void (%struct.sock*)* } - %struct.sockaddr = type { i16, [14 x i8] } - %struct.sockaddr_in = type { i16, i16, %struct.IO_APIC_reg_00, [8 x i8] } - %struct.sockaddr_un = type { i16, [108 x i8] } - %struct.socket = type { i32, i32, %struct.proto_ops*, %struct.inode*, %struct.fasync_struct*, %struct.file*, %struct.sock*, %struct.__wait_queue_head, i16, i8 } - %struct.statfs = type { i32, i32, i32, i32, i32, i32, i32, %typedef.__kernel_fsid_t, i32, [6 x i32] } - %struct.super_block = type { %struct.list_head, i16, i32, i8, i8, i64, %struct.file_system_type*, %struct.super_operations*, %struct.dquot_operations*, %struct.quotactl_ops*, i32, i32, %struct.dentry*, %struct.rw_semaphore, %struct.semaphore, i32, %struct.IO_APIC_reg_00, %struct.list_head, %struct.list_head, %struct.list_head, %struct.block_device*, %struct.list_head, %struct.quota_info, { [115 x i32] }, %struct.semaphore, %struct.semaphore } - %struct.super_operations = type { %struct.inode* (%struct.super_block*)*, void (%struct.inode*)*, void (%struct.inode*)*, void (%struct.inode*, i8*)*, void (%struct.inode*)*, void (%struct.inode*, i32)*, void (%struct.inode*)*, void (%struct.inode*)*, void (%struct.super_block*)*, void (%struct.super_block*)*, i32 (%struct.super_block*)*, void (%struct.super_block*)*, void (%struct.super_block*)*, i32 (%struct.super_block*, %struct.statfs*)*, i32 (%struct.super_block*, i32*, i8*)*, void (%struct.inode*)*, void (%struct.super_block*)*, %struct.dentry* (%struct.super_block*, i32*, i32, i32, i32)*, i32 (%struct.dentry*, i32*, i32*, i32)*, i32 (%struct.seq_file*, %struct.vfsmount*)* } - %struct.task_struct = type { i32, i32, i32, %struct.IO_APIC_reg_00, %struct.exec_domain*, i32, i32, i32, i32, i32, i32, %struct.mm_struct*, i32, i32, i32, %struct.list_head, i32, %struct.task_struct*, %struct.task_struct*, %struct.mm_struct*, %struct.list_head, i32, i32, %struct.linux_binfmt*, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, %struct.task_struct*, %struct.task_struct*, %struct.task_struct*, %struct.task_struct*, %struct.task_struct*, %struct.list_head, %struct.task_struct*, %struct.task_struct**, %struct.__wait_queue_head, %struct.completion*, i32, i32, i32, i32, i32, i32, i32, %struct.timer_list, %struct.audio_buf_info, i32, [32 x i32], [32 x i32], i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, [32 x i32], i32, i32, i32, i32, %struct.user_struct*, [11 x %struct._drm_i810_overlay_t], i16, [16 x i8], i32, i32, %struct.tty_struct*, i32, %struct.sem_undo*, %struct.sem_queue*, %struct.thread_struct, %struct.fs_struct*, %struct.files_struct*, %struct.namespace*, %struct.IO_APIC_reg_00, %struct.signal_struct*, %typedef.__kernel_fsid_t, %struct.sigpending, i32, i32, i32 (i8*)*, i8*, %typedef.__kernel_fsid_t*, i32, i32, %struct.IO_APIC_reg_00, i8*, %struct.llva_sigcontext*, i32, %struct.task_struct*, i32, %typedef.llva_icontext_t, %typedef.llva_fp_state_t, i32*, i32, i8* } - %struct.tasklet_struct = type { %struct.tasklet_struct*, i32, %struct.IO_APIC_reg_00, void (i32)*, i32 } - %struct.tc_stats = type { i64, i32, i32, i32, i32, i32, i32, i32, %struct.IO_APIC_reg_00* } - %struct.tcf_proto = type { %struct.tcf_proto*, i8*, i32 (%struct.sk_buff*, %struct.tcf_proto*, %struct._drm_i810_overlay_t*)*, i32, i32, i32, %struct.Qdisc*, i8*, %struct.tcf_proto_ops* } - %struct.tcf_proto_ops = type { %struct.tcf_proto_ops*, [16 x i8], i32 (%struct.sk_buff*, %struct.tcf_proto*, %struct._drm_i810_overlay_t*)*, i32 (%struct.tcf_proto*)*, void (%struct.tcf_proto*)*, i32 (%struct.tcf_proto*, i32)*, void (%struct.tcf_proto*, i32)*, i32 (%struct.tcf_proto*, i32, i32, %struct._agp_version**, i32*)*, i32 (%struct.tcf_proto*, i32)*, void (%struct.tcf_proto*, %struct.tcf_walker*)*, i32 (%struct.tcf_proto*, i32, %struct.sk_buff*, %struct.tcmsg*)* } - %struct.tcf_walker = type { i32, i32, i32, i32 (%struct.tcf_proto*, i32, %struct.tcf_walker*)* } - %struct.tcmsg = type { i8, i8, i16, i32, i32, i32, i32 } - %struct.tcp_func = type { i32 (%struct.sk_buff*)*, void (%struct.sock*, %struct.tcphdr*, i32, %struct.sk_buff*)*, i32 (%struct.sock*)*, i32 (%struct.sock*, %struct.sk_buff*)*, %struct.sock* (%struct.sock*, %struct.sk_buff*, %struct.open_request*, %struct.dst_entry*)*, i32 (%struct.sock*)*, i16, i32 (%struct.sock*, i32, i32, i8*, i32)*, i32 (%struct.sock*, i32, i32, i8*, i32*)*, void (%struct.sock*, %struct.sockaddr*)*, i32 } - %struct.tcp_listen_opt = type { i8, i32, i32, i32, i32, [512 x %struct.open_request*] } - %struct.tcp_opt = type { i32, i32, i32, i32, i32, i32, i32, i32, { i8, i8, i8, i8, i32, i32, i32, i16, i16 }, { %struct.sk_buff_head, %struct.task_struct*, %struct.iovec*, i32, i32 }, i32, i32, i32, i32, i16, i16, i16, i8, i8, i8, i8, i8, i8, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i16, i16, i32, i32, i32, %struct.timer_list, %struct.timer_list, %struct.sk_buff_head, %struct.tcp_func*, %struct.sk_buff*, %struct.page*, i32, i32, i32, i32, i32, i32, i8, i8, i8, i8, i8, i8, i8, i8, i32, i32, i32, i32, i16, i8, i8, [1 x %struct._drm_i810_overlay_t], [4 x %struct._drm_i810_overlay_t], i32, i32, i8, i8, i16, i8, i8, i16, i32, i32, i32, i32, i32, i32, i32, i32, i16, i8, i8, i32, %typedef.rwlock_t, %struct.tcp_listen_opt*, %struct.open_request*, %struct.open_request*, i32, i32, i32, i32, i32, i32, i32 } - %struct.tcp_v4_open_req = type { i32, i32, %struct.ip_options* } - %struct.tcphdr = type { i16, i16, i32, i32, i16, i16, i16, i16 } - %struct.termios = type { i32, i32, i32, i32, i8, [19 x i8] } - %struct.thread_struct = type { i32, i32, i32, i32, i32, [8 x i32], i32, i32, i32, %union.i387_union, %struct.vm86_struct*, i32, i32, i32, i32, i32, [33 x i32] } - %struct.timer_list = type { %struct.list_head, i32, i32, void (i32)* } - %struct.tq_struct = type { %struct.list_head, i32, void (i8*)*, i8* } - %struct.tty_driver = type { i32, i8*, i8*, i32, i16, i16, i16, i16, i16, %struct.termios, i32, i32*, %struct.proc_dir_entry*, %struct.tty_driver*, %struct.tty_struct**, %struct.termios**, %struct.termios**, i8*, i32 (%struct.tty_struct*, %struct.file*)*, void (%struct.tty_struct*, %struct.file*)*, i32 (%struct.tty_struct*, i32, i8*, i32)*, void (%struct.tty_struct*, i8)*, void (%struct.tty_struct*)*, i32 (%struct.tty_struct*)*, i32 (%struct.tty_struct*)*, i32 (%struct.tty_struct*, %struct.file*, i32, i32)*, void (%struct.tty_struct*, %struct.termios*)*, void (%struct.tty_struct*)*, void (%struct.tty_struct*)*, void (%struct.tty_struct*)*, void (%struct.tty_struct*)*, void (%struct.tty_struct*)*, void (%struct.tty_struct*, i32)*, void (%struct.tty_struct*)*, void (%struct.tty_struct*)*, void (%struct.tty_struct*, i32)*, void (%struct.tty_struct*, i8)*, i32 (i8*, i8**, i32, i32, i32*, i8*)*, i32 (%struct.file*, i8*, i32, i8*)*, %struct.tty_driver*, %struct.tty_driver* } - %struct.tty_flip_buffer = type { %struct.tq_struct, %struct.semaphore, i8*, i8*, i32, i32, [1024 x i8], [1024 x i8], [4 x i8] } - %struct.tty_ldisc = type { i32, i8*, i32, i32, i32 (%struct.tty_struct*)*, void (%struct.tty_struct*)*, void (%struct.tty_struct*)*, i32 (%struct.tty_struct*)*, i32 (%struct.tty_struct*, %struct.file*, i8*, i32)*, i32 (%struct.tty_struct*, %struct.file*, i8*, i32)*, i32 (%struct.tty_struct*, %struct.file*, i32, i32)*, void (%struct.tty_struct*, %struct.termios*)*, i32 (%struct.tty_struct*, %struct.file*, %struct.poll_table_struct*)*, void (%struct.tty_struct*, i8*, i8*, i32)*, i32 (%struct.tty_struct*)*, void (%struct.tty_struct*)* } - %struct.tty_struct = type { i32, %struct.tty_driver, %struct.tty_ldisc, %struct.termios*, %struct.termios*, i32, i32, i16, i32, i32, %struct.drm_clip_rect, i8, i8, %struct.tty_struct*, %struct.fasync_struct*, %struct.tty_flip_buffer, i32, i32, %struct.__wait_queue_head, %struct.__wait_queue_head, %struct.tq_struct, i8*, i8*, %struct.list_head, i32, i8, i16, i32, i32, [8 x i32], i8*, i32, i32, i32, [128 x i32], i32, i32, i32, %struct.semaphore, %struct.semaphore, %struct.IO_APIC_reg_00, %struct.tq_struct } - %struct.unix_address = type { %struct.IO_APIC_reg_00, i32, i32, [0 x %struct.sockaddr_un] } - %struct.unix_opt = type { %struct.unix_address*, %struct.dentry*, %struct.vfsmount*, %struct.semaphore, %struct.sock*, %struct.sock**, %struct.sock*, %struct.IO_APIC_reg_00, %typedef.rwlock_t, %struct.__wait_queue_head } - %struct.usb_bus = type opaque - %struct.usbdev_inode_info = type { %struct.list_head, %struct.list_head, { %struct.usb_bus* } } - %struct.user_struct = type { %struct.IO_APIC_reg_00, %struct.IO_APIC_reg_00, %struct.IO_APIC_reg_00, %struct.user_struct*, %struct.user_struct**, i32 } - %struct.vfsmount = type { %struct.list_head, %struct.vfsmount*, %struct.dentry*, %struct.dentry*, %struct.super_block*, %struct.list_head, %struct.list_head, %struct.IO_APIC_reg_00, i32, i8*, %struct.list_head } - %struct.vlan_group = type opaque - %struct.vm86_regs = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i16, i16, i32, i32, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16 } - %struct.vm86_struct = type { %struct.vm86_regs, i32, i32, i32, %struct.revectored_struct, %struct.revectored_struct } - %struct.vm_area_struct = type { %struct.mm_struct*, i32, i32, %struct.vm_area_struct*, %struct.IO_APIC_reg_00, i32, %struct.rb_node_s, %struct.vm_area_struct*, %struct.vm_area_struct**, %struct.vm_operations_struct*, i32, %struct.file*, i32, i8* } - %struct.vm_operations_struct = type { void (%struct.vm_area_struct*)*, void (%struct.vm_area_struct*)*, %struct.page* (%struct.vm_area_struct*, i32, i32)* } - %struct.xdr_buf = type { [1 x %struct.iovec], [1 x %struct.iovec], %struct.page**, i32, i32, i32 } - %typedef.__kernel_fd_set = type { [32 x i32] } - %typedef.__kernel_fsid_t = type { [2 x i32] } - %typedef.dvd_authinfo = type { [2 x i64] } - %typedef.llva_fp_state_t = type { [7 x i32], [20 x i32] } - %typedef.llva_icontext_t = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32*, i32 } - %typedef.rwlock_t = type { %struct.IO_APIC_reg_00, %struct.IO_APIC_reg_00, i32 } - %typedef.sigset_t = type { [2 x i32] } - %typedef.socket_lock_t = type { %struct.IO_APIC_reg_00, i32, %struct.__wait_queue_head } - %union.i387_union = type { %struct.i387_fxsave_struct } - -define void @rs_init() { -entry: - br i1 false, label %loopentry.0.no_exit.0_crit_edge, label %loopentry.0.loopexit.0_crit_edge - -loopentry.0: ; No predecessors! - unreachable - -loopentry.0.loopexit.0_crit_edge: ; preds = %entry - br label %loopexit.0 - -loopentry.0.no_exit.0_crit_edge: ; preds = %entry - br label %no_exit.0 - -no_exit.0: ; preds = %no_exit.0.no_exit.0_crit_edge, %loopentry.0.no_exit.0_crit_edge - br i1 false, label %no_exit.0.no_exit.0_crit_edge, label %no_exit.0.loopexit.0_crit_edge - -no_exit.0.loopexit.0_crit_edge: ; preds = %no_exit.0 - br label %loopexit.0 - -no_exit.0.no_exit.0_crit_edge: ; preds = %no_exit.0 - br label %no_exit.0 - -loopexit.0: ; preds = %no_exit.0.loopexit.0_crit_edge, %loopentry.0.loopexit.0_crit_edge - br i1 false, label %then.0, label %loopexit.0.endif.0_crit_edge - -loopexit.0.endif.0_crit_edge: ; preds = %loopexit.0 - br label %endif.0 - -then.0: ; preds = %loopexit.0 - br i1 false, label %loopentry.1.no_exit.1_crit_edge, label %loopentry.1.loopexit.1_crit_edge - -loopentry.1: ; No predecessors! - unreachable - -loopentry.1.loopexit.1_crit_edge: ; preds = %then.0 - br label %loopexit.1 - -loopentry.1.no_exit.1_crit_edge: ; preds = %then.0 - br label %no_exit.1 - -no_exit.1: ; preds = %no_exit.1.backedge, %loopentry.1.no_exit.1_crit_edge - br i1 false, label %shortcirc_next.0, label %no_exit.1.shortcirc_done.0_crit_edge - -no_exit.1.shortcirc_done.0_crit_edge: ; preds = %no_exit.1 - br label %shortcirc_done.0 - -shortcirc_next.0: ; preds = %no_exit.1 - br label %shortcirc_done.0 - -shortcirc_done.0: ; preds = %shortcirc_next.0, %no_exit.1.shortcirc_done.0_crit_edge - br i1 false, label %then.1, label %endif.1 - -then.1: ; preds = %shortcirc_done.0 - br i1 false, label %then.1.no_exit.1_crit_edge, label %then.1.loopexit.1_crit_edge - -then.1.loopexit.1_crit_edge: ; preds = %then.1 - br label %loopexit.1 - -then.1.no_exit.1_crit_edge: ; preds = %then.1 - br label %no_exit.1.backedge - -no_exit.1.backedge: ; preds = %endif.1.no_exit.1_crit_edge, %then.1.no_exit.1_crit_edge - br label %no_exit.1 - -endif.1: ; preds = %shortcirc_done.0 - br i1 false, label %endif.1.no_exit.1_crit_edge, label %endif.1.loopexit.1_crit_edge - -endif.1.loopexit.1_crit_edge: ; preds = %endif.1 - br label %loopexit.1 - -endif.1.no_exit.1_crit_edge: ; preds = %endif.1 - br label %no_exit.1.backedge - -loopexit.1: ; preds = %endif.1.loopexit.1_crit_edge, %then.1.loopexit.1_crit_edge, %loopentry.1.loopexit.1_crit_edge - br label %endif.0 - -endif.0: ; preds = %loopexit.1, %loopexit.0.endif.0_crit_edge - br i1 false, label %then.2, label %endif.0.endif.2_crit_edge - -endif.0.endif.2_crit_edge: ; preds = %endif.0 - br label %endif.2 - -then.2: ; preds = %endif.0 - unreachable - -dead_block.0: ; No predecessors! - br label %endif.2 - -endif.2: ; preds = %dead_block.0, %endif.0.endif.2_crit_edge - br i1 false, label %then.3, label %endif.2.endif.3_crit_edge - -endif.2.endif.3_crit_edge: ; preds = %endif.2 - br label %endif.3 - -then.3: ; preds = %endif.2 - unreachable - -dead_block.1: ; No predecessors! - br label %endif.3 - -endif.3: ; preds = %dead_block.1, %endif.2.endif.3_crit_edge - br label %loopentry.2 - -loopentry.2: ; preds = %endif.6, %endif.3 - br i1 false, label %loopentry.2.no_exit.2_crit_edge, label %loopentry.2.loopexit.2_crit_edge - -loopentry.2.loopexit.2_crit_edge: ; preds = %loopentry.2 - br label %loopexit.2 - -loopentry.2.no_exit.2_crit_edge: ; preds = %loopentry.2 - br label %no_exit.2 - -no_exit.2: ; preds = %then.5.no_exit.2_crit_edge, %loopentry.2.no_exit.2_crit_edge - br i1 false, label %then.4, label %no_exit.2.endif.4_crit_edge - -no_exit.2.endif.4_crit_edge: ; preds = %no_exit.2 - br label %endif.4 - -then.4: ; preds = %no_exit.2 - br label %endif.4 - -endif.4: ; preds = %then.4, %no_exit.2.endif.4_crit_edge - br i1 false, label %shortcirc_next.1, label %endif.4.shortcirc_done.1_crit_edge - -endif.4.shortcirc_done.1_crit_edge: ; preds = %endif.4 - br label %shortcirc_done.1 - -shortcirc_next.1: ; preds = %endif.4 - br i1 false, label %then.i21, label %endif.i - -then.i21: ; preds = %shortcirc_next.1 - br label %then.5 - -then.i21.endif.5_crit_edge: ; No predecessors! - unreachable - -then.i21.then.5_crit_edge: ; No predecessors! - unreachable - -endif.i: ; preds = %shortcirc_next.1 - br label %shortcirc_done.1 - -__check_region.exit: ; No predecessors! - unreachable - -shortcirc_done.1: ; preds = %endif.i, %endif.4.shortcirc_done.1_crit_edge - br i1 false, label %shortcirc_done.1.then.5_crit_edge, label %shortcirc_done.1.endif.5_crit_edge - -shortcirc_done.1.endif.5_crit_edge: ; preds = %shortcirc_done.1 - br label %endif.5 - -shortcirc_done.1.then.5_crit_edge: ; preds = %shortcirc_done.1 - br label %then.5 - -then.5: ; preds = %shortcirc_done.1.then.5_crit_edge, %then.i21 - br i1 false, label %then.5.no_exit.2_crit_edge, label %then.5.loopexit.2_crit_edge - -then.5.loopexit.2_crit_edge: ; preds = %then.5 - br label %loopexit.2 - -then.5.no_exit.2_crit_edge: ; preds = %then.5 - br label %no_exit.2 - -dead_block_after_continue.0: ; No predecessors! - unreachable - -endif.5: ; preds = %shortcirc_done.1.endif.5_crit_edge - br i1 false, label %then.6, label %endif.5.endif.6_crit_edge - -endif.5.endif.6_crit_edge: ; preds = %endif.5 - br label %endif.6 - -then.6: ; preds = %endif.5 - br label %endif.6 - -endif.6: ; preds = %then.6, %endif.5.endif.6_crit_edge - br label %loopentry.2 - -loopcont.2: ; No predecessors! - unreachable - -loopexit.2: ; preds = %then.5.loopexit.2_crit_edge, %loopentry.2.loopexit.2_crit_edge - br label %loopentry.3 - -loopentry.3: ; preds = %endif.9, %loopexit.2 - br i1 false, label %loopentry.3.no_exit.3_crit_edge, label %loopentry.3.loopexit.3_crit_edge - -loopentry.3.loopexit.3_crit_edge: ; preds = %loopentry.3 - br label %loopexit.3 - -loopentry.3.no_exit.3_crit_edge: ; preds = %loopentry.3 - br label %no_exit.3 - -no_exit.3: ; preds = %then.7.no_exit.3_crit_edge, %loopentry.3.no_exit.3_crit_edge - br i1 false, label %then.7, label %no_exit.3.endif.7_crit_edge - -no_exit.3.endif.7_crit_edge: ; preds = %no_exit.3 - br label %endif.7 - -then.7: ; preds = %no_exit.3 - br i1 false, label %then.7.no_exit.3_crit_edge, label %then.7.loopexit.3_crit_edge - -then.7.loopexit.3_crit_edge: ; preds = %then.7 - br label %loopexit.3 - -then.7.no_exit.3_crit_edge: ; preds = %then.7 - br label %no_exit.3 - -dead_block_after_continue.1: ; No predecessors! - unreachable - -endif.7: ; preds = %no_exit.3.endif.7_crit_edge - br i1 false, label %shortcirc_next.2, label %endif.7.shortcirc_done.2_crit_edge - -endif.7.shortcirc_done.2_crit_edge: ; preds = %endif.7 - br label %shortcirc_done.2 - -shortcirc_next.2: ; preds = %endif.7 - br label %shortcirc_done.2 - -shortcirc_done.2: ; preds = %shortcirc_next.2, %endif.7.shortcirc_done.2_crit_edge - br i1 false, label %shortcirc_next.3, label %shortcirc_done.2.shortcirc_done.3_crit_edge - -shortcirc_done.2.shortcirc_done.3_crit_edge: ; preds = %shortcirc_done.2 - br label %shortcirc_done.3 - -shortcirc_next.3: ; preds = %shortcirc_done.2 - br i1 false, label %shortcirc_next.3.shortcirc_done.4_crit_edge, label %shortcirc_next.4 - -shortcirc_next.3.shortcirc_done.4_crit_edge: ; preds = %shortcirc_next.3 - br label %shortcirc_done.4 - -shortcirc_next.4: ; preds = %shortcirc_next.3 - br label %shortcirc_done.4 - -shortcirc_done.4: ; preds = %shortcirc_next.4, %shortcirc_next.3.shortcirc_done.4_crit_edge - br label %shortcirc_done.3 - -shortcirc_done.3: ; preds = %shortcirc_done.4, %shortcirc_done.2.shortcirc_done.3_crit_edge - br i1 false, label %then.8, label %shortcirc_done.3.endif.8_crit_edge - -shortcirc_done.3.endif.8_crit_edge: ; preds = %shortcirc_done.3 - br label %endif.8 - -then.8: ; preds = %shortcirc_done.3 - br label %endif.8 - -endif.8: ; preds = %then.8, %shortcirc_done.3.endif.8_crit_edge - br i1 false, label %then.9, label %else - -then.9: ; preds = %endif.8 - br i1 false, label %cond_true.0, label %cond_false.0 - -cond_true.0: ; preds = %then.9 - br label %cond_continue.0 - -cond_false.0: ; preds = %then.9 - br label %cond_continue.0 - -cond_continue.0: ; preds = %cond_false.0, %cond_true.0 - br label %endif.9 - -else: ; preds = %endif.8 - br i1 false, label %cond_true.1, label %cond_false.1 - -cond_true.1: ; preds = %else - br label %cond_continue.1 - -cond_false.1: ; preds = %else - br label %cond_continue.1 - -cond_continue.1: ; preds = %cond_false.1, %cond_true.1 - br label %endif.9 - -endif.9: ; preds = %cond_continue.1, %cond_continue.0 - br label %loopentry.3 - -loopcont.3: ; No predecessors! - unreachable - -loopexit.3: ; preds = %then.7.loopexit.3_crit_edge, %loopentry.3.loopexit.3_crit_edge - br i1 false, label %loopentry.i.i.i2.no_exit.i.i.i4_crit_edge, label %loopentry.i.i.i2.pci_register_driver.exit.i.i_crit_edge - -loopentry.i.i.i2: ; No predecessors! - unreachable - -loopentry.i.i.i2.pci_register_driver.exit.i.i_crit_edge: ; preds = %loopexit.3 - br label %pci_register_driver.exit.i.i - -loopentry.i.i.i2.no_exit.i.i.i4_crit_edge: ; preds = %loopexit.3 - br label %no_exit.i.i.i4 - -no_exit.i.i.i4: ; preds = %endif.i.i.i10.no_exit.i.i.i4_crit_edge, %loopentry.i.i.i2.no_exit.i.i.i4_crit_edge - br i1 false, label %then.i.i.i6, label %no_exit.i.i.i4.endif.i.i.i10_crit_edge - -no_exit.i.i.i4.endif.i.i.i10_crit_edge: ; preds = %no_exit.i.i.i4 - br label %endif.i.i.i10 - -then.i.i.i6: ; preds = %no_exit.i.i.i4 - br i1 false, label %then.0.i.i.i.i, label %else.i.i.i.i - -then.0.i.i.i.i: ; preds = %then.i.i.i6 - br i1 false, label %then.1.i.i.i.i, label %endif.1.i.i.i.i - -then.1.i.i.i.i: ; preds = %then.0.i.i.i.i - br label %endif.i.i.i10 - -endif.1.i.i.i.i: ; preds = %then.0.i.i.i.i - br i1 false, label %endif.1.i.i.i.i.then.i.i.i.i.i.i_crit_edge, label %endif.1.i.i.i.i.endif.i.i.i.i.i.i_crit_edge - -endif.1.i.i.i.i.endif.i.i.i.i.i.i_crit_edge: ; preds = %endif.1.i.i.i.i - br label %endif.i.i.i.i.i.i - -endif.1.i.i.i.i.then.i.i.i.i.i.i_crit_edge: ; preds = %endif.1.i.i.i.i - br label %then.i.i.i.i.i.i - -else.i.i.i.i: ; preds = %then.i.i.i6 - br i1 false, label %endif.0.i.i.i.i.then.i.i.i.i.i.i_crit_edge, label %endif.0.i.i.i.i.endif.i.i.i.i.i.i_crit_edge - -endif.0.i.i.i.i: ; No predecessors! - unreachable - -endif.0.i.i.i.i.endif.i.i.i.i.i.i_crit_edge: ; preds = %else.i.i.i.i - br label %endif.i.i.i.i.i.i - -endif.0.i.i.i.i.then.i.i.i.i.i.i_crit_edge: ; preds = %else.i.i.i.i - br label %then.i.i.i.i.i.i - -then.i.i.i.i.i.i: ; preds = %endif.0.i.i.i.i.then.i.i.i.i.i.i_crit_edge, %endif.1.i.i.i.i.then.i.i.i.i.i.i_crit_edge - br i1 false, label %then.i.i.i.i.i.i.then.2.i.i.i.i_crit_edge, label %then.i.i.i.i.i.i.endif.2.i.i.i.i_crit_edge - -then.i.i.i.i.i.i.endif.2.i.i.i.i_crit_edge: ; preds = %then.i.i.i.i.i.i - br label %endif.2.i.i.i.i - -then.i.i.i.i.i.i.then.2.i.i.i.i_crit_edge: ; preds = %then.i.i.i.i.i.i - br label %then.2.i.i.i.i - -endif.i.i.i.i.i.i: ; preds = %endif.0.i.i.i.i.endif.i.i.i.i.i.i_crit_edge, %endif.1.i.i.i.i.endif.i.i.i.i.i.i_crit_edge - br i1 false, label %dev_probe_lock.exit.i.i.i.i.then.2.i.i.i.i_crit_edge, label %dev_probe_lock.exit.i.i.i.i.endif.2.i.i.i.i_crit_edge - -dev_probe_lock.exit.i.i.i.i: ; No predecessors! - unreachable - -dev_probe_lock.exit.i.i.i.i.endif.2.i.i.i.i_crit_edge: ; preds = %endif.i.i.i.i.i.i - br label %endif.2.i.i.i.i - -dev_probe_lock.exit.i.i.i.i.then.2.i.i.i.i_crit_edge: ; preds = %endif.i.i.i.i.i.i - br label %then.2.i.i.i.i - -then.2.i.i.i.i: ; preds = %dev_probe_lock.exit.i.i.i.i.then.2.i.i.i.i_crit_edge, %then.i.i.i.i.i.i.then.2.i.i.i.i_crit_edge - br label %endif.2.i.i.i.i - -endif.2.i.i.i.i: ; preds = %then.2.i.i.i.i, %dev_probe_lock.exit.i.i.i.i.endif.2.i.i.i.i_crit_edge, %then.i.i.i.i.i.i.endif.2.i.i.i.i_crit_edge - br i1 false, label %then.i.i2.i.i.i.i, label %endif.i.i3.i.i.i.i - -then.i.i2.i.i.i.i: ; preds = %endif.2.i.i.i.i - br label %endif.i.i.i10 - -endif.i.i3.i.i.i.i: ; preds = %endif.2.i.i.i.i - br label %endif.i.i.i10 - -dev_probe_unlock.exit.i.i.i.i: ; No predecessors! - unreachable - -pci_announce_device.exit.i.i.i: ; No predecessors! - unreachable - -endif.i.i.i10: ; preds = %endif.i.i3.i.i.i.i, %then.i.i2.i.i.i.i, %then.1.i.i.i.i, %no_exit.i.i.i4.endif.i.i.i10_crit_edge - br i1 false, label %endif.i.i.i10.no_exit.i.i.i4_crit_edge, label %endif.i.i.i10.pci_register_driver.exit.i.i_crit_edge - -endif.i.i.i10.pci_register_driver.exit.i.i_crit_edge: ; preds = %endif.i.i.i10 - br label %pci_register_driver.exit.i.i - -endif.i.i.i10.no_exit.i.i.i4_crit_edge: ; preds = %endif.i.i.i10 - br label %no_exit.i.i.i4 - -pci_register_driver.exit.i.i: ; preds = %endif.i.i.i10.pci_register_driver.exit.i.i_crit_edge, %loopentry.i.i.i2.pci_register_driver.exit.i.i_crit_edge - br i1 false, label %then.0.i.i12, label %endif.0.i.i13 - -then.0.i.i12: ; preds = %pci_register_driver.exit.i.i - br label %probe_serial_pci.exit - -then.0.i.i12.probe_serial_pci.exit_crit_edge: ; No predecessors! - unreachable - -then.0.i.i12.then.i_crit_edge: ; No predecessors! - br label %then.i - -endif.0.i.i13: ; preds = %pci_register_driver.exit.i.i - br i1 false, label %then.1.i.i14, label %endif.0.i.i13.endif.1.i.i15_crit_edge - -endif.0.i.i13.endif.1.i.i15_crit_edge: ; preds = %endif.0.i.i13 - br label %endif.1.i.i15 - -then.1.i.i14: ; preds = %endif.0.i.i13 - br label %endif.1.i.i15 - -endif.1.i.i15: ; preds = %then.1.i.i14, %endif.0.i.i13.endif.1.i.i15_crit_edge - br i1 false, label %loopentry.i8.i.i.no_exit.i9.i.i_crit_edge, label %loopentry.i8.i.i.pci_unregister_driver.exit.i.i_crit_edge - -loopentry.i8.i.i: ; No predecessors! - unreachable - -loopentry.i8.i.i.pci_unregister_driver.exit.i.i_crit_edge: ; preds = %endif.1.i.i15 - br label %pci_unregister_driver.exit.i.i - -loopentry.i8.i.i.no_exit.i9.i.i_crit_edge: ; preds = %endif.1.i.i15 - br label %no_exit.i9.i.i - -no_exit.i9.i.i: ; preds = %endif.0.i.i.i.no_exit.i9.i.i_crit_edge, %loopentry.i8.i.i.no_exit.i9.i.i_crit_edge - br i1 false, label %then.0.i.i.i, label %no_exit.i9.i.i.endif.0.i.i.i_crit_edge - -no_exit.i9.i.i.endif.0.i.i.i_crit_edge: ; preds = %no_exit.i9.i.i - br label %endif.0.i.i.i - -then.0.i.i.i: ; preds = %no_exit.i9.i.i - br i1 false, label %then.1.i.i.i, label %then.0.i.i.i.endif.1.i.i.i_crit_edge - -then.0.i.i.i.endif.1.i.i.i_crit_edge: ; preds = %then.0.i.i.i - br label %endif.1.i.i.i - -then.1.i.i.i: ; preds = %then.0.i.i.i - br label %endif.1.i.i.i - -endif.1.i.i.i: ; preds = %then.1.i.i.i, %then.0.i.i.i.endif.1.i.i.i_crit_edge - br label %endif.0.i.i.i - -endif.0.i.i.i: ; preds = %endif.1.i.i.i, %no_exit.i9.i.i.endif.0.i.i.i_crit_edge - br i1 false, label %endif.0.i.i.i.no_exit.i9.i.i_crit_edge, label %endif.0.i.i.i.pci_unregister_driver.exit.i.i_crit_edge - -endif.0.i.i.i.pci_unregister_driver.exit.i.i_crit_edge: ; preds = %endif.0.i.i.i - br label %pci_unregister_driver.exit.i.i - -endif.0.i.i.i.no_exit.i9.i.i_crit_edge: ; preds = %endif.0.i.i.i - br label %no_exit.i9.i.i - -pci_unregister_driver.exit.i.i: ; preds = %endif.0.i.i.i.pci_unregister_driver.exit.i.i_crit_edge, %loopentry.i8.i.i.pci_unregister_driver.exit.i.i_crit_edge - br i1 false, label %pci_module_init.exit.i.then.i_crit_edge, label %pci_module_init.exit.i.probe_serial_pci.exit_crit_edge - -pci_module_init.exit.i: ; No predecessors! - unreachable - -pci_module_init.exit.i.probe_serial_pci.exit_crit_edge: ; preds = %pci_unregister_driver.exit.i.i - br label %probe_serial_pci.exit - -pci_module_init.exit.i.then.i_crit_edge: ; preds = %pci_unregister_driver.exit.i.i - br label %then.i - -then.i: ; preds = %pci_module_init.exit.i.then.i_crit_edge, %then.0.i.i12.then.i_crit_edge - br label %probe_serial_pci.exit - -probe_serial_pci.exit: ; preds = %then.i, %pci_module_init.exit.i.probe_serial_pci.exit_crit_edge, %then.0.i.i12 - br i1 false, label %then.0.i, label %endif.0.i - -then.0.i: ; preds = %probe_serial_pci.exit - ret void - -endif.0.i: ; preds = %probe_serial_pci.exit - br i1 false, label %loopentry.0.i.no_exit.0.i_crit_edge, label %loopentry.0.i.loopexit.0.i_crit_edge - -loopentry.0.i: ; No predecessors! - unreachable - -loopentry.0.i.loopexit.0.i_crit_edge: ; preds = %endif.0.i - br label %loopexit.0.i - -loopentry.0.i.no_exit.0.i_crit_edge: ; preds = %endif.0.i - br label %no_exit.0.i - -no_exit.0.i: ; preds = %loopcont.0.i.no_exit.0.i_crit_edge, %loopentry.0.i.no_exit.0.i_crit_edge - br i1 false, label %then.1.i, label %endif.1.i - -then.1.i: ; preds = %no_exit.0.i - br label %loopcont.0.i - -endif.1.i: ; preds = %no_exit.0.i - br i1 false, label %loopentry.1.i.no_exit.1.i_crit_edge, label %loopentry.1.i.loopexit.1.i_crit_edge - -loopentry.1.i: ; No predecessors! - unreachable - -loopentry.1.i.loopexit.1.i_crit_edge: ; preds = %endif.1.i - br label %loopexit.1.i - -loopentry.1.i.no_exit.1.i_crit_edge: ; preds = %endif.1.i - br label %no_exit.1.i - -no_exit.1.i: ; preds = %endif.2.i.no_exit.1.i_crit_edge, %loopentry.1.i.no_exit.1.i_crit_edge - br i1 false, label %shortcirc_next.0.i, label %no_exit.1.i.shortcirc_done.0.i_crit_edge - -no_exit.1.i.shortcirc_done.0.i_crit_edge: ; preds = %no_exit.1.i - br label %shortcirc_done.0.i - -shortcirc_next.0.i: ; preds = %no_exit.1.i - br label %shortcirc_done.0.i - -shortcirc_done.0.i: ; preds = %shortcirc_next.0.i, %no_exit.1.i.shortcirc_done.0.i_crit_edge - br i1 false, label %then.2.i, label %endif.2.i - -then.2.i: ; preds = %shortcirc_done.0.i - br i1 false, label %then.2.i.then.3.i_crit_edge, label %then.2.i.else.i_crit_edge - -then.2.i.else.i_crit_edge: ; preds = %then.2.i - br label %else.i - -then.2.i.then.3.i_crit_edge: ; preds = %then.2.i - br label %then.3.i - -endif.2.i: ; preds = %shortcirc_done.0.i - br i1 false, label %endif.2.i.no_exit.1.i_crit_edge, label %endif.2.i.loopexit.1.i_crit_edge - -endif.2.i.loopexit.1.i_crit_edge: ; preds = %endif.2.i - br label %loopexit.1.i - -endif.2.i.no_exit.1.i_crit_edge: ; preds = %endif.2.i - br label %no_exit.1.i - -loopexit.1.i: ; preds = %endif.2.i.loopexit.1.i_crit_edge, %loopentry.1.i.loopexit.1.i_crit_edge - br i1 false, label %loopexit.1.i.then.3.i_crit_edge, label %loopexit.1.i.else.i_crit_edge - -loopexit.1.i.else.i_crit_edge: ; preds = %loopexit.1.i - br label %else.i - -loopexit.1.i.then.3.i_crit_edge: ; preds = %loopexit.1.i - br label %then.3.i - -then.3.i: ; preds = %loopexit.1.i.then.3.i_crit_edge, %then.2.i.then.3.i_crit_edge - br i1 false, label %shortcirc_next.1.i, label %then.3.i.shortcirc_done.1.i_crit_edge - -then.3.i.shortcirc_done.1.i_crit_edge: ; preds = %then.3.i - br label %shortcirc_done.1.i - -shortcirc_next.1.i: ; preds = %then.3.i - br label %shortcirc_done.1.i - -shortcirc_done.1.i: ; preds = %shortcirc_next.1.i, %then.3.i.shortcirc_done.1.i_crit_edge - br i1 false, label %then.4.i, label %endif.4.i - -then.4.i: ; preds = %shortcirc_done.1.i - br label %endif.3.i - -endif.4.i: ; preds = %shortcirc_done.1.i - br label %endif.3.i - -else.i: ; preds = %loopexit.1.i.else.i_crit_edge, %then.2.i.else.i_crit_edge - br i1 false, label %shortcirc_next.0.i.i, label %else.i.shortcirc_done.0.i.i_crit_edge - -else.i.shortcirc_done.0.i.i_crit_edge: ; preds = %else.i - br label %shortcirc_done.0.i.i - -shortcirc_next.0.i.i: ; preds = %else.i - br label %shortcirc_done.0.i.i - -shortcirc_done.0.i.i: ; preds = %shortcirc_next.0.i.i, %else.i.shortcirc_done.0.i.i_crit_edge - br i1 false, label %shortcirc_next.1.i.i, label %shortcirc_done.0.i.i.shortcirc_done.1.i.i_crit_edge - -shortcirc_done.0.i.i.shortcirc_done.1.i.i_crit_edge: ; preds = %shortcirc_done.0.i.i - br label %shortcirc_done.1.i.i - -shortcirc_next.1.i.i: ; preds = %shortcirc_done.0.i.i - br i1 false, label %loopentry.i.i2.i.no_exit.i.i3.i_crit_edge, label %loopentry.i.i2.i.loopexit.i.i.i_crit_edge - -loopentry.i.i2.i: ; No predecessors! - unreachable - -loopentry.i.i2.i.loopexit.i.i.i_crit_edge: ; preds = %shortcirc_next.1.i.i - br label %loopexit.i.i.i - -loopentry.i.i2.i.no_exit.i.i3.i_crit_edge: ; preds = %shortcirc_next.1.i.i - br label %no_exit.i.i3.i - -no_exit.i.i3.i: ; preds = %endif.i.i.i.no_exit.i.i3.i_crit_edge, %loopentry.i.i2.i.no_exit.i.i3.i_crit_edge - br i1 false, label %shortcirc_next.0.i.i.i, label %no_exit.i.i3.i.shortcirc_done.0.i.i.i_crit_edge - -no_exit.i.i3.i.shortcirc_done.0.i.i.i_crit_edge: ; preds = %no_exit.i.i3.i - br label %shortcirc_done.0.i.i.i - -shortcirc_next.0.i.i.i: ; preds = %no_exit.i.i3.i - br label %shortcirc_done.0.i.i.i - -shortcirc_done.0.i.i.i: ; preds = %shortcirc_next.0.i.i.i, %no_exit.i.i3.i.shortcirc_done.0.i.i.i_crit_edge - br i1 false, label %shortcirc_next.1.i.i.i, label %shortcirc_done.0.i.i.i.shortcirc_done.1.i.i.i_crit_edge - -shortcirc_done.0.i.i.i.shortcirc_done.1.i.i.i_crit_edge: ; preds = %shortcirc_done.0.i.i.i - br label %shortcirc_done.1.i.i.i - -shortcirc_next.1.i.i.i: ; preds = %shortcirc_done.0.i.i.i - br label %shortcirc_done.1.i.i.i - -shortcirc_done.1.i.i.i: ; preds = %shortcirc_next.1.i.i.i, %shortcirc_done.0.i.i.i.shortcirc_done.1.i.i.i_crit_edge - br i1 false, label %then.i.i.i, label %endif.i.i.i - -then.i.i.i: ; preds = %shortcirc_done.1.i.i.i - br label %then.0.i.i - -then.i.i.i.endif.0.i.i_crit_edge: ; No predecessors! - unreachable - -then.i.i.i.then.0.i.i_crit_edge: ; No predecessors! - unreachable - -endif.i.i.i: ; preds = %shortcirc_done.1.i.i.i - br i1 false, label %endif.i.i.i.no_exit.i.i3.i_crit_edge, label %endif.i.i.i.loopexit.i.i.i_crit_edge - -endif.i.i.i.loopexit.i.i.i_crit_edge: ; preds = %endif.i.i.i - br label %loopexit.i.i.i - -endif.i.i.i.no_exit.i.i3.i_crit_edge: ; preds = %endif.i.i.i - br label %no_exit.i.i3.i - -loopexit.i.i.i: ; preds = %endif.i.i.i.loopexit.i.i.i_crit_edge, %loopentry.i.i2.i.loopexit.i.i.i_crit_edge - br label %shortcirc_done.1.i.i - -check_compatible_id.exit.i.i: ; No predecessors! - unreachable - -shortcirc_done.1.i.i: ; preds = %loopexit.i.i.i, %shortcirc_done.0.i.i.shortcirc_done.1.i.i_crit_edge - br i1 false, label %shortcirc_done.1.i.i.then.0.i.i_crit_edge, label %shortcirc_done.1.i.i.endif.0.i.i_crit_edge - -shortcirc_done.1.i.i.endif.0.i.i_crit_edge: ; preds = %shortcirc_done.1.i.i - br label %endif.0.i.i - -shortcirc_done.1.i.i.then.0.i.i_crit_edge: ; preds = %shortcirc_done.1.i.i - br label %then.0.i.i - -then.0.i.i: ; preds = %shortcirc_done.1.i.i.then.0.i.i_crit_edge, %then.i.i.i - br label %then.5.i - -then.0.i.i.endif.5.i_crit_edge: ; No predecessors! - unreachable - -then.0.i.i.then.5.i_crit_edge: ; No predecessors! - unreachable - -endif.0.i.i: ; preds = %shortcirc_done.1.i.i.endif.0.i.i_crit_edge - br i1 false, label %endif.0.i.i.shortcirc_done.2.i.i_crit_edge, label %shortcirc_next.2.i.i - -endif.0.i.i.shortcirc_done.2.i.i_crit_edge: ; preds = %endif.0.i.i - br label %shortcirc_done.2.i.i - -shortcirc_next.2.i.i: ; preds = %endif.0.i.i - br label %shortcirc_done.2.i.i - -shortcirc_done.2.i.i: ; preds = %shortcirc_next.2.i.i, %endif.0.i.i.shortcirc_done.2.i.i_crit_edge - br i1 false, label %then.1.i.i, label %endif.1.i.i - -then.1.i.i: ; preds = %shortcirc_done.2.i.i - br label %then.5.i - -then.1.i.i.endif.5.i_crit_edge: ; No predecessors! - unreachable - -then.1.i.i.then.5.i_crit_edge: ; No predecessors! - unreachable - -endif.1.i.i: ; preds = %shortcirc_done.2.i.i - br i1 false, label %loopentry.0.i7.i.no_exit.0.i8.i_crit_edge, label %loopentry.0.i7.i.loopexit.0.i11.i_crit_edge - -loopentry.0.i7.i: ; No predecessors! - unreachable - -loopentry.0.i7.i.loopexit.0.i11.i_crit_edge: ; preds = %endif.1.i.i - br label %loopexit.0.i11.i - -loopentry.0.i7.i.no_exit.0.i8.i_crit_edge: ; preds = %endif.1.i.i - br label %no_exit.0.i8.i - -no_exit.0.i8.i: ; preds = %loopexit.1.i.i.no_exit.0.i8.i_crit_edge, %loopentry.0.i7.i.no_exit.0.i8.i_crit_edge - br i1 false, label %loopentry.1.i9.i.no_exit.1.i10.i_crit_edge, label %loopentry.1.i9.i.loopexit.1.i.i_crit_edge - -loopentry.1.i9.i: ; No predecessors! - unreachable - -loopentry.1.i9.i.loopexit.1.i.i_crit_edge: ; preds = %no_exit.0.i8.i - br label %loopexit.1.i.i - -loopentry.1.i9.i.no_exit.1.i10.i_crit_edge: ; preds = %no_exit.0.i8.i - br label %no_exit.1.i10.i - -no_exit.1.i10.i: ; preds = %endif.2.i.i.no_exit.1.i10.i_crit_edge, %loopentry.1.i9.i.no_exit.1.i10.i_crit_edge - br i1 false, label %shortcirc_next.3.i.i, label %no_exit.1.i10.i.shortcirc_done.3.i.i_crit_edge - -no_exit.1.i10.i.shortcirc_done.3.i.i_crit_edge: ; preds = %no_exit.1.i10.i - br label %shortcirc_done.3.i.i - -shortcirc_next.3.i.i: ; preds = %no_exit.1.i10.i - br i1 false, label %shortcirc_next.3.i.i.shortcirc_done.4.i.i_crit_edge, label %shortcirc_next.4.i.i - -shortcirc_next.3.i.i.shortcirc_done.4.i.i_crit_edge: ; preds = %shortcirc_next.3.i.i - br label %shortcirc_done.4.i.i - -shortcirc_next.4.i.i: ; preds = %shortcirc_next.3.i.i - br label %shortcirc_done.4.i.i - -shortcirc_done.4.i.i: ; preds = %shortcirc_next.4.i.i, %shortcirc_next.3.i.i.shortcirc_done.4.i.i_crit_edge - br i1 false, label %shortcirc_done.4.i.i.shortcirc_done.5.i.i_crit_edge, label %shortcirc_next.5.i.i - -shortcirc_done.4.i.i.shortcirc_done.5.i.i_crit_edge: ; preds = %shortcirc_done.4.i.i - br label %shortcirc_done.5.i.i - -shortcirc_next.5.i.i: ; preds = %shortcirc_done.4.i.i - %tmp.68.i.i = icmp eq i16 0, 1000 ; <i1> [#uses=1] - br label %shortcirc_done.5.i.i - -shortcirc_done.5.i.i: ; preds = %shortcirc_next.5.i.i, %shortcirc_done.4.i.i.shortcirc_done.5.i.i_crit_edge - %shortcirc_val.4.i.i = phi i1 [ true, %shortcirc_done.4.i.i.shortcirc_done.5.i.i_crit_edge ], [ %tmp.68.i.i, %shortcirc_next.5.i.i ] ; <i1> [#uses=1] - br label %shortcirc_done.3.i.i - -shortcirc_done.3.i.i: ; preds = %shortcirc_done.5.i.i, %no_exit.1.i10.i.shortcirc_done.3.i.i_crit_edge - %shortcirc_val.5.i.i = phi i1 [ false, %no_exit.1.i10.i.shortcirc_done.3.i.i_crit_edge ], [ %shortcirc_val.4.i.i, %shortcirc_done.5.i.i ] ; <i1> [#uses=1] - br i1 %shortcirc_val.5.i.i, label %then.2.i.i, label %endif.2.i.i - -then.2.i.i: ; preds = %shortcirc_done.3.i.i - %port.2.i.i.8.lcssa20 = phi %struct.isapnp_port* [ null, %shortcirc_done.3.i.i ] ; <%struct.isapnp_port*> [#uses=0] - br label %endif.5.i - -then.2.i.i.endif.5.i_crit_edge: ; No predecessors! - unreachable - -then.2.i.i.then.5.i_crit_edge: ; No predecessors! - unreachable - -endif.2.i.i: ; preds = %shortcirc_done.3.i.i - br i1 false, label %endif.2.i.i.no_exit.1.i10.i_crit_edge, label %endif.2.i.i.loopexit.1.i.i_crit_edge - -endif.2.i.i.loopexit.1.i.i_crit_edge: ; preds = %endif.2.i.i - br label %loopexit.1.i.i - -endif.2.i.i.no_exit.1.i10.i_crit_edge: ; preds = %endif.2.i.i - br label %no_exit.1.i10.i - -loopexit.1.i.i: ; preds = %endif.2.i.i.loopexit.1.i.i_crit_edge, %loopentry.1.i9.i.loopexit.1.i.i_crit_edge - br i1 false, label %loopexit.1.i.i.no_exit.0.i8.i_crit_edge, label %loopexit.1.i.i.loopexit.0.i11.i_crit_edge - -loopexit.1.i.i.loopexit.0.i11.i_crit_edge: ; preds = %loopexit.1.i.i - br label %loopexit.0.i11.i - -loopexit.1.i.i.no_exit.0.i8.i_crit_edge: ; preds = %loopexit.1.i.i - br label %no_exit.0.i8.i - -loopexit.0.i11.i: ; preds = %loopexit.1.i.i.loopexit.0.i11.i_crit_edge, %loopentry.0.i7.i.loopexit.0.i11.i_crit_edge - br i1 false, label %serial_pnp_guess_board.exit.i.then.5.i_crit_edge, label %serial_pnp_guess_board.exit.i.endif.5.i_crit_edge - -serial_pnp_guess_board.exit.i: ; No predecessors! - unreachable - -serial_pnp_guess_board.exit.i.endif.5.i_crit_edge: ; preds = %loopexit.0.i11.i - br label %endif.5.i - -serial_pnp_guess_board.exit.i.then.5.i_crit_edge: ; preds = %loopexit.0.i11.i - br label %then.5.i - -then.5.i: ; preds = %serial_pnp_guess_board.exit.i.then.5.i_crit_edge, %then.1.i.i, %then.0.i.i - br label %loopcont.0.i - -endif.5.i: ; preds = %serial_pnp_guess_board.exit.i.endif.5.i_crit_edge, %then.2.i.i - br label %endif.3.i - -endif.3.i: ; preds = %endif.5.i, %endif.4.i, %then.4.i - br i1 false, label %then.6.i, label %endif.3.i.endif.6.i_crit_edge - -endif.3.i.endif.6.i_crit_edge: ; preds = %endif.3.i - br label %endif.6.i - -then.6.i: ; preds = %endif.3.i - br label %loopentry.0.i.i - -loopentry.0.i.i: ; preds = %endif.i.i, %then.6.i - br i1 false, label %loopentry.0.i.i.no_exit.0.i.i_crit_edge, label %loopentry.0.i.i.loopexit.0.i.i_crit_edge - -loopentry.0.i.i.loopexit.0.i.i_crit_edge: ; preds = %loopentry.0.i.i - br label %loopexit.0.i.i - -loopentry.0.i.i.no_exit.0.i.i_crit_edge: ; preds = %loopentry.0.i.i - br label %no_exit.0.i.i - -no_exit.0.i.i: ; preds = %clear_bit195.exit.i.i.no_exit.0.i.i_crit_edge, %loopentry.0.i.i.no_exit.0.i.i_crit_edge - br i1 false, label %then.i.i, label %endif.i.i - -then.i.i: ; preds = %no_exit.0.i.i - br label %loopentry.i.i.i - -loopentry.i.i.i: ; preds = %no_exit.i.i.i, %then.i.i - br i1 false, label %no_exit.i.i.i, label %clear_bit195.exit.i.i - -no_exit.i.i.i: ; preds = %loopentry.i.i.i - br label %loopentry.i.i.i - -clear_bit195.exit.i.i: ; preds = %loopentry.i.i.i - br i1 false, label %clear_bit195.exit.i.i.no_exit.0.i.i_crit_edge, label %clear_bit195.exit.i.i.loopexit.0.i.i_crit_edge - -clear_bit195.exit.i.i.loopexit.0.i.i_crit_edge: ; preds = %clear_bit195.exit.i.i - br label %loopexit.0.i.i - -clear_bit195.exit.i.i.no_exit.0.i.i_crit_edge: ; preds = %clear_bit195.exit.i.i - br label %no_exit.0.i.i - -endif.i.i: ; preds = %no_exit.0.i.i - br label %loopentry.0.i.i - -loopexit.0.i.i: ; preds = %clear_bit195.exit.i.i.loopexit.0.i.i_crit_edge, %loopentry.0.i.i.loopexit.0.i.i_crit_edge - br i1 false, label %loopentry.1.i.i.no_exit.1.i.i_crit_edge, label %loopentry.1.i.i.avoid_irq_share.exit.i_crit_edge - -loopentry.1.i.i: ; No predecessors! - unreachable - -loopentry.1.i.i.avoid_irq_share.exit.i_crit_edge: ; preds = %loopexit.0.i.i - br label %avoid_irq_share.exit.i - -loopentry.1.i.i.no_exit.1.i.i_crit_edge: ; preds = %loopexit.0.i.i - br label %no_exit.1.i.i - -no_exit.1.i.i: ; preds = %loopexit.2.i.i.no_exit.1.i.i_crit_edge, %loopentry.1.i.i.no_exit.1.i.i_crit_edge - br i1 false, label %loopentry.2.i.i.no_exit.2.i.i_crit_edge, label %loopentry.2.i.i.loopexit.2.i.i_crit_edge - -loopentry.2.i.i: ; No predecessors! - unreachable - -loopentry.2.i.i.loopexit.2.i.i_crit_edge: ; preds = %no_exit.1.i.i - br label %loopexit.2.i.i - -loopentry.2.i.i.no_exit.2.i.i_crit_edge: ; preds = %no_exit.1.i.i - br label %no_exit.2.i.i - -no_exit.2.i.i: ; preds = %no_exit.2.i.i.no_exit.2.i.i_crit_edge, %loopentry.2.i.i.no_exit.2.i.i_crit_edge - br i1 false, label %no_exit.2.i.i.no_exit.2.i.i_crit_edge, label %no_exit.2.i.i.loopexit.2.i.i_crit_edge - -no_exit.2.i.i.loopexit.2.i.i_crit_edge: ; preds = %no_exit.2.i.i - br label %loopexit.2.i.i - -no_exit.2.i.i.no_exit.2.i.i_crit_edge: ; preds = %no_exit.2.i.i - br label %no_exit.2.i.i - -loopexit.2.i.i: ; preds = %no_exit.2.i.i.loopexit.2.i.i_crit_edge, %loopentry.2.i.i.loopexit.2.i.i_crit_edge - br i1 false, label %loopexit.2.i.i.no_exit.1.i.i_crit_edge, label %loopexit.2.i.i.avoid_irq_share.exit.i_crit_edge - -loopexit.2.i.i.avoid_irq_share.exit.i_crit_edge: ; preds = %loopexit.2.i.i - br label %avoid_irq_share.exit.i - -loopexit.2.i.i.no_exit.1.i.i_crit_edge: ; preds = %loopexit.2.i.i - br label %no_exit.1.i.i - -avoid_irq_share.exit.i: ; preds = %loopexit.2.i.i.avoid_irq_share.exit.i_crit_edge, %loopentry.1.i.i.avoid_irq_share.exit.i_crit_edge - br label %endif.6.i - -endif.6.i: ; preds = %avoid_irq_share.exit.i, %endif.3.i.endif.6.i_crit_edge - br label %loopcont.0.i - -loopcont.0.i: ; preds = %endif.6.i, %then.5.i, %then.1.i - br i1 false, label %loopcont.0.i.no_exit.0.i_crit_edge, label %loopcont.0.i.loopexit.0.i_crit_edge - -loopcont.0.i.loopexit.0.i_crit_edge: ; preds = %loopcont.0.i - br label %loopexit.0.i - -loopcont.0.i.no_exit.0.i_crit_edge: ; preds = %loopcont.0.i - br label %no_exit.0.i - -loopexit.0.i: ; preds = %loopcont.0.i.loopexit.0.i_crit_edge, %loopentry.0.i.loopexit.0.i_crit_edge - ret void - -probe_serial_pnp.exit: ; No predecessors! - unreachable - -after_ret: ; No predecessors! - ret void - -return: ; No predecessors! - unreachable -} diff --git a/test/Transforms/CondProp/2007-08-01-InvalidRead.ll b/test/Transforms/CondProp/2007-08-01-InvalidRead.ll deleted file mode 100644 index 6d5f0f5a3aca6..0000000000000 --- a/test/Transforms/CondProp/2007-08-01-InvalidRead.ll +++ /dev/null @@ -1,814 +0,0 @@ -; RUN: opt < %s -inline -tailduplicate -condprop -simplifycfg -disable-output -; PR1575 -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.DCTtab = type { i8, i8, i8 } - %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.VLCtab = type { i8, i8 } - %struct._IO_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._IO_marker = type { %struct._IO_marker*, %struct.FILE*, i32 } - %struct.layer_data = type { i32, [2048 x i8], i8*, [16 x i8], i32, i8*, i32, i32, [64 x i32], [64 x i32], [64 x i32], [64 x i32], i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, [12 x [64 x i16]] } -@ld = external global %struct.layer_data* ; <%struct.layer_data**> [#uses=1] -@System_Stream_Flag = external global i32 ; <i32*> [#uses=0] -@Fault_Flag = external global i32 ; <i32*> [#uses=2] -@picture_coding_type = external global i32 ; <i32*> [#uses=1] -@DCTtabnext = external global [12 x %struct.DCTtab] ; <[12 x %struct.DCTtab]*> [#uses=0] -@DCTtab0 = external global [60 x %struct.DCTtab] ; <[60 x %struct.DCTtab]*> [#uses=0] -@DCTtab1 = external global [8 x %struct.DCTtab] ; <[8 x %struct.DCTtab]*> [#uses=0] -@DCTtab2 = external global [16 x %struct.DCTtab] ; <[16 x %struct.DCTtab]*> [#uses=0] -@DCTtab3 = external global [16 x %struct.DCTtab] ; <[16 x %struct.DCTtab]*> [#uses=0] -@DCTtab4 = external global [16 x %struct.DCTtab] ; <[16 x %struct.DCTtab]*> [#uses=0] -@DCTtab5 = external global [16 x %struct.DCTtab] ; <[16 x %struct.DCTtab]*> [#uses=0] -@DCTtab6 = external global [16 x %struct.DCTtab] ; <[16 x %struct.DCTtab]*> [#uses=0] -@Quiet_Flag = external global i32 ; <i32*> [#uses=0] -@.str = external constant [51 x i8] ; <[51 x i8]*> [#uses=0] -@stderr = external global %struct.FILE* ; <%struct.FILE**> [#uses=0] -@.str1 = external constant [43 x i8] ; <[43 x i8]*> [#uses=0] -@scan = external global [2 x [64 x i8]] ; <[2 x [64 x i8]]*> [#uses=0] -@DCTtabfirst = external global [12 x %struct.DCTtab] ; <[12 x %struct.DCTtab]*> [#uses=0] -@.str2 = external constant [55 x i8] ; <[55 x i8]*> [#uses=0] -@.str3 = external constant [43 x i8] ; <[43 x i8]*> [#uses=0] -@base = external global %struct.layer_data ; <%struct.layer_data*> [#uses=1] -@enhan = external global %struct.layer_data ; <%struct.layer_data*> [#uses=0] -@chroma_format = external global i32 ; <i32*> [#uses=2] -@intra_dc_precision = external global i32 ; <i32*> [#uses=0] -@intra_vlc_format = external global i32 ; <i32*> [#uses=0] -@DCTtab0a = external global [252 x %struct.DCTtab] ; <[252 x %struct.DCTtab]*> [#uses=0] -@DCTtab1a = external global [8 x %struct.DCTtab] ; <[8 x %struct.DCTtab]*> [#uses=0] -@.str4 = external constant [51 x i8] ; <[51 x i8]*> [#uses=0] -@.str5 = external constant [45 x i8] ; <[45 x i8]*> [#uses=0] -@.str6 = external constant [44 x i8] ; <[44 x i8]*> [#uses=0] -@.str7 = external constant [55 x i8] ; <[55 x i8]*> [#uses=0] -@.str8 = external constant [44 x i8] ; <[44 x i8]*> [#uses=0] -@Temporal_Reference_Base = external global i32 ; <i32*> [#uses=0] -@True_Framenum_max = external global i32 ; <i32*> [#uses=0] -@Temporal_Reference_GOP_Reset.b = external global i1 ; <i1*> [#uses=0] -@frame_rate_Table = external constant [16 x double] ; <[16 x double]*> [#uses=0] -@.str9 = external constant [43 x i8] ; <[43 x i8]*> [#uses=0] -@horizontal_size = external global i32 ; <i32*> [#uses=0] -@vertical_size = external global i32 ; <i32*> [#uses=0] -@aspect_ratio_information = external global i32 ; <i32*> [#uses=0] -@frame_rate_code = external global i32 ; <i32*> [#uses=0] -@bit_rate_value = external global i32 ; <i32*> [#uses=0] -@.str110 = external constant [18 x i8] ; <[18 x i8]*> [#uses=0] -@vbv_buffer_size = external global i32 ; <i32*> [#uses=0] -@constrained_parameters_flag = external global i32 ; <i32*> [#uses=0] -@default_intra_quantizer_matrix = external global [64 x i8] ; <[64 x i8]*> [#uses=0] -@drop_flag = external global i32 ; <i32*> [#uses=0] -@hour = external global i32 ; <i32*> [#uses=0] -@minute = external global i32 ; <i32*> [#uses=0] -@.str211 = external constant [27 x i8] ; <[27 x i8]*> [#uses=0] -@sec = external global i32 ; <i32*> [#uses=0] -@frame = external global i32 ; <i32*> [#uses=0] -@closed_gop = external global i32 ; <i32*> [#uses=0] -@broken_link = external global i32 ; <i32*> [#uses=0] -@temporal_reference = external global i32 ; <i32*> [#uses=0] -@vbv_delay = external global i32 ; <i32*> [#uses=0] -@full_pel_forward_vector = external global i32 ; <i32*> [#uses=0] -@forward_f_code = external global i32 ; <i32*> [#uses=0] -@full_pel_backward_vector = external global i32 ; <i32*> [#uses=0] -@backward_f_code = external global i32 ; <i32*> [#uses=1] -@Non_Linear_quantizer_scale = external global [32 x i8] ; <[32 x i8]*> [#uses=0] -@.str312 = external constant [37 x i8] ; <[37 x i8]*> [#uses=0] -@layer_id = external global i32 ; <i32*> [#uses=0] -@profile_and_level_indication = external global i32 ; <i32*> [#uses=0] -@progressive_sequence = external global i32 ; <i32*> [#uses=0] -@.str413 = external constant [19 x i8] ; <[19 x i8]*> [#uses=0] -@low_delay = external global i32 ; <i32*> [#uses=0] -@frame_rate_extension_n = external global i32 ; <i32*> [#uses=0] -@frame_rate_extension_d = external global i32 ; <i32*> [#uses=0] -@frame_rate = external global double ; <double*> [#uses=0] -@profile = external global i32 ; <i32*> [#uses=0] -@level = external global i32 ; <i32*> [#uses=0] -@bit_rate = external global double ; <double*> [#uses=0] -@video_format = external global i32 ; <i32*> [#uses=0] -@color_description = external global i32 ; <i32*> [#uses=0] -@color_primaries = external global i32 ; <i32*> [#uses=0] -@transfer_characteristics = external global i32 ; <i32*> [#uses=0] -@matrix_coefficients = external global i32 ; <i32*> [#uses=0] -@display_horizontal_size = external global i32 ; <i32*> [#uses=0] -@.str514 = external constant [27 x i8] ; <[27 x i8]*> [#uses=0] -@display_vertical_size = external global i32 ; <i32*> [#uses=0] -@lower_layer_prediction_horizontal_size = external global i32 ; <i32*> [#uses=0] -@.str615 = external constant [30 x i8] ; <[30 x i8]*> [#uses=0] -@lower_layer_prediction_vertical_size = external global i32 ; <i32*> [#uses=0] -@horizontal_subsampling_factor_m = external global i32 ; <i32*> [#uses=0] -@horizontal_subsampling_factor_n = external global i32 ; <i32*> [#uses=0] -@vertical_subsampling_factor_m = external global i32 ; <i32*> [#uses=0] -@vertical_subsampling_factor_n = external global i32 ; <i32*> [#uses=0] -@.str716 = external constant [38 x i8] ; <[38 x i8]*> [#uses=0] -@repeat_first_field = external global i32 ; <i32*> [#uses=0] -@top_field_first = external global i32 ; <i32*> [#uses=0] -@picture_structure = external global i32 ; <i32*> [#uses=0] -@frame_center_horizontal_offset = external global [3 x i32] ; <[3 x i32]*> [#uses=0] -@.str817 = external constant [44 x i8] ; <[44 x i8]*> [#uses=0] -@frame_center_vertical_offset = external global [3 x i32] ; <[3 x i32]*> [#uses=0] -@.str918 = external constant [45 x i8] ; <[45 x i8]*> [#uses=0] -@f_code = external global [2 x [2 x i32]] ; <[2 x [2 x i32]]*> [#uses=0] -@frame_pred_frame_dct = external global i32 ; <i32*> [#uses=0] -@concealment_motion_vectors = external global i32 ; <i32*> [#uses=1] -@chroma_420_type = external global i32 ; <i32*> [#uses=0] -@progressive_frame = external global i32 ; <i32*> [#uses=0] -@composite_display_flag = external global i32 ; <i32*> [#uses=0] -@v_axis = external global i32 ; <i32*> [#uses=0] -@field_sequence = external global i32 ; <i32*> [#uses=0] -@sub_carrier = external global i32 ; <i32*> [#uses=0] -@burst_amplitude = external global i32 ; <i32*> [#uses=0] -@sub_carrier_phase = external global i32 ; <i32*> [#uses=0] -@lower_layer_temporal_reference = external global i32 ; <i32*> [#uses=0] -@.str10 = external constant [55 x i8] ; <[55 x i8]*> [#uses=0] -@lower_layer_horizontal_offset = external global i32 ; <i32*> [#uses=0] -@.str11 = external constant [56 x i8] ; <[56 x i8]*> [#uses=0] -@lower_layer_vertical_offset = external global i32 ; <i32*> [#uses=0] -@spatial_temporal_weight_code_table_index = external global i32 ; <i32*> [#uses=0] -@lower_layer_progressive_frame = external global i32 ; <i32*> [#uses=0] -@lower_layer_deinterlaced_field_select = external global i32 ; <i32*> [#uses=0] -@.str12 = external constant [36 x i8] ; <[36 x i8]*> [#uses=0] -@copyright_flag = external global i32 ; <i32*> [#uses=0] -@copyright_identifier = external global i32 ; <i32*> [#uses=0] -@original_or_copy = external global i32 ; <i32*> [#uses=0] -@.str13 = external constant [40 x i8] ; <[40 x i8]*> [#uses=0] -@copyright_number_1 = external global i32 ; <i32*> [#uses=0] -@.str14 = external constant [41 x i8] ; <[41 x i8]*> [#uses=0] -@copyright_number_2 = external global i32 ; <i32*> [#uses=0] -@.str15 = external constant [40 x i8] ; <[40 x i8]*> [#uses=0] -@copyright_number_3 = external global i32 ; <i32*> [#uses=0] -@Verbose_Flag = external global i32 ; <i32*> [#uses=0] -@.str16 = external constant [31 x i8] ; <[31 x i8]*> [#uses=0] -@.str17 = external constant [22 x i8] ; <[22 x i8]*> [#uses=0] -@.str18 = external constant [27 x i8] ; <[27 x i8]*> [#uses=0] -@.str19 = external constant [46 x i8] ; <[46 x i8]*> [#uses=0] -@.str20 = external constant [25 x i8] ; <[25 x i8]*> [#uses=0] -@.str21 = external constant [25 x i8] ; <[25 x i8]*> [#uses=0] -@.str22 = external constant [25 x i8] ; <[25 x i8]*> [#uses=0] -@temporal_reference_old.2592 = external global i32 ; <i32*> [#uses=0] -@temporal_reference_wrap.2591.b = external global i1 ; <i1*> [#uses=0] -@True_Framenum = external global i32 ; <i32*> [#uses=0] -@Second_Field = external global i32 ; <i32*> [#uses=0] -@.str23 = external constant [29 x i8] ; <[29 x i8]*> [#uses=0] -@Ersatz_Flag = external global i32 ; <i32*> [#uses=0] -@mb_width = external global i32 ; <i32*> [#uses=0] -@mb_height = external global i32 ; <i32*> [#uses=0] -@Two_Streams = external global i32 ; <i32*> [#uses=0] -@.str124 = external constant [32 x i8] ; <[32 x i8]*> [#uses=0] -@stwc_table.2193 = external constant [3 x [4 x i8]] ; <[3 x [4 x i8]]*> [#uses=0] -@stwclass_table.2194 = external constant [9 x i8] ; <[9 x i8]*> [#uses=0] -@current_frame = external global [3 x i8*] ; <[3 x i8*]*> [#uses=0] -@Coded_Picture_Width = external global i32 ; <i32*> [#uses=0] -@Chroma_Width = external global i32 ; <i32*> [#uses=0] -@Clip = external global i8* ; <i8**> [#uses=0] -@.str225 = external constant [30 x i8] ; <[30 x i8]*> [#uses=0] -@.str326 = external constant [27 x i8] ; <[27 x i8]*> [#uses=0] -@block_count = external global i32 ; <i32*> [#uses=1] -@auxframe = external global [3 x i8*] ; <[3 x i8*]*> [#uses=0] -@forward_reference_frame = external global [3 x i8*] ; <[3 x i8*]*> [#uses=0] -@backward_reference_frame = external global [3 x i8*] ; <[3 x i8*]*> [#uses=0] -@.str427 = external constant [34 x i8] ; <[34 x i8]*> [#uses=0] -@Newref_progressive_frame.2631 = external global i32 ; <i32*> [#uses=0] -@Oldref_progressive_frame.2630 = external global i32 ; <i32*> [#uses=0] -@Reference_IDCT_Flag = external global i32 ; <i32*> [#uses=0] -@.str528 = external constant [43 x i8] ; <[43 x i8]*> [#uses=0] -@.str629 = external constant [29 x i8] ; <[29 x i8]*> [#uses=0] -@.str730 = external constant [38 x i8] ; <[38 x i8]*> [#uses=0] -@.str831 = external constant [32 x i8] ; <[32 x i8]*> [#uses=0] -@PMBtab0 = external constant [8 x %struct.VLCtab] ; <[8 x %struct.VLCtab]*> [#uses=0] -@PMBtab1 = external constant [8 x %struct.VLCtab] ; <[8 x %struct.VLCtab]*> [#uses=0] -@BMBtab0 = external constant [16 x %struct.VLCtab] ; <[16 x %struct.VLCtab]*> [#uses=0] -@BMBtab1 = external constant [8 x %struct.VLCtab] ; <[8 x %struct.VLCtab]*> [#uses=0] -@spIMBtab = external constant [16 x %struct.VLCtab] ; <[16 x %struct.VLCtab]*> [#uses=0] -@spPMBtab0 = external constant [16 x %struct.VLCtab] ; <[16 x %struct.VLCtab]*> [#uses=0] -@spPMBtab1 = external constant [16 x %struct.VLCtab] ; <[16 x %struct.VLCtab]*> [#uses=0] -@spBMBtab0 = external constant [14 x %struct.VLCtab] ; <[14 x %struct.VLCtab]*> [#uses=0] -@spBMBtab1 = external constant [12 x %struct.VLCtab] ; <[12 x %struct.VLCtab]*> [#uses=0] -@spBMBtab2 = external constant [8 x %struct.VLCtab] ; <[8 x %struct.VLCtab]*> [#uses=0] -@SNRMBtab = external constant [8 x %struct.VLCtab] ; <[8 x %struct.VLCtab]*> [#uses=0] -@MVtab0 = external constant [8 x %struct.VLCtab] ; <[8 x %struct.VLCtab]*> [#uses=0] -@MVtab1 = external constant [8 x %struct.VLCtab] ; <[8 x %struct.VLCtab]*> [#uses=0] -@MVtab2 = external constant [12 x %struct.VLCtab] ; <[12 x %struct.VLCtab]*> [#uses=0] -@CBPtab0 = external constant [32 x %struct.VLCtab] ; <[32 x %struct.VLCtab]*> [#uses=0] -@CBPtab1 = external constant [64 x %struct.VLCtab] ; <[64 x %struct.VLCtab]*> [#uses=0] -@CBPtab2 = external constant [8 x %struct.VLCtab] ; <[8 x %struct.VLCtab]*> [#uses=0] -@MBAtab1 = external constant [16 x %struct.VLCtab] ; <[16 x %struct.VLCtab]*> [#uses=0] -@MBAtab2 = external constant [104 x %struct.VLCtab] ; <[104 x %struct.VLCtab]*> [#uses=0] -@DClumtab0 = external constant [32 x %struct.VLCtab] ; <[32 x %struct.VLCtab]*> [#uses=0] -@DClumtab1 = external constant [16 x %struct.VLCtab] ; <[16 x %struct.VLCtab]*> [#uses=0] -@DCchromtab0 = external constant [32 x %struct.VLCtab] ; <[32 x %struct.VLCtab]*> [#uses=0] -@DCchromtab1 = external constant [32 x %struct.VLCtab] ; <[32 x %struct.VLCtab]*> [#uses=0] -@.str32 = external constant [56 x i8] ; <[56 x i8]*> [#uses=0] -@.str133 = external constant [29 x i8] ; <[29 x i8]*> [#uses=0] -@global_pic = external global i32 ; <i32*> [#uses=0] -@global_MBA = external global i32 ; <i32*> [#uses=0] -@.str1648 = external constant [45 x i8] ; <[45 x i8]*> [#uses=0] -@.str1749 = external constant [33 x i8] ; <[33 x i8]*> [#uses=0] -@.str1850 = external constant [42 x i8] ; <[42 x i8]*> [#uses=0] -@iclp = external global i16* ; <i16**> [#uses=0] -@iclip = external global [1024 x i16] ; <[1024 x i16]*> [#uses=0] -@c = external global [8 x [8 x double]] ; <[8 x [8 x double]]*> [#uses=0] -@Version = external global [28 x i8] ; <[28 x i8]*> [#uses=0] -@Author = external global [41 x i8] ; <[41 x i8]*> [#uses=0] -@Inverse_Table_6_9 = external global [8 x [4 x i32]] ; <[8 x [4 x i32]]*> [#uses=0] -@Main_Bitstream_Filename = external global i8* ; <i8**> [#uses=0] -@.str51 = external constant [36 x i8] ; <[36 x i8]*> [#uses=0] -@Error_Text = external global [256 x i8] ; <[256 x i8]*> [#uses=0] -@.str152 = external constant [52 x i8] ; <[52 x i8]*> [#uses=0] -@.str253 = external constant [33 x i8] ; <[33 x i8]*> [#uses=0] -@Enhancement_Layer_Bitstream_Filename = external global i8* ; <i8**> [#uses=0] -@.str354 = external constant [46 x i8] ; <[46 x i8]*> [#uses=0] -@.str455 = external constant [22 x i8] ; <[22 x i8]*> [#uses=0] -@.str556 = external constant [30 x i8] ; <[30 x i8]*> [#uses=0] -@Coded_Picture_Height = external global i32 ; <i32*> [#uses=0] -@Chroma_Height = external global i32 ; <i32*> [#uses=0] -@Table_6_20.3737 = external constant [3 x i32] ; <[3 x i32]*> [#uses=0] -@.str657 = external constant [42 x i8] ; <[42 x i8]*> [#uses=0] -@.str758 = external constant [41 x i8] ; <[41 x i8]*> [#uses=0] -@.str859 = external constant [26 x i8] ; <[26 x i8]*> [#uses=0] -@substitute_frame = external global [3 x i8*] ; <[3 x i8*]*> [#uses=0] -@.str960 = external constant [34 x i8] ; <[34 x i8]*> [#uses=0] -@llframe0 = external global [3 x i8*] ; <[3 x i8*]*> [#uses=0] -@.str1061 = external constant [24 x i8] ; <[24 x i8]*> [#uses=0] -@llframe1 = external global [3 x i8*] ; <[3 x i8*]*> [#uses=0] -@.str1162 = external constant [24 x i8] ; <[24 x i8]*> [#uses=0] -@lltmp = external global i16* ; <i16**> [#uses=0] -@.str1263 = external constant [21 x i8] ; <[21 x i8]*> [#uses=0] -@.str1364 = external constant [3 x i8] ; <[3 x i8]*> [#uses=0] -@.str1465 = external constant [9 x i8] ; <[9 x i8]*> [#uses=0] -@.str1566 = external constant [1195 x i8] ; <[1195 x i8]*> [#uses=0] -@Output_Type = external global i32 ; <i32*> [#uses=0] -@Main_Bitstream_Flag = external global i32 ; <i32*> [#uses=0] -@.str1667 = external constant [55 x i8] ; <[55 x i8]*> [#uses=0] -@.str1768 = external constant [49 x i8] ; <[49 x i8]*> [#uses=0] -@.str1869 = external constant [39 x i8] ; <[39 x i8]*> [#uses=0] -@Frame_Store_Flag = external global i32 ; <i32*> [#uses=0] -@Big_Picture_Flag = external global i32 ; <i32*> [#uses=0] -@.str1970 = external constant [49 x i8] ; <[49 x i8]*> [#uses=0] -@Spatial_Flag = external global i32 ; <i32*> [#uses=0] -@.str2071 = external constant [39 x i8] ; <[39 x i8]*> [#uses=0] -@Lower_Layer_Picture_Filename = external global i8* ; <i8**> [#uses=0] -@Output_Picture_Filename = external global i8* ; <i8**> [#uses=0] -@.str2172 = external constant [1 x i8] ; <[1 x i8]*> [#uses=0] -@.str2273 = external constant [39 x i8] ; <[39 x i8]*> [#uses=0] -@.str2374 = external constant [49 x i8] ; <[49 x i8]*> [#uses=0] -@User_Data_Flag = external global i32 ; <i32*> [#uses=0] -@.str24 = external constant [40 x i8] ; <[40 x i8]*> [#uses=0] -@.str25 = external constant [39 x i8] ; <[39 x i8]*> [#uses=0] -@Substitute_Picture_Filename = external global i8* ; <i8**> [#uses=0] -@.str26 = external constant [47 x i8] ; <[47 x i8]*> [#uses=0] -@.str27 = external constant [55 x i8] ; <[55 x i8]*> [#uses=0] -@Display_Progressive_Flag = external global i32 ; <i32*> [#uses=0] -@.str28 = external constant [21 x i8] ; <[21 x i8]*> [#uses=0] -@.str29 = external constant [2 x i8] ; <[2 x i8]*> [#uses=0] -@hiQdither = external global i32 ; <i32*> [#uses=0] -@Trace_Flag = external global i32 ; <i32*> [#uses=0] -@Verify_Flag = external global i32 ; <i32*> [#uses=0] -@Stats_Flag = external global i32 ; <i32*> [#uses=0] -@Decode_Layer = external global i32 ; <i32*> [#uses=0] -@.str75 = external constant [20 x i8] ; <[20 x i8]*> [#uses=0] -@C.53.2124 = external constant [3 x [3 x i8]] ; <[3 x [3 x i8]]*> [#uses=0] -@.str76 = external constant [3 x i8] ; <[3 x i8]*> [#uses=0] -@C.60.2169 = external constant [3 x [3 x i8]] ; <[3 x [3 x i8]]*> [#uses=0] -@.str77 = external constant [5 x i8] ; <[5 x i8]*> [#uses=0] -@.str178 = external constant [5 x i8] ; <[5 x i8]*> [#uses=0] -@.str279 = external constant [5 x i8] ; <[5 x i8]*> [#uses=0] -@.str380 = external constant [11 x i8] ; <[11 x i8]*> [#uses=0] -@outfile = external global i32 ; <i32*> [#uses=0] -@.str481 = external constant [20 x i8] ; <[20 x i8]*> [#uses=0] -@optr = external global i8* ; <i8**> [#uses=0] -@obfr = external global [4096 x i8] ; <[4096 x i8]*> [#uses=0] -@.str582 = external constant [35 x i8] ; <[35 x i8]*> [#uses=0] -@u422.3075 = external global i8* ; <i8**> [#uses=0] -@v422.3076 = external global i8* ; <i8**> [#uses=0] -@.str683 = external constant [14 x i8] ; <[14 x i8]*> [#uses=0] -@.str784 = external constant [5 x i8] ; <[5 x i8]*> [#uses=0] -@u444.3185 = external global i8* ; <i8**> [#uses=0] -@v444.3186 = external global i8* ; <i8**> [#uses=0] -@u422.3183 = external global i8* ; <i8**> [#uses=0] -@v422.3184 = external global i8* ; <i8**> [#uses=0] -@.str885 = external constant [5 x i8] ; <[5 x i8]*> [#uses=0] -@.str986 = external constant [5 x i8] ; <[5 x i8]*> [#uses=0] -@tga24.3181 = external constant [14 x i8] ; <[14 x i8]*> [#uses=0] -@.str1087 = external constant [14 x i8] ; <[14 x i8]*> [#uses=0] -@bgate.2952.b = external global i1 ; <i1*> [#uses=0] -@previous_temporal_reference.2947 = external global i32 ; <i32*> [#uses=0] -@previous_picture_coding_type.2951 = external global i32 ; <i32*> [#uses=0] -@previous_anchor_temporal_reference.2949 = external global i32 ; <i32*> [#uses=0] -@.str88 = external constant [40 x i8] ; <[40 x i8]*> [#uses=0] -@.str189 = external constant [31 x i8] ; <[31 x i8]*> [#uses=0] -@.str290 = external constant [5 x i8] ; <[5 x i8]*> [#uses=0] -@.str391 = external constant [5 x i8] ; <[5 x i8]*> [#uses=0] -@.str492 = external constant [5 x i8] ; <[5 x i8]*> [#uses=0] -@.str593 = external constant [49 x i8] ; <[49 x i8]*> [#uses=0] -@.str694 = external constant [3 x i8] ; <[3 x i8]*> [#uses=0] -@.str795 = external constant [18 x i8] ; <[18 x i8]*> [#uses=0] -@.str896 = external constant [42 x i8] ; <[42 x i8]*> [#uses=0] -@.str97 = external constant [18 x i8] ; <[18 x i8]*> [#uses=0] -@.str198 = external constant [24 x i8] ; <[24 x i8]*> [#uses=0] -@.str299 = external constant [43 x i8] ; <[43 x i8]*> [#uses=0] - -declare void @Initialize_Buffer() - -declare void @Fill_Buffer() - -declare i32 @read(...) - -declare i32 @Get_Byte() - -declare i32 @Get_Word() - -declare i32 @Show_Bits(i32) - -declare i32 @Get_Bits1() - -declare void @Flush_Buffer(i32) - -declare void @Next_Packet() - -declare i32 @Get_Bits(i32) - -declare void @Decode_MPEG1_Intra_Block(i32, i32*) - -declare i32 @Get_Luma_DC_dct_diff() - -declare i32 @Get_Chroma_DC_dct_diff() - -declare i32 @puts(i8*) - -declare i32 @fwrite(i8*, i32, i32, i8*) - -declare void @Decode_MPEG1_Non_Intra_Block(i32) - -declare void @Decode_MPEG2_Intra_Block(i32, i32*) - -declare void @Decode_MPEG2_Non_Intra_Block(i32) - -declare i32 @Get_Hdr() - -declare i32 @Get_Bits32() - -declare i32 @fprintf(%struct.FILE*, i8*, ...) - -declare void @next_start_code() - -declare fastcc void @sequence_header() - -define internal fastcc void @group_of_pictures_header() { -entry: - ret void -} - -define internal fastcc void @picture_header() { -entry: - unreachable -} - -declare i32 @slice_header() - -declare fastcc void @extension_and_user_data() - -declare void @Flush_Buffer32() - -declare fastcc void @sequence_extension() - -declare fastcc void @sequence_display_extension() - -declare fastcc void @quant_matrix_extension() - -declare fastcc void @sequence_scalable_extension() - -declare void @Error(i8*) - -declare fastcc void @picture_display_extension() - -declare fastcc void @picture_coding_extension() - -declare fastcc void @picture_spatial_scalable_extension() - -declare fastcc void @picture_temporal_scalable_extension() - -declare fastcc void @extra_bit_information() - -declare void @marker_bit(i8*) - -declare fastcc void @user_data() - -declare fastcc void @copyright_extension() - -declare i32 @printf(i8*, ...) - -declare fastcc void @Update_Temporal_Reference_Tacking_Data() - -define void @Decode_Picture(i32 %bitstream_framenum, i32 %sequence_framenum) { -entry: - %tmp16 = icmp eq i32 0, 0 ; <i1> [#uses=1] - br i1 %tmp16, label %bb43, label %bb22 - -bb22: ; preds = %entry - ret void - -bb43: ; preds = %entry - call fastcc void @picture_data( ) - ret void -} - -declare void @Substitute_Frame_Buffer(i32, i32) - -define void @Spatial_Prediction() { -entry: - ret void -} - -define internal fastcc void @picture_data() { -entry: - %tmp4 = icmp eq i32 0, 3 ; <i1> [#uses=1] - br i1 %tmp4, label %bb8, label %bb - -bb: ; preds = %entry - ret void - -bb8: ; preds = %entry - %tmp11 = call fastcc i32 @slice( i32 0 ) ; <i32> [#uses=0] - ret void -} - -define internal fastcc i32 @slice(i32 %MBAmax) { -entry: - %tmp6 = icmp eq i32 0, 1 ; <i1> [#uses=1] - br i1 %tmp6, label %bb9, label %bb231 - -bb9: ; preds = %entry - %tmp11 = icmp eq i32 0, 0 ; <i1> [#uses=1] - br i1 %tmp11, label %bb27, label %bb17 - -bb17: ; preds = %bb9 - ret i32 0 - -bb27: ; preds = %bb9 - %tmp31 = icmp slt i32 0, %MBAmax ; <i1> [#uses=1] - br i1 %tmp31, label %bb110, label %bb231 - -resync: ; preds = %bb139 - ret i32 0 - -bb110: ; preds = %bb27 - %tmp113 = icmp slt i32 0, %MBAmax ; <i1> [#uses=1] - br i1 %tmp113, label %bb131, label %bb119 - -bb119: ; preds = %bb110 - ret i32 0 - -bb131: ; preds = %bb110 - %tmp133 = icmp eq i32 0, 1 ; <i1> [#uses=1] - br i1 %tmp133, label %bb139, label %bb166 - -bb139: ; preds = %bb131 - %tmp144 = call fastcc i32 @decode_macroblock( i32* null, i32* null, i32* null, i32* null, i32* null, [2 x [2 x i32]]* null, i32* null, [2 x i32]* null, i32* null ) ; <i32> [#uses=1] - switch i32 %tmp144, label %bb166 [ - i32 -1, label %bb231 - i32 0, label %resync - ] - -bb166: ; preds = %bb139, %bb131 - ret i32 0 - -bb231: ; preds = %bb139, %bb27, %entry - ret i32 0 -} - -declare i32 @Get_macroblock_address_increment() - -declare fastcc void @macroblock_modes(i32*, i32*, i32*, i32*, i32*, i32*, i32*, i32*, i32*) - -declare i32 @Get_macroblock_type() - -declare fastcc void @Add_Block(i32, i32, i32, i32, i32) - -declare fastcc void @Decode_SNR_Macroblock(i32*, i32*, i32, i32, i32*) - -declare i32 @Get_coded_block_pattern() - -declare fastcc void @Clear_Block(i32) - -declare fastcc void @Sum_Block(i32) - -declare fastcc void @Saturate(i16*) - -declare fastcc void @Update_Picture_Buffers() - -declare void @Output_Last_Frame_of_Sequence(i32) - -declare void @Write_Frame(i8**, i32) - -declare fastcc void @frame_reorder(i32, i32) - -declare fastcc void @motion_compensation(i32, i32, i32, [2 x [2 x i32]]*, [2 x i32]*, i32*, i32, i32) - -declare void @form_predictions(i32, i32, i32, i32, [2 x [2 x i32]]*, [2 x i32]*, i32*, i32) - -declare void @Reference_IDCT(i16*) - -declare void @Fast_IDCT(i16*) - -declare fastcc void @skipped_macroblock(i32*, [2 x [2 x i32]]*, i32*, [2 x i32]*, i32*, i32*) - -declare fastcc i32 @start_of_slice(i32*, i32*, i32*, [2 x [2 x i32]]*) - -define internal fastcc i32 @decode_macroblock(i32* %macroblock_type, i32* %stwtype, i32* %stwclass, i32* %motion_type, i32* %dct_type, [2 x [2 x i32]]* %PMV, i32* %dc_dct_pred, [2 x i32]* %motion_vertical_field_select, i32* %dmvector) { -entry: - %tmp3 = icmp eq i32 0, 1 ; <i1> [#uses=1] - br i1 %tmp3, label %bb, label %bb15 - -bb: ; preds = %entry - %tmp7 = icmp slt i32 0, 3 ; <i1> [#uses=1] - br i1 %tmp7, label %bb13, label %bb14 - -bb13: ; preds = %bb - br label %bb15 - -bb14: ; preds = %bb - ret i32 0 - -bb15: ; preds = %bb13, %entry - %tmp21 = load i32* @Fault_Flag, align 4 ; <i32> [#uses=1] - %tmp22 = icmp eq i32 %tmp21, 0 ; <i1> [#uses=1] - br i1 %tmp22, label %bb29, label %bb630 - -bb29: ; preds = %bb15 - %tmp33 = icmp eq i32 0, 0 ; <i1> [#uses=1] - br i1 %tmp33, label %bb91, label %bb39 - -bb39: ; preds = %bb29 - ret i32 0 - -bb91: ; preds = %bb29 - %tmp94 = and i32 0, 8 ; <i32> [#uses=0] - %tmp121 = load %struct.layer_data** @ld, align 4 ; <%struct.layer_data*> [#uses=0] - %tmp123 = load i32* null ; <i32> [#uses=1] - %tmp124 = icmp eq i32 %tmp123, 0 ; <i1> [#uses=1] - br i1 %tmp124, label %bb146, label %bb130 - -bb130: ; preds = %bb91 - call void @motion_vectors( [2 x [2 x i32]]* %PMV, i32* %dmvector, [2 x i32]* %motion_vertical_field_select, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ) - br label %bb157 - -bb146: ; preds = %bb91 - br label %bb157 - -bb157: ; preds = %bb146, %bb130 - %tmp159 = icmp eq i32 0, 0 ; <i1> [#uses=1] - br i1 %tmp159, label %bb166, label %bb630 - -bb166: ; preds = %bb157 - %tmp180 = icmp eq i32 0, 0 ; <i1> [#uses=1] - br i1 %tmp180, label %bb201, label %bb186 - -bb186: ; preds = %bb166 - br label %bb212 - -bb201: ; preds = %bb166 - %tmp205 = load i32* @backward_f_code, align 4 ; <i32> [#uses=0] - br label %bb212 - -bb212: ; preds = %bb201, %bb186 - %tmp214 = icmp eq i32 0, 0 ; <i1> [#uses=1] - br i1 %tmp214, label %bb221, label %bb630 - -bb221: ; preds = %bb212 - %tmp22422511 = and i32 0, 1 ; <i32> [#uses=1] - %toBool226 = icmp eq i32 %tmp22422511, 0 ; <i1> [#uses=1] - br i1 %toBool226, label %bb239, label %bb230 - -bb230: ; preds = %bb221 - ret i32 0 - -bb239: ; preds = %bb221 - %tmp241 = load i32* getelementptr (%struct.layer_data* @base, i32 0, i32 17), align 4 ; <i32> [#uses=0] - %tmp262 = icmp eq i32 0, 0 ; <i1> [#uses=1] - br i1 %tmp262, label %bb296, label %bb268 - -bb268: ; preds = %bb239 - %tmp270 = load i32* @chroma_format, align 4 ; <i32> [#uses=1] - %tmp271 = icmp eq i32 %tmp270, 2 ; <i1> [#uses=1] - br i1 %tmp271, label %bb277, label %bb282 - -bb277: ; preds = %bb268 - br label %bb312 - -bb282: ; preds = %bb268 - %tmp283 = load i32* @chroma_format, align 4 ; <i32> [#uses=0] - br label %bb312 - -bb296: ; preds = %bb239 - %tmp298 = load i32* %macroblock_type ; <i32> [#uses=1] - %tmp2993009 = and i32 %tmp298, 1 ; <i32> [#uses=1] - %toBool301 = icmp eq i32 %tmp2993009, 0 ; <i1> [#uses=1] - br i1 %toBool301, label %bb312, label %bb305 - -bb305: ; preds = %bb296 - %tmp306 = load i32* @block_count, align 4 ; <i32> [#uses=0] - %tmp308 = add i32 0, -1 ; <i32> [#uses=0] - br label %bb312 - -bb312: ; preds = %bb305, %bb296, %bb282, %bb277 - %tmp313 = load i32* @Fault_Flag, align 4 ; <i32> [#uses=1] - %tmp314 = icmp eq i32 %tmp313, 0 ; <i1> [#uses=1] - br i1 %tmp314, label %bb398, label %bb630 - -bb346: ; preds = %cond_true404 - %toBool351 = icmp eq i32 0, 0 ; <i1> [#uses=1] - %tmp359 = icmp ne i32 0, 0 ; <i1> [#uses=2] - br i1 %toBool351, label %bb372, label %bb355 - -bb355: ; preds = %bb346 - br i1 %tmp359, label %bb365, label %bb368 - -bb365: ; preds = %bb355 - br label %bb386 - -bb368: ; preds = %bb355 - call void @Decode_MPEG1_Intra_Block( i32 0, i32* %dc_dct_pred ) - br label %bb386 - -bb372: ; preds = %bb346 - br i1 %tmp359, label %bb382, label %bb384 - -bb382: ; preds = %bb372 - br label %bb386 - -bb384: ; preds = %bb372 - call void @Decode_MPEG1_Non_Intra_Block( i32 0 ) - br label %bb386 - -bb386: ; preds = %bb384, %bb382, %bb368, %bb365 - %tmp388 = icmp eq i32 0, 0 ; <i1> [#uses=1] - br i1 %tmp388, label %bb395, label %bb630 - -bb395: ; preds = %cond_true404, %bb386 - %tmp397 = add i32 0, 1 ; <i32> [#uses=0] - ret i32 0 - -bb398: ; preds = %bb312 - %tmp401 = icmp slt i32 0, 0 ; <i1> [#uses=1] - br i1 %tmp401, label %cond_true404, label %bb407 - -cond_true404: ; preds = %bb398 - %tmp340341514 = and i32 0, 0 ; <i32> [#uses=1] - %toBool342 = icmp eq i32 %tmp340341514, 0 ; <i1> [#uses=1] - br i1 %toBool342, label %bb395, label %bb346 - -bb407: ; preds = %bb398 - %tmp408 = load i32* @picture_coding_type, align 4 ; <i32> [#uses=0] - %tmp419 = load i32* %macroblock_type ; <i32> [#uses=1] - %tmp420 = and i32 %tmp419, 1 ; <i32> [#uses=1] - %tmp421 = icmp eq i32 %tmp420, 0 ; <i1> [#uses=0] - %tmp442 = load i32* %macroblock_type ; <i32> [#uses=1] - %tmp4434447 = and i32 %tmp442, 1 ; <i32> [#uses=0] - %tmp450 = load i32* @concealment_motion_vectors, align 4 ; <i32> [#uses=0] - %tmp572 = icmp eq i32 0, 4 ; <i1> [#uses=1] - br i1 %tmp572, label %bb578, label %bb630 - -bb578: ; preds = %bb407 - %tmp613 = getelementptr [2 x [2 x i32]]* %PMV, i32 1, i32 1, i32 1 ; <i32*> [#uses=0] - %tmp618 = getelementptr [2 x [2 x i32]]* %PMV, i32 1, i32 1, i32 0 ; <i32*> [#uses=0] - %tmp623 = getelementptr [2 x [2 x i32]]* %PMV, i32 0, i32 1, i32 1 ; <i32*> [#uses=0] - %tmp628 = getelementptr [2 x [2 x i32]]* %PMV, i32 0, i32 1, i32 0 ; <i32*> [#uses=0] - ret i32 1 - -bb630: ; preds = %bb407, %bb386, %bb312, %bb212, %bb157, %bb15 - %tmp.0 = phi i32 [ 0, %bb15 ], [ 0, %bb157 ], [ 0, %bb212 ], [ 0, %bb312 ], [ 0, %bb386 ], [ 1, %bb407 ] ; <i32> [#uses=1] - ret i32 %tmp.0 -} - -declare void @motion_vectors([2 x [2 x i32]]*, i32*, [2 x i32]*, i32, i32, i32, i32, i32, i32, i32) - -declare void @motion_vector(i32*, i32*, i32, i32, i32, i32, i32) - -declare fastcc i32 @Get_I_macroblock_type() - -declare fastcc i32 @Get_P_macroblock_type() - -declare fastcc i32 @Get_B_macroblock_type() - -declare fastcc void @Get_D_macroblock_type() - -declare fastcc i32 @Get_I_Spatial_macroblock_type() - -declare fastcc i32 @Get_P_Spatial_macroblock_type() - -declare fastcc i32 @Get_B_Spatial_macroblock_type() - -declare fastcc i32 @Get_SNR_macroblock_type() - -declare i32 @Get_motion_code() - -declare i32 @Get_dmvector() - -declare fastcc void @idctrow(i16*) - -declare fastcc void @idctcol(i16*) - -declare void @Initialize_Fast_IDCT() - -declare void @Initialize_Reference_IDCT() - -declare double @cos(double) - -declare double @floor(double) - -declare fastcc void @decode_motion_vector(i32*, i32, i32, i32, i32) - -declare void @Dual_Prime_Arithmetic([2 x i32]*, i32*, i32, i32) - -declare i32 @main(i32, i8**) - -declare i32 @open(i8*, i32, ...) - -declare void @exit(i32) - -declare void @llvm.memcpy.i32(i8*, i8*, i32, i32) - -declare i32 @lseek(i32, i32, i32) - -declare i32 @sprintf(i8*, i8*, ...) - -declare i32 @close(i32) - -declare fastcc void @Initialize_Decoder() - -declare fastcc void @Initialize_Sequence() - -declare void @Print_Bits(i32, i32, i32) - -declare fastcc void @Process_Options(i32, i8**) - -declare i32 @toupper(i32) - -declare i32 @atoi(i8*) - -declare fastcc i32 @Headers() - -declare fastcc void @Decode_Bitstream() - -declare fastcc void @Deinitialize_Sequence() - -declare fastcc i32 @video_sequence(i32*) - -declare void @Clear_Options() - -declare fastcc void @form_prediction(i8**, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32) - -declare fastcc void @form_component_prediction(i8*, i8*, i32, i32, i32, i32, i32, i32, i32, i32, i32) - -declare fastcc void @Read_Lower_Layer_Component_Framewise(i32, i32, i32) - -declare i8* @strcat(i8*, i8*) - -declare %struct.FILE* @fopen(i8*, i8*) - -declare i32 @_IO_getc(%struct.FILE*) - -declare i32 @fclose(%struct.FILE*) - -declare fastcc void @Read_Lower_Layer_Component_Fieldwise(i32, i32, i32) - -declare fastcc void @Make_Spatial_Prediction_Frame(i32, i32, i8*, i8*, i16*, i8*, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32) - -declare fastcc void @Deinterlace(i8*, i8*, i32, i32, i32, i32) - -declare fastcc void @Subsample_Vertical(i8*, i16*, i32, i32, i32, i32, i32, i32, i32) - -declare fastcc void @Subsample_Horizontal(i16*, i8*, i32, i32, i32, i32, i32, i32, i32) - -declare fastcc void @store_one(i8*, i8**, i32, i32, i32) - -declare fastcc void @store_yuv(i8*, i8**, i32, i32, i32) - -declare fastcc void @store_yuv1(i8*, i8*, i32, i32, i32, i32) - -declare i32 @write(...) - -declare fastcc void @store_sif(i8*, i8**, i32, i32, i32) - -declare fastcc void @store_ppm_tga(i8*, i8**, i32, i32, i32, i32) - -declare fastcc void @putbyte(i32) - -declare fastcc void @putword(i32) - -declare fastcc void @conv422to444(i8*, i8*) - -declare fastcc void @conv420to422(i8*, i8*) - -declare fastcc void @Read_Frame(i8*, i8**, i32) - -declare fastcc i32 @Read_Components(i8*, i32) - -declare fastcc void @Read_Component(i8*, i8*, i32, i32) - -declare fastcc i32 @Extract_Components(i8*, i32) - -declare i32 @fseek(%struct.FILE*, i32, i32) - -declare i32 @fread(i8*, i32, i32, %struct.FILE*) - -declare fastcc void @Copy_Frame(i8*, i8*, i32, i32, i32, i32) - -declare i32 @Get_Long() diff --git a/test/Transforms/CondProp/2009-01-25-SingleEntryPHI.ll b/test/Transforms/CondProp/2009-01-25-SingleEntryPHI.ll deleted file mode 100644 index 58dd29f5e28e1..0000000000000 --- a/test/Transforms/CondProp/2009-01-25-SingleEntryPHI.ll +++ /dev/null @@ -1,37 +0,0 @@ -; RUN: opt < %s -condprop | llvm-dis -; PR3405 -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" - -define i32 @main(i32 %argc, i8** %argv) nounwind { -entry: - br label %bb2 - -bb2: ; preds = %bb.bb2_crit_edge, %entry - br i1 false, label %bb5.thread2, label %bb - -bb: ; preds = %bb2 - br i1 false, label %bb3, label %bb.bb2_crit_edge - -bb.bb2_crit_edge: ; preds = %bb - br label %bb2 - -bb3: ; preds = %bb - %.lcssa4 = phi i1 [ false, %bb ] ; <i1> [#uses=1] - br i1 %.lcssa4, label %bb5.thread, label %bb6 - -bb5.thread: ; preds = %bb3 - br label %bb7 - -bb7: ; preds = %bb5.thread2, %bb5.thread - br label %UnifiedReturnBlock - -bb6: ; preds = %bb3 - br label %UnifiedReturnBlock - -bb5.thread2: ; preds = %bb2 - br label %bb7 - -UnifiedReturnBlock: ; preds = %bb6, %bb7 - ret i32 0 -} diff --git a/test/Transforms/CondProp/basictest-dbg.ll b/test/Transforms/CondProp/basictest-dbg.ll deleted file mode 100644 index 9e05ff15105fc..0000000000000 --- a/test/Transforms/CondProp/basictest-dbg.ll +++ /dev/null @@ -1,45 +0,0 @@ -; RUN: opt < %s -condprop -S | \ -; RUN: not grep {br label} - - %llvm.dbg.anchor.type = type { i32, i32 } - %llvm.dbg.compile_unit.type = type { i32, { }*, i32, i8*, i8*, i8*, i1, i1, i8* } - -@llvm.dbg.compile_units = linkonce constant %llvm.dbg.anchor.type { i32 458752, i32 17 }, section "llvm.metadata" ; - -@.str = internal constant [4 x i8] c"a.c\00", section "llvm.metadata" ; <[4 x i8]*> [#uses=1] -@.str1 = internal constant [6 x i8] c"/tmp/\00", section "llvm.metadata" ; <[6 x i8]*> [#uses=1] -@.str2 = internal constant [55 x i8] c"4.2.1 (Based on Apple Inc. build 5636) (LLVM build 00)\00", section "llvm.metadata" ; <[55 x i8]*> [#uses=1] -@llvm.dbg.compile_unit = internal constant %llvm.dbg.compile_unit.type { i32 458769, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.compile_units to { }*), i32 1, i8* getelementptr ([4 x i8]* @.str, i32 0, i32 0), i8* getelementptr ([6 x i8]* @.str1, i32 0, i32 0), i8* getelementptr ([55 x i8]* @.str2, i32 0, i32 0), i1 true, i1 false, i8* null }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1] - -declare void @llvm.dbg.stoppoint(i32, i32, { }*) nounwind - - -define i32 @test(i1 %C) { - br i1 %C, label %T1, label %F1 - -T1: ; preds = %0 -call void @llvm.dbg.stoppoint(i32 5, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - br label %Cont - -F1: ; preds = %0 -call void @llvm.dbg.stoppoint(i32 5, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - br label %Cont - -Cont: ; preds = %F1, %T1 - %C2 = phi i1 [ false, %F1 ], [ true, %T1 ] ; <i1> [#uses=1] -call void @llvm.dbg.stoppoint(i32 5, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - br i1 %C2, label %T2, label %F2 - -T2: ; preds = %Cont -call void @llvm.dbg.stoppoint(i32 5, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - call void @bar( ) -call void @llvm.dbg.stoppoint(i32 5, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - ret i32 17 - -F2: ; preds = %Cont -call void @llvm.dbg.stoppoint(i32 5, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*)) - ret i32 1 -} - -declare void @bar() - diff --git a/test/Transforms/CondProp/basictest.ll b/test/Transforms/CondProp/basictest.ll deleted file mode 100644 index 49d473533a10b..0000000000000 --- a/test/Transforms/CondProp/basictest.ll +++ /dev/null @@ -1,28 +0,0 @@ -; RUN: opt < %s -condprop -S | \ -; RUN: not grep {br label} -; RUN: opt < %s -condprop -S | not grep T2 - - -define i32 @test(i1 %C) { - br i1 %C, label %T1, label %F1 - -T1: ; preds = %0 - br label %Cont - -F1: ; preds = %0 - br label %Cont - -Cont: ; preds = %F1, %T1 - %C2 = phi i1 [ false, %F1 ], [ true, %T1 ] ; <i1> [#uses=1] - br i1 %C2, label %T2, label %F2 - -T2: ; preds = %Cont - call void @bar( ) - ret i32 17 - -F2: ; preds = %Cont - ret i32 1 -} - -declare void @bar() - diff --git a/test/Transforms/CondProp/dg.exp b/test/Transforms/CondProp/dg.exp deleted file mode 100644 index 39954d8a498de..0000000000000 --- a/test/Transforms/CondProp/dg.exp +++ /dev/null @@ -1,3 +0,0 @@ -load_lib llvm.exp - -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll}]] diff --git a/test/Transforms/CondProp/phisimplify.ll b/test/Transforms/CondProp/phisimplify.ll deleted file mode 100644 index ce33f1e59a65c..0000000000000 --- a/test/Transforms/CondProp/phisimplify.ll +++ /dev/null @@ -1,43 +0,0 @@ -; RUN: opt < %s -condprop -S | not grep phi - -define i32 @test(i32 %C, i1 %Val) { - switch i32 %C, label %T1 [ - i32 4, label %T2 - i32 17, label %T3 - ] - -T1: ; preds = %0 - call void @a( ) - br label %Cont - -T2: ; preds = %0 - call void @b( ) - br label %Cont - -T3: ; preds = %0 - call void @c( ) - br label %Cont - -Cont: ; preds = %T3, %T2, %T1 - ;; PHI becomes dead after threading T2 - %C2 = phi i1 [ %Val, %T1 ], [ true, %T2 ], [ %Val, %T3 ] ; <i1> [#uses=1] - br i1 %C2, label %L2, label %F2 - -L2: ; preds = %Cont - call void @d( ) - ret i32 17 - -F2: ; preds = %Cont - call void @e( ) - ret i32 1 -} - -declare void @a() - -declare void @b() - -declare void @c() - -declare void @d() - -declare void @e() diff --git a/test/Transforms/CondProp/phisimplify2.ll b/test/Transforms/CondProp/phisimplify2.ll deleted file mode 100644 index 4ecbd8856b789..0000000000000 --- a/test/Transforms/CondProp/phisimplify2.ll +++ /dev/null @@ -1,46 +0,0 @@ -; RUN: opt < %s -condprop -S | not grep phi - -declare i1 @foo() - -define i32 @test(i32 %C) { - %Val = call i1 @foo( ) ; <i1> [#uses=2] - switch i32 %C, label %T1 [ - i32 4, label %T2 - i32 17, label %T3 - ] - -T1: ; preds = %0 - call void @a( ) - br label %Cont - -T2: ; preds = %0 - call void @b( ) - br label %Cont - -T3: ; preds = %0 - call void @c( ) - br label %Cont - -Cont: ; preds = %T3, %T2, %T1 - ;; PHI becomes dead after threading T2 - %C2 = phi i1 [ %Val, %T1 ], [ true, %T2 ], [ %Val, %T3 ] ; <i1> [#uses=1] - br i1 %C2, label %L2, label %F2 - -L2: ; preds = %Cont - call void @d( ) - ret i32 17 - -F2: ; preds = %Cont - call void @e( ) - ret i32 1 -} - -declare void @a() - -declare void @b() - -declare void @c() - -declare void @d() - -declare void @e() diff --git a/test/Transforms/CondProp/phisimplify3.ll b/test/Transforms/CondProp/phisimplify3.ll deleted file mode 100644 index 6166efb1103f1..0000000000000 --- a/test/Transforms/CondProp/phisimplify3.ll +++ /dev/null @@ -1,26 +0,0 @@ -; RUN: opt < %s -condprop -S | not grep phi - -define i32 @foo(i1, i32, i32) { -prologue: - br i1 %0, label %eq, label %ne - -eq: ; preds = %prologue - store i32 0, i32* inttoptr (i32 10000 to i32*) - %3 = icmp eq i32 %1, %2 ; <i1> [#uses=1] - br label %join - -ne: ; preds = %prologue - %4 = icmp ne i32 %1, %2 ; <i1> [#uses=1] - br label %join - -join: ; preds = %ne, %eq - %5 = phi i1 [ %3, %eq ], [ %4, %ne ] ; <i1> [#uses=1] - br i1 %5, label %yes, label %no - -yes: ; preds = %join - store i32 0, i32* inttoptr (i32 20000 to i32*) - ret i32 5 - -no: ; preds = %join - ret i32 20 -} diff --git a/test/Transforms/ConstProp/2009-09-19-ConstFold-i1-ConstExpr.ll b/test/Transforms/ConstProp/2009-09-19-ConstFold-i1-ConstExpr.ll deleted file mode 100644 index 8d92c3fba4bf8..0000000000000 --- a/test/Transforms/ConstProp/2009-09-19-ConstFold-i1-ConstExpr.ll +++ /dev/null @@ -1,41 +0,0 @@ -; RUN: llvm-as < %s | llvm-dis | FileCheck %s - -@X = external global i8 -@Y = external global i8 -@Z = external global i8 - -@A = global i1 add (i1 icmp ult (i8* @X, i8* @Y), i1 icmp ult (i8* @X, i8* @Z)) -; CHECK: @A = global i1 xor (i1 icmp ult (i8* @X, i8* @Y), i1 icmp ult (i8* @X, i8* @Z)) ; <i1*> [#uses=0] -@B = global i1 sub (i1 icmp ult (i8* @X, i8* @Y), i1 icmp ult (i8* @X, i8* @Z)) -; CHECK: @B = global i1 xor (i1 icmp ult (i8* @X, i8* @Y), i1 icmp ult (i8* @X, i8* @Z)) ; <i1*> [#uses=0] -@C = global i1 mul (i1 icmp ult (i8* @X, i8* @Y), i1 icmp ult (i8* @X, i8* @Z)) -; CHECK: @C = global i1 and (i1 icmp ult (i8* @X, i8* @Y), i1 icmp ult (i8* @X, i8* @Z)) ; <i1*> [#uses=0] - -@D = global i1 sdiv (i1 icmp ult (i8* @X, i8* @Y), i1 icmp ult (i8* @X, i8* @Z)) -; CHECK: @D = global i1 icmp ult (i8* @X, i8* @Y) ; <i1*> [#uses=0] -@E = global i1 udiv (i1 icmp ult (i8* @X, i8* @Y), i1 icmp ult (i8* @X, i8* @Z)) -; CHECK: @E = global i1 icmp ult (i8* @X, i8* @Y) ; <i1*> [#uses=0] -@F = global i1 srem (i1 icmp ult (i8* @X, i8* @Y), i1 icmp ult (i8* @X, i8* @Z)) -; CHECK: @F = global i1 false ; <i1*> [#uses=0] -@G = global i1 urem (i1 icmp ult (i8* @X, i8* @Y), i1 icmp ult (i8* @X, i8* @Z)) -; CHECK: @G = global i1 false ; <i1*> [#uses=0] - -@H = global i1 icmp ule (i32* bitcast (i8* @X to i32*), i32* bitcast (i8* @Y to i32*)) -; CHECK: @H = global i1 icmp ule (i8* @X, i8* @Y) ; <i1*> [#uses=0] - -@I = global i1 xor (i1 icmp ult (i8* @X, i8* @Y), i1 false) -; CHECK: @I = global i1 icmp ult (i8* @X, i8* @Y) ; <i1*> [#uses=0] -@J = global i1 xor (i1 icmp ult (i8* @X, i8* @Y), i1 true) -; CHECK: @J = global i1 icmp uge (i8* @X, i8* @Y) ; <i1*> [#uses=0] - -@K = global i1 icmp eq (i1 icmp ult (i8* @X, i8* @Y), i1 false) -; CHECK: @K = global i1 icmp uge (i8* @X, i8* @Y) ; <i1*> [#uses=0] -@L = global i1 icmp eq (i1 icmp ult (i8* @X, i8* @Y), i1 true) -; CHECK: @L = global i1 icmp ult (i8* @X, i8* @Y) ; <i1*> [#uses=0] -@M = global i1 icmp ne (i1 icmp ult (i8* @X, i8* @Y), i1 true) -; CHECK: @M = global i1 icmp uge (i8* @X, i8* @Y) ; <i1*> [#uses=0] -@N = global i1 icmp ne (i1 icmp ult (i8* @X, i8* @Y), i1 false) -; CHECK: @N = global i1 icmp ult (i8* @X, i8* @Y) ; <i1*> [#uses=0] - -@O = global i1 icmp eq (i32 zext (i1 icmp ult (i8* @X, i8* @Y) to i32), i32 0) -; CHECK: @O = global i1 icmp uge (i8* @X, i8* @Y) ; <i1*> [#uses=0] diff --git a/test/Transforms/DeadStoreElimination/crash.ll b/test/Transforms/DeadStoreElimination/crash.ll index 7f82cbfd9263d..f89f8f5185c68 100644 --- a/test/Transforms/DeadStoreElimination/crash.ll +++ b/test/Transforms/DeadStoreElimination/crash.ll @@ -1,4 +1,4 @@ -; RUN: opt < %s -dse | llvm-dis +; RUN: opt < %s -dse -S 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:128:128" target triple = "i386-apple-darwin10.0" @@ -24,3 +24,20 @@ bb: ; preds = %bb, %entry %2 = tail call signext i8 @foo(i8 signext undef, i8 signext 1) nounwind ; <i8> [#uses=1] br label %bb } + +define fastcc i32 @test2() nounwind ssp { +bb14: ; preds = %bb4 + %0 = bitcast i8* undef to i8** ; <i8**> [#uses=1] + %1 = getelementptr inbounds i8** %0, i64 undef ; <i8**> [#uses=1] + %2 = bitcast i8** %1 to i16* ; <i16*> [#uses=2] + %3 = getelementptr inbounds i16* %2, i64 undef ; <i16*> [#uses=1] + %4 = bitcast i16* %3 to i8* ; <i8*> [#uses=1] + %5 = getelementptr inbounds i8* %4, i64 undef ; <i8*> [#uses=1] + %6 = getelementptr inbounds i16* %2, i64 undef ; <i16*> [#uses=1] + store i16 undef, i16* %6, align 2 + %7 = getelementptr inbounds i8* %5, i64 undef ; <i8*> [#uses=1] + call void @llvm.memcpy.i64(i8* %7, i8* undef, i64 undef, i32 1) nounwind + unreachable +} + +declare void @llvm.memcpy.i64(i8* nocapture, i8* nocapture, i64, i32) nounwind diff --git a/test/Transforms/DeadStoreElimination/lifetime.ll b/test/Transforms/DeadStoreElimination/lifetime.ll index b2da790db278c..fd127d9f51bc4 100644 --- a/test/Transforms/DeadStoreElimination/lifetime.ll +++ b/test/Transforms/DeadStoreElimination/lifetime.ll @@ -1,6 +1,9 @@ ; RUN: opt -S -dse < %s | FileCheck %s -declare void @llvm.lifetime.end(i64, i8*) +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.lifetime.start(i64, i8* nocapture) nounwind +declare void @llvm.lifetime.end(i64, i8* nocapture) nounwind declare void @llvm.memset.i8(i8*, i8, i8, i32) define void @test1() { @@ -17,3 +20,18 @@ define void @test1() { ret void ; CHECK: ret void } + +define void @test2(i32* %P) { +; CHECK: test2 + %Q = getelementptr i32* %P, i32 1 + %R = bitcast i32* %Q to i8* + call void @llvm.lifetime.start(i64 4, i8* %R) +; CHECK: lifetime.start + store i32 0, i32* %Q ;; This store is dead. +; CHECK-NOT: store + call void @llvm.lifetime.end(i64 4, i8* %R) +; CHECK: lifetime.end + ret void +} + + diff --git a/test/Transforms/GVN/crash.ll b/test/Transforms/GVN/crash.ll new file mode 100644 index 0000000000000..30563cd5848a3 --- /dev/null +++ b/test/Transforms/GVN/crash.ll @@ -0,0 +1,94 @@ +; RUN: opt -gvn %s -disable-output + +; PR5631 + +target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64" +target triple = "x86_64-apple-darwin10.0" + +define i32* @peel_to_type(i8* %name, i32 %namelen, i32* %o, i32 %expected_type) nounwind ssp { +entry: + br i1 undef, label %if.end13, label %while.body.preheader + + +if.end13: ; preds = %if.then6 + br label %while.body.preheader + +while.body.preheader: ; preds = %if.end13, %if.end + br label %while.body + +while.body: ; preds = %while.body.backedge, %while.body.preheader + %o.addr.0 = phi i32* [ undef, %while.body.preheader ], [ %o.addr.0.be, %while.body.backedge ] ; <i32*> [#uses=2] + br i1 false, label %return.loopexit, label %lor.lhs.false + +lor.lhs.false: ; preds = %while.body + %tmp20 = bitcast i32* %o.addr.0 to i32* ; <i32*> [#uses=1] + %tmp22 = load i32* %tmp20 ; <i32> [#uses=0] + br i1 undef, label %land.lhs.true24, label %if.end31 + +land.lhs.true24: ; preds = %lor.lhs.false + %call28 = call i32* @parse_object(i8* undef) nounwind ; <i32*> [#uses=0] + br i1 undef, label %return.loopexit, label %if.end31 + +if.end31: ; preds = %land.lhs.true24, %lor.lhs.false + br i1 undef, label %return.loopexit, label %if.end41 + +if.end41: ; preds = %if.end31 + %tmp43 = bitcast i32* %o.addr.0 to i32* ; <i32*> [#uses=1] + %tmp45 = load i32* %tmp43 ; <i32> [#uses=0] + br i1 undef, label %if.then50, label %if.else + +if.then50: ; preds = %if.end41 + %tmp53 = load i32** undef ; <i32*> [#uses=1] + br label %while.body.backedge + +if.else: ; preds = %if.end41 + br i1 undef, label %if.then62, label %if.else67 + +if.then62: ; preds = %if.else + br label %while.body.backedge + +while.body.backedge: ; preds = %if.then62, %if.then50 + %o.addr.0.be = phi i32* [ %tmp53, %if.then50 ], [ undef, %if.then62 ] ; <i32*> [#uses=1] + br label %while.body + +if.else67: ; preds = %if.else + ret i32* null + +return.loopexit: ; preds = %if.end31, %land.lhs.true24, %while.body + ret i32* undef +} + +declare i32* @parse_object(i8*) + + + + + + +%struct.attribute_spec = type { i8*, i32, i32, i8, i8, i8 } + +@attribute_tables = external global [4 x %struct.attribute_spec*] ; <[4 x %struct.attribute_spec*]*> [#uses=2] + +define void @decl_attributes() nounwind { +entry: + br label %bb69.i + +bb69.i: ; preds = %bb57.i.preheader + %tmp4 = getelementptr inbounds [4 x %struct.attribute_spec*]* @attribute_tables, i32 0, i32 undef ; <%struct.attribute_spec**> [#uses=1] + %tmp3 = load %struct.attribute_spec** %tmp4, align 4 ; <%struct.attribute_spec*> [#uses=1] + br label %bb65.i + +bb65.i: ; preds = %bb65.i.preheader, %bb64.i + %storemerge6.i = phi i32 [ 1, %bb64.i ], [ 0, %bb69.i ] ; <i32> [#uses=3] + %scevgep14 = getelementptr inbounds %struct.attribute_spec* %tmp3, i32 %storemerge6.i, i32 0 ; <i8**> [#uses=1] + %tmp2 = load i8** %scevgep14, align 4 ; <i8*> [#uses=0] + %tmp = load %struct.attribute_spec** %tmp4, align 4 ; <%struct.attribute_spec*> [#uses=1] + %scevgep1516 = getelementptr inbounds %struct.attribute_spec* %tmp, i32 %storemerge6.i, i32 0 ; <i8**> [#uses=0] + unreachable + +bb64.i: ; Unreachable + br label %bb65.i + +bb66.i: ; Unreachable + br label %bb69.i +} diff --git a/test/Transforms/GVN/lpre-basic.ll b/test/Transforms/GVN/lpre-basic.ll deleted file mode 100644 index 41b51806cd462..0000000000000 --- a/test/Transforms/GVN/lpre-basic.ll +++ /dev/null @@ -1,18 +0,0 @@ -; RUN: opt < %s -gvn -enable-load-pre -S | grep {%PRE = phi} - -define i32 @test(i32* %p, i1 %C) { -block1: - br i1 %C, label %block2, label %block3 - -block2: - br label %block4 - -block3: - %b = bitcast i32 0 to i32 - store i32 %b, i32* %p - br label %block4 - -block4: - %PRE = load i32* %p - ret i32 %PRE -} diff --git a/test/Transforms/GVN/nonescaping-malloc.ll b/test/Transforms/GVN/nonescaping-malloc.ll new file mode 100644 index 0000000000000..5a42d9536ca1e --- /dev/null +++ b/test/Transforms/GVN/nonescaping-malloc.ll @@ -0,0 +1,108 @@ +; RUN: opt < %s -gvn -stats -disable-output |& grep {Number of loads deleted} +; rdar://7363102 + +; GVN should be able to eliminate load %tmp22.i, because it is redundant with +; load %tmp8.i. This requires being able to prove that %tmp7.i doesn't +; alias the malloc'd value %tmp.i20.i.i, which it can do since %tmp7.i +; is derived from %tmp5.i which is computed from a load, and %tmp.i20.i.i +; is never stored and does not escape. + +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-darwin10.0" + +%"struct.llvm::MallocAllocator" = type <{ i8 }> +%"struct.llvm::StringMap<void*,llvm::MallocAllocator>" = type { %"struct.llvm::StringMapImpl", %"struct.llvm::MallocAllocator" } +%"struct.llvm::StringMapEntry<void*>" = type { %"struct.llvm::StringMapEntryBase", i8* } +%"struct.llvm::StringMapEntryBase" = type { i32 } +%"struct.llvm::StringMapImpl" = type { %"struct.llvm::StringMapImpl::ItemBucket"*, i32, i32, i32, i32 } +%"struct.llvm::StringMapImpl::ItemBucket" = type { i32, %"struct.llvm::StringMapEntryBase"* } +%"struct.llvm::StringRef" = type { i8*, i64 } + +define %"struct.llvm::StringMapEntry<void*>"* @_Z3fooRN4llvm9StringMapIPvNS_15MallocAllocatorEEEPKc(%"struct.llvm::StringMap<void*,llvm::MallocAllocator>"* %X, i8* %P) ssp { +entry: + %tmp = alloca %"struct.llvm::StringRef", align 8 ; <%"struct.llvm::StringRef"*> [#uses=3] + %tmp.i = getelementptr inbounds %"struct.llvm::StringRef"* %tmp, i64 0, i32 0 ; <i8**> [#uses=1] + store i8* %P, i8** %tmp.i, align 8 + %tmp1.i = call i64 @strlen(i8* %P) nounwind readonly ; <i64> [#uses=1] + %tmp2.i = getelementptr inbounds %"struct.llvm::StringRef"* %tmp, i64 0, i32 1 ; <i64*> [#uses=1] + store i64 %tmp1.i, i64* %tmp2.i, align 8 + %tmp1 = call %"struct.llvm::StringMapEntry<void*>"* @_ZN4llvm9StringMapIPvNS_15MallocAllocatorEE16GetOrCreateValueERKNS_9StringRefE(%"struct.llvm::StringMap<void*,llvm::MallocAllocator>"* %X, %"struct.llvm::StringRef"* %tmp) ssp ; <%"struct.llvm::StringMapEntry<void*>"*> [#uses=1] + ret %"struct.llvm::StringMapEntry<void*>"* %tmp1 +} + +declare i64 @strlen(i8* nocapture) nounwind readonly + +declare noalias i8* @malloc(i64) nounwind + +declare void @llvm.memcpy.i64(i8* nocapture, i8* nocapture, i64, i32) nounwind + +declare i32 @_ZN4llvm13StringMapImpl15LookupBucketForENS_9StringRefE(%"struct.llvm::StringMapImpl"*, i64, i64) + +define linkonce_odr %"struct.llvm::StringMapEntry<void*>"* @_ZN4llvm9StringMapIPvNS_15MallocAllocatorEE16GetOrCreateValueERKNS_9StringRefE(%"struct.llvm::StringMap<void*,llvm::MallocAllocator>"* %this, %"struct.llvm::StringRef"* nocapture %Key) ssp align 2 { +entry: + %elt = bitcast %"struct.llvm::StringRef"* %Key to i64* ; <i64*> [#uses=1] + %val = load i64* %elt ; <i64> [#uses=3] + %tmp = getelementptr inbounds %"struct.llvm::StringRef"* %Key, i64 0, i32 1 ; <i64*> [#uses=1] + %val2 = load i64* %tmp ; <i64> [#uses=2] + %tmp2.i = getelementptr inbounds %"struct.llvm::StringMap<void*,llvm::MallocAllocator>"* %this, i64 0, i32 0 ; <%"struct.llvm::StringMapImpl"*> [#uses=1] + %tmp3.i = tail call i32 @_ZN4llvm13StringMapImpl15LookupBucketForENS_9StringRefE(%"struct.llvm::StringMapImpl"* %tmp2.i, i64 %val, i64 %val2) ; <i32> [#uses=1] + %tmp4.i = getelementptr inbounds %"struct.llvm::StringMap<void*,llvm::MallocAllocator>"* %this, i64 0, i32 0, i32 0 ; <%"struct.llvm::StringMapImpl::ItemBucket"**> [#uses=1] + %tmp5.i = load %"struct.llvm::StringMapImpl::ItemBucket"** %tmp4.i, align 8 ; <%"struct.llvm::StringMapImpl::ItemBucket"*> [#uses=1] + %tmp6.i = zext i32 %tmp3.i to i64 ; <i64> [#uses=1] + %tmp7.i = getelementptr inbounds %"struct.llvm::StringMapImpl::ItemBucket"* %tmp5.i, i64 %tmp6.i, i32 1 ; <%"struct.llvm::StringMapEntryBase"**> [#uses=2] + %tmp8.i = load %"struct.llvm::StringMapEntryBase"** %tmp7.i, align 8 ; <%"struct.llvm::StringMapEntryBase"*> [#uses=3] + %tmp9.i = icmp eq %"struct.llvm::StringMapEntryBase"* %tmp8.i, null ; <i1> [#uses=1] + %tmp13.i = icmp eq %"struct.llvm::StringMapEntryBase"* %tmp8.i, inttoptr (i64 -1 to %"struct.llvm::StringMapEntryBase"*) ; <i1> [#uses=1] + %or.cond.i = or i1 %tmp9.i, %tmp13.i ; <i1> [#uses=1] + br i1 %or.cond.i, label %bb4.i, label %bb6.i + +bb4.i: ; preds = %entry + %tmp41.i = inttoptr i64 %val to i8* ; <i8*> [#uses=2] + %tmp4.i35.i = getelementptr inbounds i8* %tmp41.i, i64 %val2 ; <i8*> [#uses=1] + %tmp.i.i = ptrtoint i8* %tmp4.i35.i to i64 ; <i64> [#uses=1] + %tmp1.i.i = trunc i64 %tmp.i.i to i32 ; <i32> [#uses=1] + %tmp3.i.i = trunc i64 %val to i32 ; <i32> [#uses=1] + %tmp4.i.i = sub i32 %tmp1.i.i, %tmp3.i.i ; <i32> [#uses=3] + %tmp5.i.i = add i32 %tmp4.i.i, 17 ; <i32> [#uses=1] + %tmp8.i.i = zext i32 %tmp5.i.i to i64 ; <i64> [#uses=1] + %tmp.i20.i.i = tail call noalias i8* @malloc(i64 %tmp8.i.i) nounwind ; <i8*> [#uses=7] + %tmp10.i.i = bitcast i8* %tmp.i20.i.i to %"struct.llvm::StringMapEntry<void*>"* ; <%"struct.llvm::StringMapEntry<void*>"*> [#uses=2] + %tmp12.i.i = icmp eq i8* %tmp.i20.i.i, null ; <i1> [#uses=1] + br i1 %tmp12.i.i, label %_ZN4llvm14StringMapEntryIPvE6CreateINS_15MallocAllocatorES1_EEPS2_PKcS7_RT_T0_.exit.i, label %bb.i.i + +bb.i.i: ; preds = %bb4.i + %tmp.i.i.i.i = bitcast i8* %tmp.i20.i.i to i32* ; <i32*> [#uses=1] + store i32 %tmp4.i.i, i32* %tmp.i.i.i.i, align 4 + %tmp1.i19.i.i = getelementptr inbounds i8* %tmp.i20.i.i, i64 8 ; <i8*> [#uses=1] + %0 = bitcast i8* %tmp1.i19.i.i to i8** ; <i8**> [#uses=1] + store i8* null, i8** %0, align 8 + br label %_ZN4llvm14StringMapEntryIPvE6CreateINS_15MallocAllocatorES1_EEPS2_PKcS7_RT_T0_.exit.i + +_ZN4llvm14StringMapEntryIPvE6CreateINS_15MallocAllocatorES1_EEPS2_PKcS7_RT_T0_.exit.i: ; preds = %bb4.i, %bb.i.i + %tmp.i18.i.i = getelementptr inbounds i8* %tmp.i20.i.i, i64 16 ; <i8*> [#uses=1] + %tmp15.i.i = zext i32 %tmp4.i.i to i64 ; <i64> [#uses=2] + tail call void @llvm.memcpy.i64(i8* %tmp.i18.i.i, i8* %tmp41.i, i64 %tmp15.i.i, i32 1) nounwind + %tmp.i18.sum.i.i = add i64 %tmp15.i.i, 16 ; <i64> [#uses=1] + %tmp17.i.i = getelementptr inbounds i8* %tmp.i20.i.i, i64 %tmp.i18.sum.i.i ; <i8*> [#uses=1] + store i8 0, i8* %tmp17.i.i, align 1 + %tmp.i.i.i = getelementptr inbounds i8* %tmp.i20.i.i, i64 8 ; <i8*> [#uses=1] + %1 = bitcast i8* %tmp.i.i.i to i8** ; <i8**> [#uses=1] + store i8* null, i8** %1, align 8 + %tmp22.i = load %"struct.llvm::StringMapEntryBase"** %tmp7.i, align 8 ; <%"struct.llvm::StringMapEntryBase"*> [#uses=1] + %tmp24.i = icmp eq %"struct.llvm::StringMapEntryBase"* %tmp22.i, inttoptr (i64 -1 to %"struct.llvm::StringMapEntryBase"*) ; <i1> [#uses=1] + br i1 %tmp24.i, label %bb9.i, label %_ZN4llvm9StringMapIPvNS_15MallocAllocatorEE16GetOrCreateValueIS1_EERNS_14StringMapEntryIS1_EENS_9StringRefET_.exit + +bb6.i: ; preds = %entry + %tmp16.i = bitcast %"struct.llvm::StringMapEntryBase"* %tmp8.i to %"struct.llvm::StringMapEntry<void*>"* ; <%"struct.llvm::StringMapEntry<void*>"*> [#uses=1] + ret %"struct.llvm::StringMapEntry<void*>"* %tmp16.i + +bb9.i: ; preds = %_ZN4llvm14StringMapEntryIPvE6CreateINS_15MallocAllocatorES1_EEPS2_PKcS7_RT_T0_.exit.i + %tmp25.i = getelementptr inbounds %"struct.llvm::StringMap<void*,llvm::MallocAllocator>"* %this, i64 0, i32 0, i32 3 ; <i32*> [#uses=2] + %tmp26.i = load i32* %tmp25.i, align 8 ; <i32> [#uses=1] + %tmp27.i = add i32 %tmp26.i, -1 ; <i32> [#uses=1] + store i32 %tmp27.i, i32* %tmp25.i, align 8 + ret %"struct.llvm::StringMapEntry<void*>"* %tmp10.i.i + +_ZN4llvm9StringMapIPvNS_15MallocAllocatorEE16GetOrCreateValueIS1_EERNS_14StringMapEntryIS1_EENS_9StringRefET_.exit: ; preds = %_ZN4llvm14StringMapEntryIPvE6CreateINS_15MallocAllocatorES1_EEPS2_PKcS7_RT_T0_.exit.i + ret %"struct.llvm::StringMapEntry<void*>"* %tmp10.i.i +} diff --git a/test/Transforms/GVN/pre-load.ll b/test/Transforms/GVN/pre-load.ll new file mode 100644 index 0000000000000..7047d4eba4857 --- /dev/null +++ b/test/Transforms/GVN/pre-load.ll @@ -0,0 +1,364 @@ +; RUN: opt < %s -gvn -enable-load-pre -S | FileCheck %s +target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64" + +define i32 @test1(i32* %p, i1 %C) { +; CHECK: @test1 +block1: + br i1 %C, label %block2, label %block3 + +block2: + br label %block4 +; CHECK: block2: +; CHECK-NEXT: load i32* %p + +block3: + store i32 0, i32* %p + br label %block4 + +block4: + %PRE = load i32* %p + ret i32 %PRE +; CHECK: block4: +; CHECK-NEXT: phi i32 +; CHECK-NEXT: ret i32 +} + +; This is a simple phi translation case. +define i32 @test2(i32* %p, i32* %q, i1 %C) { +; CHECK: @test2 +block1: + br i1 %C, label %block2, label %block3 + +block2: + br label %block4 +; CHECK: block2: +; CHECK-NEXT: load i32* %q + +block3: + store i32 0, i32* %p + br label %block4 + +block4: + %P2 = phi i32* [%p, %block3], [%q, %block2] + %PRE = load i32* %P2 + ret i32 %PRE +; CHECK: block4: +; CHECK-NEXT: phi i32 [ +; CHECK-NOT: load +; CHECK: ret i32 +} + +; This is a PRE case that requires phi translation through a GEP. +define i32 @test3(i32* %p, i32* %q, i32** %Hack, i1 %C) { +; CHECK: @test3 +block1: + %B = getelementptr i32* %q, i32 1 + store i32* %B, i32** %Hack + br i1 %C, label %block2, label %block3 + +block2: + br label %block4 +; CHECK: block2: +; CHECK-NEXT: load i32* %B + +block3: + %A = getelementptr i32* %p, i32 1 + store i32 0, i32* %A + br label %block4 + +block4: + %P2 = phi i32* [%p, %block3], [%q, %block2] + %P3 = getelementptr i32* %P2, i32 1 + %PRE = load i32* %P3 + ret i32 %PRE +; CHECK: block4: +; CHECK-NEXT: phi i32 [ +; CHECK-NOT: load +; CHECK: ret i32 +} + +;; Here the loaded address is available, but the computation is in 'block3' +;; which does not dominate 'block2'. +define i32 @test4(i32* %p, i32* %q, i32** %Hack, i1 %C) { +; CHECK: @test4 +block1: + br i1 %C, label %block2, label %block3 + +block2: + br label %block4 +; CHECK: block2: +; CHECK: load i32* +; CHECK: br label %block4 + +block3: + %B = getelementptr i32* %q, i32 1 + store i32* %B, i32** %Hack + + %A = getelementptr i32* %p, i32 1 + store i32 0, i32* %A + br label %block4 + +block4: + %P2 = phi i32* [%p, %block3], [%q, %block2] + %P3 = getelementptr i32* %P2, i32 1 + %PRE = load i32* %P3 + ret i32 %PRE +; CHECK: block4: +; CHECK-NEXT: phi i32 [ +; CHECK-NOT: load +; CHECK: ret i32 +} + +;void test5(int N, double *G) { +; int j; +; for (j = 0; j < N - 1; j++) +; G[j] = G[j] + G[j+1]; +;} + +define void @test5(i32 %N, double* nocapture %G) nounwind ssp { +; CHECK: @test5 +entry: + %0 = add i32 %N, -1 + %1 = icmp sgt i32 %0, 0 + br i1 %1, label %bb.nph, label %return + +bb.nph: + %tmp = zext i32 %0 to i64 + br label %bb + +; CHECK: bb.nph: +; CHECK: load double* +; CHECK: br label %bb + +bb: + %indvar = phi i64 [ 0, %bb.nph ], [ %tmp6, %bb ] + %tmp6 = add i64 %indvar, 1 + %scevgep = getelementptr double* %G, i64 %tmp6 + %scevgep7 = getelementptr double* %G, i64 %indvar + %2 = load double* %scevgep7, align 8 + %3 = load double* %scevgep, align 8 + %4 = fadd double %2, %3 + store double %4, double* %scevgep7, align 8 + %exitcond = icmp eq i64 %tmp6, %tmp + br i1 %exitcond, label %return, label %bb + +; Should only be one load in the loop. +; CHECK: bb: +; CHECK: load double* +; CHECK-NOT: load double* +; CHECK: br i1 %exitcond + +return: + ret void +} + +;void test6(int N, double *G) { +; int j; +; for (j = 0; j < N - 1; j++) +; G[j+1] = G[j] + G[j+1]; +;} + +define void @test6(i32 %N, double* nocapture %G) nounwind ssp { +; CHECK: @test6 +entry: + %0 = add i32 %N, -1 + %1 = icmp sgt i32 %0, 0 + br i1 %1, label %bb.nph, label %return + +bb.nph: + %tmp = zext i32 %0 to i64 + br label %bb + +; CHECK: bb.nph: +; CHECK: load double* +; CHECK: br label %bb + +bb: + %indvar = phi i64 [ 0, %bb.nph ], [ %tmp6, %bb ] + %tmp6 = add i64 %indvar, 1 + %scevgep = getelementptr double* %G, i64 %tmp6 + %scevgep7 = getelementptr double* %G, i64 %indvar + %2 = load double* %scevgep7, align 8 + %3 = load double* %scevgep, align 8 + %4 = fadd double %2, %3 + store double %4, double* %scevgep, align 8 + %exitcond = icmp eq i64 %tmp6, %tmp + br i1 %exitcond, label %return, label %bb + +; Should only be one load in the loop. +; CHECK: bb: +; CHECK: load double* +; CHECK-NOT: load double* +; CHECK: br i1 %exitcond + +return: + ret void +} + +;void test7(int N, double* G) { +; long j; +; G[1] = 1; +; for (j = 1; j < N - 1; j++) +; G[j+1] = G[j] + G[j+1]; +;} + +; This requires phi translation of the adds. +define void @test7(i32 %N, double* nocapture %G) nounwind ssp { +entry: + %0 = getelementptr inbounds double* %G, i64 1 + store double 1.000000e+00, double* %0, align 8 + %1 = add i32 %N, -1 + %2 = icmp sgt i32 %1, 1 + br i1 %2, label %bb.nph, label %return + +bb.nph: + %tmp = sext i32 %1 to i64 + %tmp7 = add i64 %tmp, -1 + br label %bb + +bb: + %indvar = phi i64 [ 0, %bb.nph ], [ %tmp9, %bb ] + %tmp8 = add i64 %indvar, 2 + %scevgep = getelementptr double* %G, i64 %tmp8 + %tmp9 = add i64 %indvar, 1 + %scevgep10 = getelementptr double* %G, i64 %tmp9 + %3 = load double* %scevgep10, align 8 + %4 = load double* %scevgep, align 8 + %5 = fadd double %3, %4 + store double %5, double* %scevgep, align 8 + %exitcond = icmp eq i64 %tmp9, %tmp7 + br i1 %exitcond, label %return, label %bb + +; Should only be one load in the loop. +; CHECK: bb: +; CHECK: load double* +; CHECK-NOT: load double* +; CHECK: br i1 %exitcond + +return: + ret void +} + +;; Here the loaded address isn't available in 'block2' at all, requiring a new +;; GEP to be inserted into it. +define i32 @test8(i32* %p, i32* %q, i32** %Hack, i1 %C) { +; CHECK: @test8 +block1: + br i1 %C, label %block2, label %block3 + +block2: + br label %block4 +; CHECK: block2: +; CHECK: load i32* +; CHECK: br label %block4 + +block3: + %A = getelementptr i32* %p, i32 1 + store i32 0, i32* %A + br label %block4 + +block4: + %P2 = phi i32* [%p, %block3], [%q, %block2] + %P3 = getelementptr i32* %P2, i32 1 + %PRE = load i32* %P3 + ret i32 %PRE +; CHECK: block4: +; CHECK-NEXT: phi i32 [ +; CHECK-NOT: load +; CHECK: ret i32 +} + +;void test9(int N, double* G) { +; long j; +; for (j = 1; j < N - 1; j++) +; G[j+1] = G[j] + G[j+1]; +;} + +; This requires phi translation of the adds. +define void @test9(i32 %N, double* nocapture %G) nounwind ssp { +entry: + add i32 0, 0 + %1 = add i32 %N, -1 + %2 = icmp sgt i32 %1, 1 + br i1 %2, label %bb.nph, label %return + +bb.nph: + %tmp = sext i32 %1 to i64 + %tmp7 = add i64 %tmp, -1 + br label %bb + +; CHECK: bb.nph: +; CHECK: load double* +; CHECK: br label %bb + +bb: + %indvar = phi i64 [ 0, %bb.nph ], [ %tmp9, %bb ] + %tmp8 = add i64 %indvar, 2 + %scevgep = getelementptr double* %G, i64 %tmp8 + %tmp9 = add i64 %indvar, 1 + %scevgep10 = getelementptr double* %G, i64 %tmp9 + %3 = load double* %scevgep10, align 8 + %4 = load double* %scevgep, align 8 + %5 = fadd double %3, %4 + store double %5, double* %scevgep, align 8 + %exitcond = icmp eq i64 %tmp9, %tmp7 + br i1 %exitcond, label %return, label %bb + +; Should only be one load in the loop. +; CHECK: bb: +; CHECK: load double* +; CHECK-NOT: load double* +; CHECK: br i1 %exitcond + +return: + ret void +} + +;void test10(int N, double* G) { +; long j; +; for (j = 1; j < N - 1; j++) +; G[j] = G[j] + G[j+1] + G[j-1]; +;} + +; PR5501 +define void @test10(i32 %N, double* nocapture %G) nounwind ssp { +entry: + %0 = add i32 %N, -1 + %1 = icmp sgt i32 %0, 1 + br i1 %1, label %bb.nph, label %return + +bb.nph: + %tmp = sext i32 %0 to i64 + %tmp8 = add i64 %tmp, -1 + br label %bb +; CHECK: bb.nph: +; CHECK: load double* +; CHECK: load double* +; CHECK: br label %bb + + +bb: + %indvar = phi i64 [ 0, %bb.nph ], [ %tmp11, %bb ] + %scevgep = getelementptr double* %G, i64 %indvar + %tmp9 = add i64 %indvar, 2 + %scevgep10 = getelementptr double* %G, i64 %tmp9 + %tmp11 = add i64 %indvar, 1 + %scevgep12 = getelementptr double* %G, i64 %tmp11 + %2 = load double* %scevgep12, align 8 + %3 = load double* %scevgep10, align 8 + %4 = fadd double %2, %3 + %5 = load double* %scevgep, align 8 + %6 = fadd double %4, %5 + store double %6, double* %scevgep12, align 8 + %exitcond = icmp eq i64 %tmp11, %tmp8 + br i1 %exitcond, label %return, label %bb + +; Should only be one load in the loop. +; CHECK: bb: +; CHECK: load double* +; CHECK-NOT: load double* +; CHECK: br i1 %exitcond + +return: + ret void +} diff --git a/test/Transforms/GVN/rle-must-alias.ll b/test/Transforms/GVN/rle-must-alias.ll index 79cc3636b11cd..d61eb81b06914 100644 --- a/test/Transforms/GVN/rle-must-alias.ll +++ b/test/Transforms/GVN/rle-must-alias.ll @@ -1,7 +1,6 @@ ; RUN: opt < %s -gvn -S | grep {DEAD = phi i32 } -; XFAIL: * -; FIXME: GVN should eliminate the fully redundant %9 GEP which +; GVN should eliminate the fully redundant %9 GEP which ; allows DEAD to be removed. This is PR3198. ; The %7 and %4 loads combine to make %DEAD unneeded. diff --git a/test/Transforms/GVN/rle-no-phi-translate.ll b/test/Transforms/GVN/rle-no-phi-translate.ll index 57457a7af9f00..96dbf481899cd 100644 --- a/test/Transforms/GVN/rle-no-phi-translate.ll +++ b/test/Transforms/GVN/rle-no-phi-translate.ll @@ -1,4 +1,5 @@ -; RUN: opt < %s -gvn -S | grep load +; RUN: opt < %s -gvn -S | FileCheck %s +; XFAIL: * ; FIXME: This should be promotable, but memdep/gvn don't track values ; path/edge sensitively enough. @@ -20,5 +21,8 @@ bb2: ; preds = %bb1, %bb %c_addr.0 = phi i32* [ %b, %entry ], [ %c, %bb ] ; <i32*> [#uses=1] %cv = load i32* %c_addr.0, align 4 ; <i32> [#uses=1] ret i32 %cv +; CHECK: bb2: +; CHECK-NOT: load i32 +; CHECK: ret i32 } diff --git a/test/Transforms/GVN/rle-phi-translate.ll b/test/Transforms/GVN/rle-phi-translate.ll index 1f1baa98b48b1..912f58064a26a 100644 --- a/test/Transforms/GVN/rle-phi-translate.ll +++ b/test/Transforms/GVN/rle-phi-translate.ll @@ -1,32 +1,114 @@ -; RUN: opt < %s -gvn -S | grep {%cv = phi i32} -; RUN: opt < %s -gvn -S | grep {%bv = phi i32} +; RUN: opt < %s -gvn -S | FileCheck %s + 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:128:128" target triple = "i386-apple-darwin7" -define i32 @g(i32* %b, i32* %c) nounwind { +define i32 @test1(i32* %b, i32* %c) nounwind { +; CHECK: @test1 entry: - %g = alloca i32 ; <i32*> [#uses=4] - %t1 = icmp eq i32* %b, null ; <i1> [#uses=1] + %g = alloca i32 + %t1 = icmp eq i32* %b, null br i1 %t1, label %bb, label %bb1 -bb: ; preds = %entry - %t2 = load i32* %c, align 4 ; <i32> [#uses=1] - %t3 = add i32 %t2, 1 ; <i32> [#uses=1] +bb: + %t2 = load i32* %c, align 4 + %t3 = add i32 %t2, 1 store i32 %t3, i32* %g, align 4 br label %bb2 bb1: ; preds = %entry - %t5 = load i32* %b, align 4 ; <i32> [#uses=1] - %t6 = add i32 %t5, 1 ; <i32> [#uses=1] + %t5 = load i32* %b, align 4 + %t6 = add i32 %t5, 1 store i32 %t6, i32* %g, align 4 br label %bb2 bb2: ; preds = %bb1, %bb - %c_addr.0 = phi i32* [ %g, %bb1 ], [ %c, %bb ] ; <i32*> [#uses=1] - %b_addr.0 = phi i32* [ %b, %bb1 ], [ %g, %bb ] ; <i32*> [#uses=1] - %cv = load i32* %c_addr.0, align 4 ; <i32> [#uses=1] - %bv = load i32* %b_addr.0, align 4 ; <i32> [#uses=1] - %ret = add i32 %cv, %bv ; <i32> [#uses=1] + %c_addr.0 = phi i32* [ %g, %bb1 ], [ %c, %bb ] + %b_addr.0 = phi i32* [ %b, %bb1 ], [ %g, %bb ] + %cv = load i32* %c_addr.0, align 4 + %bv = load i32* %b_addr.0, align 4 +; CHECK: %bv = phi i32 +; CHECK: %cv = phi i32 +; CHECK-NOT: load +; CHECK: ret i32 + %ret = add i32 %cv, %bv ret i32 %ret } +define i8 @test2(i1 %cond, i32* %b, i32* %c) nounwind { +; CHECK: @test2 +entry: + br i1 %cond, label %bb, label %bb1 + +bb: + %b1 = bitcast i32* %b to i8* + store i8 4, i8* %b1 + br label %bb2 + +bb1: + %c1 = bitcast i32* %c to i8* + store i8 92, i8* %c1 + br label %bb2 + +bb2: + %d = phi i32* [ %c, %bb1 ], [ %b, %bb ] + %d1 = bitcast i32* %d to i8* + %dv = load i8* %d1 +; CHECK: %dv = phi i8 [ 92, %bb1 ], [ 4, %bb ] +; CHECK-NOT: load +; CHECK: ret i8 %dv + ret i8 %dv +} + +define i32 @test3(i1 %cond, i32* %b, i32* %c) nounwind { +; CHECK: @test3 +entry: + br i1 %cond, label %bb, label %bb1 + +bb: + %b1 = getelementptr i32* %b, i32 17 + store i32 4, i32* %b1 + br label %bb2 + +bb1: + %c1 = getelementptr i32* %c, i32 7 + store i32 82, i32* %c1 + br label %bb2 + +bb2: + %d = phi i32* [ %c, %bb1 ], [ %b, %bb ] + %i = phi i32 [ 7, %bb1 ], [ 17, %bb ] + %d1 = getelementptr i32* %d, i32 %i + %dv = load i32* %d1 +; CHECK: %dv = phi i32 [ 82, %bb1 ], [ 4, %bb ] +; CHECK-NOT: load +; CHECK: ret i32 %dv + ret i32 %dv +} + +; PR5313 +define i32 @test4(i1 %cond, i32* %b, i32* %c) nounwind { +; CHECK: @test4 +entry: + br i1 %cond, label %bb, label %bb1 + +bb: + store i32 4, i32* %b + br label %bb2 + +bb1: + %c1 = getelementptr i32* %c, i32 7 + store i32 82, i32* %c1 + br label %bb2 + +bb2: + %d = phi i32* [ %c, %bb1 ], [ %b, %bb ] + %i = phi i32 [ 7, %bb1 ], [ 0, %bb ] + %d1 = getelementptr i32* %d, i32 %i + %dv = load i32* %d1 +; CHECK: %dv = phi i32 [ 82, %bb1 ], [ 4, %bb ] +; CHECK-NOT: load +; CHECK: ret i32 %dv + ret i32 %dv +} + diff --git a/test/Transforms/GlobalOpt/constantfold-initializers.ll b/test/Transforms/GlobalOpt/constantfold-initializers.ll new file mode 100644 index 0000000000000..834bd0012e7a8 --- /dev/null +++ b/test/Transforms/GlobalOpt/constantfold-initializers.ll @@ -0,0 +1,8 @@ +; RUN: opt < %s -S -globalopt | FileCheck %s + +target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128" + +@.str91250 = global [3 x i8] zeroinitializer + +; CHECK: @A = global i1 false +@A = global i1 icmp ne (i64 sub nsw (i64 ptrtoint (i8* getelementptr inbounds ([3 x i8]* @.str91250, i64 0, i64 1) to i64), i64 ptrtoint ([3 x i8]* @.str91250 to i64)), i64 1) diff --git a/test/Transforms/IPConstantProp/dangling-block-address.ll b/test/Transforms/IPConstantProp/dangling-block-address.ll new file mode 100644 index 0000000000000..0489dfa796f3f --- /dev/null +++ b/test/Transforms/IPConstantProp/dangling-block-address.ll @@ -0,0 +1,42 @@ +; RUN: opt < %s -internalize -ipsccp -S | FileCheck %s +; PR5569 + +; IPSCCP should prove that the blocks are dead and delete them, and +; properly handle the dangling blockaddress constants. + +; CHECK: @bar.l = internal constant [2 x i8*] [i8* inttoptr (i32 1 to i8*), i8* inttoptr (i32 1 to i8*)] + +@code = global [5 x i32] [i32 0, i32 0, i32 0, i32 0, i32 1], align 4 ; <[5 x i32]*> [#uses=0] +@bar.l = internal constant [2 x i8*] [i8* blockaddress(@bar, %lab0), i8* blockaddress(@bar, %end)] ; <[2 x i8*]*> [#uses=1] + +define void @foo(i32 %x) nounwind readnone { +entry: + %b = alloca i32, align 4 ; <i32*> [#uses=1] + volatile store i32 -1, i32* %b + ret void +} + +define void @bar(i32* nocapture %pc) nounwind readonly { +entry: + br label %indirectgoto + +lab0: ; preds = %indirectgoto + %indvar.next = add i32 %indvar, 1 ; <i32> [#uses=1] + br label %indirectgoto + +end: ; preds = %indirectgoto + ret void + +indirectgoto: ; preds = %lab0, %entry + %indvar = phi i32 [ %indvar.next, %lab0 ], [ 0, %entry ] ; <i32> [#uses=2] + %pc.addr.0 = getelementptr i32* %pc, i32 %indvar ; <i32*> [#uses=1] + %tmp1.pn = load i32* %pc.addr.0 ; <i32> [#uses=1] + %indirect.goto.dest.in = getelementptr inbounds [2 x i8*]* @bar.l, i32 0, i32 %tmp1.pn ; <i8**> [#uses=1] + %indirect.goto.dest = load i8** %indirect.goto.dest.in ; <i8*> [#uses=1] + indirectbr i8* %indirect.goto.dest, [label %lab0, label %end] +} + +define i32 @main() nounwind readnone { +entry: + ret i32 0 +} diff --git a/test/Transforms/IPConstantProp/user-with-multiple-uses.ll b/test/Transforms/IPConstantProp/user-with-multiple-uses.ll new file mode 100644 index 0000000000000..402ea41167ce1 --- /dev/null +++ b/test/Transforms/IPConstantProp/user-with-multiple-uses.ll @@ -0,0 +1,30 @@ +; RUN: opt < %s -S -ipsccp | FileCheck %s +; PR5596 + +; IPSCCP should propagate the 0 argument, eliminate the switch, and propagate +; the result. + +; CHECK: define i32 @main() noreturn nounwind { +; CHECK-NEXT: entry: +; CHECK-NEXT: %call2 = tail call i32 @wwrite(i64 0) nounwind +; CHECK-NEXT: ret i32 123 + +define i32 @main() noreturn nounwind { +entry: + %call2 = tail call i32 @wwrite(i64 0) nounwind + ret i32 %call2 +} + +define internal i32 @wwrite(i64 %i) nounwind readnone { +entry: + switch i64 %i, label %sw.default [ + i64 3, label %return + i64 10, label %return + ] + +sw.default: + ret i32 123 + +return: + ret i32 0 +} diff --git a/test/Transforms/IndMemRem/2009-01-24-Noalias.ll b/test/Transforms/IndMemRem/2009-01-24-Noalias.ll deleted file mode 100644 index b6d98031b7328..0000000000000 --- a/test/Transforms/IndMemRem/2009-01-24-Noalias.ll +++ /dev/null @@ -1,11 +0,0 @@ -; RUN: opt < %s -indmemrem -S | grep bounce | grep noalias - -declare i8* @malloc(i32) - -@g = external global i8* - -define void @test() { - %A = bitcast i8* (i32) * @malloc to i8* - store i8* %A, i8** @g - ret void -} diff --git a/test/Transforms/IndMemRem/dg.exp b/test/Transforms/IndMemRem/dg.exp deleted file mode 100644 index f2005891a59a8..0000000000000 --- a/test/Transforms/IndMemRem/dg.exp +++ /dev/null @@ -1,3 +0,0 @@ -load_lib llvm.exp - -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp}]] diff --git a/test/Transforms/InstCombine/cast-malloc.ll b/test/Transforms/InstCombine/cast-malloc.ll deleted file mode 100644 index 3754032cc2f79..0000000000000 --- a/test/Transforms/InstCombine/cast-malloc.ll +++ /dev/null @@ -1,15 +0,0 @@ -; test that casted mallocs get converted to malloc of the right type -; RUN: opt < %s -instcombine -S | \ -; RUN: not grep bitcast - -; The target datalayout is important for this test case. We have to tell -; instcombine that the ABI alignment for a long is 4-bytes, not 8, otherwise -; it won't do the transform. -target datalayout = "e-i64:32:64" - -define i32* @test(i32 %size) { - %X = malloc i64, i32 %size ; <i64*> [#uses=1] - %ret = bitcast i64* %X to i32* ; <i32*> [#uses=1] - ret i32* %ret -} - diff --git a/test/Transforms/InstCombine/cast.ll b/test/Transforms/InstCombine/cast.ll index e7695b74b75ed..5f75cd0a8930b 100644 --- a/test/Transforms/InstCombine/cast.ll +++ b/test/Transforms/InstCombine/cast.ll @@ -103,7 +103,7 @@ define i32* @test12() { %p = malloc [4 x i8] ; <[4 x i8]*> [#uses=1] %c = bitcast [4 x i8]* %p to i32* ; <i32*> [#uses=1] ret i32* %c -; CHECK: %malloccall = tail call i8* @malloc(i32 ptrtoint ([4 x i8]* getelementptr ([4 x i8]* null, i32 1) to i32)) +; CHECK: %malloccall = tail call i8* @malloc(i32 4) ; CHECK: ret i32* %c } @@ -275,7 +275,7 @@ define void @test32(double** %tmp) { %tmp8.upgrd.1 = bitcast [16 x i8]* %tmp8 to double* ; <double*> [#uses=1] store double* %tmp8.upgrd.1, double** %tmp ret void -; CHECK: %malloccall = tail call i8* @malloc(i32 ptrtoint ([16 x i8]* getelementptr ([16 x i8]* null, i32 1) to i32)) +; CHECK: %malloccall = tail call i8* @malloc(i32 16) ; CHECK: %tmp8.upgrd.1 = bitcast i8* %malloccall to double* ; CHECK: store double* %tmp8.upgrd.1, double** %tmp ; CHECK: ret void diff --git a/test/Transforms/InstCombine/compare-signs.ll b/test/Transforms/InstCombine/compare-signs.ll index 2f98641a2494e..ba638ba36fc0d 100644 --- a/test/Transforms/InstCombine/compare-signs.ll +++ b/test/Transforms/InstCombine/compare-signs.ll @@ -1,5 +1,4 @@ ; RUN: opt %s -instcombine -S | FileCheck %s -; XFAIL: * ; PR5438 ; TODO: This should also optimize down. diff --git a/test/Transforms/InstCombine/crash.ll b/test/Transforms/InstCombine/crash.ll index fbac472e19727..1528f6ddf3c02 100644 --- a/test/Transforms/InstCombine/crash.ll +++ b/test/Transforms/InstCombine/crash.ll @@ -125,3 +125,15 @@ l10: %v11 = select i1 %v5_, i64 0, i64 %v6 ret i64 %v11 } + +; PR5471 +define arm_apcscc i32 @test5a() { + ret i32 0 +} + +define arm_apcscc void @test5() { + store i1 true, i1* undef + %1 = invoke i32 @test5a() to label %exit unwind label %exit +exit: + ret void +} diff --git a/test/Transforms/InstCombine/getelementptr.ll b/test/Transforms/InstCombine/getelementptr.ll index 285e0ba602f42..de325f64021fe 100644 --- a/test/Transforms/InstCombine/getelementptr.ll +++ b/test/Transforms/InstCombine/getelementptr.ll @@ -445,7 +445,7 @@ define i32 @test35() nounwind { i8* getelementptr (%t1* bitcast (%t0* @s to %t1*), i32 0, i32 1, i32 0)) nounwind ret i32 0 ; CHECK: @test35 -; CHECK: call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([17 x i8]* @"\01LC8", i64 0, i64 0), i8* bitcast (i8** getelementptr (%t1* bitcast (%t0* @s to %t1*), i64 1, i32 0) to i8*)) nounwind +; CHECK: call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([17 x i8]* @"\01LC8", i64 0, i64 0), i8* getelementptr inbounds (%t0* @s, i64 0, i32 1, i64 0)) nounwind } ; Instcombine should constant-fold the GEP so that indices that have diff --git a/test/Transforms/InstCombine/intrinsics.ll b/test/Transforms/InstCombine/intrinsics.ll index 7abd38040136f..fda4386e9439e 100644 --- a/test/Transforms/InstCombine/intrinsics.ll +++ b/test/Transforms/InstCombine/intrinsics.ll @@ -1,12 +1,79 @@ ; RUN: opt %s -instcombine -S | FileCheck %s -declare {i8, i1} @llvm.uadd.with.overflow.i8(i8, i8) +%overflow.result = type {i8, i1} + +declare %overflow.result @llvm.uadd.with.overflow.i8(i8, i8) +declare %overflow.result @llvm.umul.with.overflow.i8(i8, i8) define i8 @test1(i8 %A, i8 %B) { - %x = call {i8, i1} @llvm.uadd.with.overflow.i8(i8 %A, i8 %B) - %y = extractvalue {i8, i1} %x, 0 + %x = call %overflow.result @llvm.uadd.with.overflow.i8(i8 %A, i8 %B) + %y = extractvalue %overflow.result %x, 0 ret i8 %y ; CHECK: @test1 ; CHECK-NEXT: %y = add i8 %A, %B ; CHECK-NEXT: ret i8 %y } + +define i8 @test2(i8 %A, i8 %B, i1* %overflowPtr) { + %and.A = and i8 %A, 127 + %and.B = and i8 %B, 127 + %x = call %overflow.result @llvm.uadd.with.overflow.i8(i8 %and.A, i8 %and.B) + %y = extractvalue %overflow.result %x, 0 + %z = extractvalue %overflow.result %x, 1 + store i1 %z, i1* %overflowPtr + ret i8 %y +; CHECK: @test2 +; CHECK-NEXT: %and.A = and i8 %A, 127 +; CHECK-NEXT: %and.B = and i8 %B, 127 +; CHECK-NEXT: %1 = add nuw i8 %and.A, %and.B +; CHECK-NEXT: store i1 false, i1* %overflowPtr +; CHECK-NEXT: ret i8 %1 +} + +define i8 @test3(i8 %A, i8 %B, i1* %overflowPtr) { + %or.A = or i8 %A, -128 + %or.B = or i8 %B, -128 + %x = call %overflow.result @llvm.uadd.with.overflow.i8(i8 %or.A, i8 %or.B) + %y = extractvalue %overflow.result %x, 0 + %z = extractvalue %overflow.result %x, 1 + store i1 %z, i1* %overflowPtr + ret i8 %y +; CHECK: @test3 +; CHECK-NEXT: %or.A = or i8 %A, -128 +; CHECK-NEXT: %or.B = or i8 %B, -128 +; CHECK-NEXT: %1 = add i8 %or.A, %or.B +; CHECK-NEXT: store i1 true, i1* %overflowPtr +; CHECK-NEXT: ret i8 %1 +} + +define i8 @test4(i8 %A, i1* %overflowPtr) { + %x = call %overflow.result @llvm.uadd.with.overflow.i8(i8 undef, i8 %A) + %y = extractvalue %overflow.result %x, 0 + %z = extractvalue %overflow.result %x, 1 + store i1 %z, i1* %overflowPtr + ret i8 %y +; CHECK: @test4 +; CHECK-NEXT: ret i8 undef +} + +define i8 @test5(i8 %A, i1* %overflowPtr) { + %x = call %overflow.result @llvm.umul.with.overflow.i8(i8 0, i8 %A) + %y = extractvalue %overflow.result %x, 0 + %z = extractvalue %overflow.result %x, 1 + store i1 %z, i1* %overflowPtr + ret i8 %y +; CHECK: @test5 +; CHECK-NEXT: store i1 false, i1* %overflowPtr +; CHECK-NEXT: ret i8 0 +} + +define i8 @test6(i8 %A, i1* %overflowPtr) { + %x = call %overflow.result @llvm.umul.with.overflow.i8(i8 1, i8 %A) + %y = extractvalue %overflow.result %x, 0 + %z = extractvalue %overflow.result %x, 1 + store i1 %z, i1* %overflowPtr + ret i8 %y +; CHECK: @test6 +; CHECK-NEXT: store i1 false, i1* %overflowPtr +; CHECK-NEXT: ret i8 %A +} diff --git a/test/Transforms/InstCombine/or.ll b/test/Transforms/InstCombine/or.ll index b72480b4f9d09..4a140815f6206 100644 --- a/test/Transforms/InstCombine/or.ll +++ b/test/Transforms/InstCombine/or.ll @@ -1,7 +1,8 @@ ; This test makes sure that these instructions are properly eliminated. -; ; RUN: opt < %s -instcombine -S | FileCheck %s +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:128:128" + define i32 @test1(i32 %A) { %B = or i32 %A, 0 ret i32 %B @@ -253,3 +254,44 @@ define i1 @test25(i32 %A, i32 %B) { ; CHECK-NEXT: %F = and i1 ; CHECK-NEXT: ret i1 %F } + +; PR5634 +define i1 @test26(i32 %A, i32 %B) { + %C1 = icmp eq i32 %A, 0 + %C2 = icmp eq i32 %B, 0 + ; (A == 0) & (A == 0) --> (A|B) == 0 + %D = and i1 %C1, %C2 + ret i1 %D +; CHECK: @test26 +; CHECK: or i32 %A, %B +; CHECK: icmp eq i32 {{.*}}, 0 +; CHECK: ret i1 +} + +; PR5634 +define i1 @test27(i32* %A, i32* %B) { + %C1 = icmp eq i32* %A, null + %C2 = icmp eq i32* %B, null + ; (A == 0) & (A == 0) --> (A|B) == 0 + %D = and i1 %C1, %C2 + ret i1 %D +; CHECK: @test27 +; CHECK: ptrtoint i32* %A +; CHECK: ptrtoint i32* %B +; CHECK: or i32 +; CHECK: icmp eq i32 {{.*}}, 0 +; CHECK: ret i1 +} + +; PR5634 +define i1 @test28(i32 %A, i32 %B) { + %C1 = icmp ne i32 %A, 0 + %C2 = icmp ne i32 %B, 0 + ; (A != 0) | (A != 0) --> (A|B) != 0 + %D = or i1 %C1, %C2 + ret i1 %D +; CHECK: @test28 +; CHECK: or i32 %A, %B +; CHECK: icmp ne i32 {{.*}}, 0 +; CHECK: ret i1 +} diff --git a/test/Transforms/InstCombine/or2.ll b/test/Transforms/InstCombine/or2.ll deleted file mode 100644 index c01229a78a0dd..0000000000000 --- a/test/Transforms/InstCombine/or2.ll +++ /dev/null @@ -1,12 +0,0 @@ -; This test makes sure that these instructions are properly eliminated. -; -; RUN: opt < %s -instcombine -S | grep -v xor | not grep {or } - -; PR1738 -define i1 @test1(double %X, double %Y) { - %tmp9 = fcmp uno double %X, 0.000000e+00 ; <i1> [#uses=1] - %tmp13 = fcmp uno double %Y, 0.000000e+00 ; <i1> [#uses=1] - %bothcond = or i1 %tmp13, %tmp9 ; <i1> [#uses=1] - ret i1 %bothcond -} - diff --git a/test/Transforms/InstCombine/phi-merge.ll b/test/Transforms/InstCombine/phi-merge.ll deleted file mode 100644 index c41f50325d6f9..0000000000000 --- a/test/Transforms/InstCombine/phi-merge.ll +++ /dev/null @@ -1,31 +0,0 @@ -; RUN: opt < %s -instcombine -S | not grep {phi i32} -; PR1777 - -declare i1 @rrr() - -define i1 @zxcv() { -entry: -%a = alloca i32 -%i = ptrtoint i32* %a to i32 -%b = call i1 @rrr() -br i1 %b, label %one, label %two - -one: -%x = phi i32 [%i, %entry], [%y, %two] -%c = call i1 @rrr() -br i1 %c, label %two, label %end - -two: -%y = phi i32 [%i, %entry], [%x, %one] -%d = call i1 @rrr() -br i1 %d, label %one, label %end - -end: -%f = phi i32 [ %x, %one], [%y, %two] -; Change the %f to %i, and the optimizer suddenly becomes a lot smarter -; even though %f must equal %i at this point -%g = inttoptr i32 %f to i32* -store i32 10, i32* %g -%z = call i1 @rrr() -ret i1 %z -} diff --git a/test/Transforms/InstCombine/shufflevec-constant.ll b/test/Transforms/InstCombine/shufflevec-constant.ll index 2c667903b1ebf..29ae5a79824a0 100644 --- a/test/Transforms/InstCombine/shufflevec-constant.ll +++ b/test/Transforms/InstCombine/shufflevec-constant.ll @@ -1,4 +1,4 @@ -; RUN: opt < %s -instcombine -S | grep "2 x float" +; RUN: opt < %s -instcombine -S | grep {ret <4 x float> <float 0.000000e+00, float 0.000000e+00, float 0x7FF0000000000000, float 0x7FF0000000000000>} 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:128:128" target triple = "i386-apple-darwin9" diff --git a/test/Transforms/InstCombine/store-merge.ll b/test/Transforms/InstCombine/store-merge.ll deleted file mode 100644 index 06d497d10dbf4..0000000000000 --- a/test/Transforms/InstCombine/store-merge.ll +++ /dev/null @@ -1,37 +0,0 @@ -; RUN: opt < %s -instcombine -S | \ -; RUN: grep {ret i32 %.toremerge} | count 2 -;; Simple sinking tests - -; "if then else" -define i32 @test1(i1 %C) { - %A = alloca i32 - br i1 %C, label %Cond, label %Cond2 - -Cond: - store i32 -987654321, i32* %A - br label %Cont - -Cond2: - store i32 47, i32* %A - br label %Cont - -Cont: - %V = load i32* %A - ret i32 %V -} - -; "if then" -define i32 @test2(i1 %C) { - %A = alloca i32 - store i32 47, i32* %A - br i1 %C, label %Cond, label %Cont - -Cond: - store i32 -987654321, i32* %A - br label %Cont - -Cont: - %V = load i32* %A - ret i32 %V -} - diff --git a/test/Transforms/InstCombine/store.ll b/test/Transforms/InstCombine/store.ll index 314441eb86530..64460d7a6d610 100644 --- a/test/Transforms/InstCombine/store.ll +++ b/test/Transforms/InstCombine/store.ll @@ -6,6 +6,7 @@ define void @test1(i32* %P) { store i32 124, i32* null ret void ; CHECK: @test1( +; CHECK-NEXT: store i32 123, i32* undef ; CHECK-NEXT: store i32 undef, i32* null ; CHECK-NEXT: ret void } diff --git a/test/Transforms/JumpThreading/2008-11-28-InfLoop.ll b/test/Transforms/JumpThreading/2008-11-28-InfLoop.ll deleted file mode 100644 index 306b2d5435fc6..0000000000000 --- a/test/Transforms/JumpThreading/2008-11-28-InfLoop.ll +++ /dev/null @@ -1,17 +0,0 @@ -; RUN: opt < %s -jump-threading -S - -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:128:128" -target triple = "i386-apple-darwin9.5" - %struct.decContext = type { i32 } - %struct.decNumber = type { i32, i32 } - -define i32 @decNumberPower(%struct.decNumber* %res, %struct.decNumber* %lhs, %struct.decNumber* %rhs, %struct.decContext* %set) nounwind { -entry: - br i1 true, label %decDivideOp.exit, label %bb7.i - -bb7.i: ; preds = %bb7.i, %entry - br label %bb7.i - -decDivideOp.exit: ; preds = %entry - ret i32 undef -} diff --git a/test/Transforms/JumpThreading/2009-01-08-DeadLoopRepl.ll b/test/Transforms/JumpThreading/2009-01-08-DeadLoopRepl.ll deleted file mode 100644 index 208c8229875ea..0000000000000 --- a/test/Transforms/JumpThreading/2009-01-08-DeadLoopRepl.ll +++ /dev/null @@ -1,49 +0,0 @@ -; RUN: opt < %s -jump-threading | llvm-dis -; PR3298 - -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:128:128" -target triple = "i386-apple-darwin9.6" - -define i32 @func(i32 %p_79, i32 %p_80) nounwind { -entry: - br label %bb7 - -bb1: ; preds = %bb2 - br label %bb2 - -bb2: ; preds = %bb7, %bb1 - %l_82.0 = phi i8 [ 0, %bb1 ], [ %l_82.1, %bb7 ] ; <i8> [#uses=3] - br i1 true, label %bb3, label %bb1 - -bb3: ; preds = %bb2 - %0 = icmp eq i32 %p_80_addr.1, 0 ; <i1> [#uses=1] - br i1 %0, label %bb7, label %bb6 - -bb5: ; preds = %bb6 - %1 = icmp eq i8 %l_82.0, 0 ; <i1> [#uses=1] - br i1 %1, label %bb1.i, label %bb.i - -bb.i: ; preds = %bb5 - br label %safe_div_func_char_s_s.exit - -bb1.i: ; preds = %bb5 - br label %safe_div_func_char_s_s.exit - -safe_div_func_char_s_s.exit: ; preds = %bb1.i, %bb.i - br label %bb6 - -bb6: ; preds = %safe_div_func_char_s_s.exit, %bb3 - %p_80_addr.0 = phi i32 [ %p_80_addr.1, %bb3 ], [ 1, %safe_div_func_char_s_s.exit ] ; <i32> [#uses=2] - %2 = icmp eq i32 %p_80_addr.0, 0 ; <i1> [#uses=1] - br i1 %2, label %bb7, label %bb5 - -bb7: ; preds = %bb6, %bb3, %entry - %l_82.1 = phi i8 [ 1, %entry ], [ %l_82.0, %bb3 ], [ %l_82.0, %bb6 ] ; <i8> [#uses=2] - %p_80_addr.1 = phi i32 [ 0, %entry ], [ %p_80_addr.1, %bb3 ], [ %p_80_addr.0, %bb6 ] ; <i32> [#uses=4] - %3 = icmp eq i32 %p_80_addr.1, 0 ; <i1> [#uses=1] - br i1 %3, label %bb8, label %bb2 - -bb8: ; preds = %bb7 - %4 = sext i8 %l_82.1 to i32 ; <i32> [#uses=0] - ret i32 0 -} diff --git a/test/Transforms/JumpThreading/2009-01-19-InfSwitchLoop.ll b/test/Transforms/JumpThreading/2009-01-19-InfSwitchLoop.ll deleted file mode 100644 index 05a3ef9017dbd..0000000000000 --- a/test/Transforms/JumpThreading/2009-01-19-InfSwitchLoop.ll +++ /dev/null @@ -1,21 +0,0 @@ -; RUN: opt < %s -jump-threading -S -; PR3353 - -define i32 @test(i8 %X) { -entry: - %Y = add i8 %X, 1 - %Z = add i8 %Y, 1 - br label %bb33.i - -bb33.i: ; preds = %bb33.i, %bb32.i - switch i8 %Y, label %bb32.i [ - i8 39, label %bb35.split.i - i8 13, label %bb33.i - ] - -bb35.split.i: - ret i32 5 -bb32.i: - ret i32 1 -} - diff --git a/test/Transforms/JumpThreading/crash.ll b/test/Transforms/JumpThreading/crash.ll index 7e2a2a047d111..b2b9d69e16d2f 100644 --- a/test/Transforms/JumpThreading/crash.ll +++ b/test/Transforms/JumpThreading/crash.ll @@ -192,3 +192,23 @@ bb61: ret void } + +; PR5640 +define fastcc void @test6(i1 %tmp, i1 %tmp1) nounwind ssp { +entry: + br i1 %tmp, label %bb12, label %bb14 + +bb12: + br label %bb14 + +bb14: + %A = phi i1 [ %A, %bb13 ], [ true, %bb12 ], [%tmp1, %entry] + br label %bb13 + +bb13: + br i1 %A, label %bb14, label %bb61 + + +bb61: + ret void +} diff --git a/test/Transforms/LICM/2008-07-22-LoadGlobalConstant.ll b/test/Transforms/LICM/2008-07-22-LoadGlobalConstant.ll index 723440f101e55..10b00bab8fd9a 100644 --- a/test/Transforms/LICM/2008-07-22-LoadGlobalConstant.ll +++ b/test/Transforms/LICM/2008-07-22-LoadGlobalConstant.ll @@ -1,4 +1,4 @@ -; RUN: opt < %s -licm -enable-licm-constant-variables -S | FileCheck %s +; RUN: opt < %s -licm -S | FileCheck %s @a = external constant float* diff --git a/test/Transforms/LoopRotate/indirectbr.ll b/test/Transforms/LoopRotate/indirectbr.ll new file mode 100644 index 0000000000000..9c82aa8834631 --- /dev/null +++ b/test/Transforms/LoopRotate/indirectbr.ll @@ -0,0 +1,43 @@ +; RUN: opt < %s -S -loop-rotate -disable-output -verify-loop-info -verify-dom-info +; PR5502 + +define void @z80_do_opcodes() nounwind { +entry: + br label %while.cond + +while.cond: ; preds = %end_opcode, %entry + br label %while.body + +while.body: ; preds = %while.cond + br label %indirectgoto + +run_opcode: ; preds = %indirectgoto + %tmp276 = load i8* undef ; <i8> [#uses=1] + br label %indirectgoto + +if.else295: ; preds = %divide_late + br label %end_opcode + +end_opcode: ; preds = %indirectgoto, %sw.default42406, %sw.default, %if.else295 + %opcode.2 = phi i8 [ %opcode.0, %indirectgoto ], [ 0, %sw.default42406 ], [ undef, %sw.default ], [ %opcode.0, %if.else295 ] ; <i8> [#uses=0] + switch i32 undef, label %while.cond [ + i32 221, label %sw.bb11691 + i32 253, label %sw.bb30351 + ] + +sw.bb11691: ; preds = %end_opcode + br label %sw.default + +sw.default: ; preds = %sw.bb11691 + br label %end_opcode + +sw.bb30351: ; preds = %end_opcode + br label %sw.default42406 + +sw.default42406: ; preds = %sw.bb30351 + br label %end_opcode + +indirectgoto: ; preds = %run_opcode, %while.body + %opcode.0 = phi i8 [ undef, %while.body ], [ %tmp276, %run_opcode ] ; <i8> [#uses=2] + indirectbr i8* undef, [label %run_opcode, label %if.else295, label %end_opcode] +} diff --git a/test/Transforms/LoopSimplify/indirectbr.ll b/test/Transforms/LoopSimplify/indirectbr.ll index b0238473b681d..2e4549d1e9c0f 100644 --- a/test/Transforms/LoopSimplify/indirectbr.ll +++ b/test/Transforms/LoopSimplify/indirectbr.ll @@ -81,3 +81,20 @@ L1: %y = phi i64 [ %z, %L0 ], [ 1, %entry ] ret i64 %y } + +define void @pr5502() nounwind { +entry: + br label %while.cond + +while.cond: + br i1 undef, label %while.body, label %while.end + +while.body: + indirectbr i8* undef, [label %end_opcode, label %end_opcode] + +end_opcode: + br i1 false, label %end_opcode, label %while.cond + +while.end: + ret void +} diff --git a/test/Transforms/LoopUnroll/shifted-tripcount.ll b/test/Transforms/LoopUnroll/shifted-tripcount.ll new file mode 100644 index 0000000000000..a118a463172e9 --- /dev/null +++ b/test/Transforms/LoopUnroll/shifted-tripcount.ll @@ -0,0 +1,28 @@ +; RUN: opt < %s -loop-unroll -unroll-count=2 -S | FileCheck %s + +; LoopUnroll should unroll this loop into one big basic block. + +; CHECK: for.body: +; CHECK: %i.013 = phi i64 [ 0, %entry ], [ %tmp16.1, %for.body ] +; CHECK: br i1 %exitcond.1, label %for.end, label %for.body + +define void @foo(double* nocapture %p, i64 %n) nounwind { +entry: + %mul10 = shl i64 %n, 1 ; <i64> [#uses=2] + br label %for.body + +for.body: ; preds = %entry, %for.body + %i.013 = phi i64 [ %tmp16, %for.body ], [ 0, %entry ] ; <i64> [#uses=2] + %arrayidx7 = getelementptr double* %p, i64 %i.013 ; <double*> [#uses=2] + %tmp16 = add i64 %i.013, 1 ; <i64> [#uses=3] + %arrayidx = getelementptr double* %p, i64 %tmp16 ; <double*> [#uses=1] + %tmp4 = load double* %arrayidx ; <double> [#uses=1] + %tmp8 = load double* %arrayidx7 ; <double> [#uses=1] + %mul9 = fmul double %tmp8, %tmp4 ; <double> [#uses=1] + store double %mul9, double* %arrayidx7 + %exitcond = icmp eq i64 %tmp16, %mul10 ; <i1> [#uses=1] + br i1 %exitcond, label %for.end, label %for.body + +for.end: ; preds = %for.body, %entry + ret void +} diff --git a/test/Transforms/RaiseAllocations/2004-11-08-FreeUseCrash.ll b/test/Transforms/RaiseAllocations/2004-11-08-FreeUseCrash.ll deleted file mode 100644 index 75e02e84fac97..0000000000000 --- a/test/Transforms/RaiseAllocations/2004-11-08-FreeUseCrash.ll +++ /dev/null @@ -1,10 +0,0 @@ -; RUN: opt < %s -raiseallocs -disable-output - -define void @main() { - %tmp.13 = call i32 (...)* @free( i32 32 ) ; <i32> [#uses=1] - %tmp.14 = inttoptr i32 %tmp.13 to i32* ; <i32*> [#uses=0] - ret void -} - -declare i32 @free(...) - diff --git a/test/Transforms/RaiseAllocations/2007-10-17-InvokeFree.ll b/test/Transforms/RaiseAllocations/2007-10-17-InvokeFree.ll deleted file mode 100644 index 675bb3d829f77..0000000000000 --- a/test/Transforms/RaiseAllocations/2007-10-17-InvokeFree.ll +++ /dev/null @@ -1,17 +0,0 @@ -; RUN: opt < %s -raiseallocs -stats -disable-output |& \ -; RUN: not grep {Number of allocations raised} -define void @foo() { -entry: - %buffer = alloca i16* - %tmp = load i16** %buffer, align 8 - invoke i32(...)* @free(i16* %tmp) - to label %invcont unwind label %unwind -invcont: - br label %finally -unwind: - br label %finally -finally: - ret void -} -declare i32 @free(...) - diff --git a/test/Transforms/RaiseAllocations/FreeCastConstantExpr.ll b/test/Transforms/RaiseAllocations/FreeCastConstantExpr.ll deleted file mode 100644 index 1cf072910a606..0000000000000 --- a/test/Transforms/RaiseAllocations/FreeCastConstantExpr.ll +++ /dev/null @@ -1,11 +0,0 @@ -; This situation can occur due to the funcresolve pass. -; -; RUN: opt < %s -raiseallocs -S | not grep call - -declare void @free(i8*) - -define void @test(i32* %P) { - call void bitcast (void (i8*)* @free to void (i32*)*)( i32* %P ) - ret void -} - diff --git a/test/Transforms/RaiseAllocations/dg.exp b/test/Transforms/RaiseAllocations/dg.exp deleted file mode 100644 index f2005891a59a8..0000000000000 --- a/test/Transforms/RaiseAllocations/dg.exp +++ /dev/null @@ -1,3 +0,0 @@ -load_lib llvm.exp - -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp}]] diff --git a/test/Transforms/SCCP/2008-03-10-sret.ll b/test/Transforms/SCCP/2008-03-10-sret.ll deleted file mode 100644 index 85bcaf4d2db4a..0000000000000 --- a/test/Transforms/SCCP/2008-03-10-sret.ll +++ /dev/null @@ -1,19 +0,0 @@ -; RUN: opt < %s -ipsccp -S > %t -; RUN: grep {ret i32 36} %t -; RUN: grep {%mrv = insertvalue %T undef, i32 18, 0} %t -; RUN: grep {%mrv1 = insertvalue %T %mrv, i32 17, 1} %t -; RUN: grep {ret %T %mrv1} %t - -%T = type {i32,i32} - -define internal {i32, i32} @bar(i32 %A) { - %X = add i32 1, %A - ret i32 %X, i32 %A -} - -define i32 @foo() { - %X = call {i32, i32} @bar(i32 17) - %Y = getresult {i32, i32} %X, 0 - %Z = add i32 %Y, %Y - ret i32 %Z -} diff --git a/test/Transforms/SCCP/basictest.ll b/test/Transforms/SCCP/basictest.ll deleted file mode 100644 index dc0f702bcd968..0000000000000 --- a/test/Transforms/SCCP/basictest.ll +++ /dev/null @@ -1,17 +0,0 @@ -; This is a basic sanity check for constant propogation. The add instruction -; should be eliminated. - -; RUN: opt < %s -sccp -S | not grep add - -define i32 @test(i1 %B) { - br i1 %B, label %BB1, label %BB2 -BB1: ; preds = %0 - %Val = add i32 0, 0 ; <i32> [#uses=1] - br label %BB3 -BB2: ; preds = %0 - br label %BB3 -BB3: ; preds = %BB2, %BB1 - %Ret = phi i32 [ %Val, %BB1 ], [ 1, %BB2 ] ; <i32> [#uses=1] - ret i32 %Ret -} - diff --git a/test/Transforms/SCCP/empty-struct.ll b/test/Transforms/SCCP/empty-struct.ll deleted file mode 100644 index 4e3dc69514e5a..0000000000000 --- a/test/Transforms/SCCP/empty-struct.ll +++ /dev/null @@ -1,20 +0,0 @@ -; RUN: llvm-as < %s > %t.bc -; RUN: llvm-ld %t.bc -o %t.sh -; PR2612 - -@current_foo = internal global { } zeroinitializer - -define i32 @main(...) { -entry: - %retval = alloca i32 ; <i32*> [#uses=2] - store i32 0, i32* %retval - %local_foo = alloca { } ; <{ }*> [#uses=1] - load { }* @current_foo ; <{ }>:0 [#uses=1] - store { } %0, { }* %local_foo - br label %return - -return: ; preds = %entry - load i32* %retval ; <i32>:1 [#uses=1] - ret i32 %1 -} - diff --git a/test/Transforms/SCCP/ipsccp-conditional.ll b/test/Transforms/SCCP/ipsccp-conditional.ll deleted file mode 100644 index 07a427ea91f1d..0000000000000 --- a/test/Transforms/SCCP/ipsccp-conditional.ll +++ /dev/null @@ -1,19 +0,0 @@ -; RUN: opt < %s -ipsccp -S | \ -; RUN: grep -v {ret i32 0} | grep -v {ret i32 undef} | not grep ret - -define internal i32 @bar(i32 %A) { - %C = icmp eq i32 %A, 0 ; <i1> [#uses=1] - br i1 %C, label %T, label %F -T: ; preds = %0 - %B = call i32 @bar( i32 0 ) ; <i32> [#uses=0] - ret i32 0 -F: ; preds = %0 - %C.upgrd.1 = call i32 @bar( i32 1 ) ; <i32> [#uses=1] - ret i32 %C.upgrd.1 -} - -define i32 @foo() { - %X = call i32 @bar( i32 0 ) ; <i32> [#uses=1] - ret i32 %X -} - diff --git a/test/Transforms/SCCP/ipsccp-gvar.ll b/test/Transforms/SCCP/ipsccp-gvar.ll deleted file mode 100644 index ecbd959695213..0000000000000 --- a/test/Transforms/SCCP/ipsccp-gvar.ll +++ /dev/null @@ -1,22 +0,0 @@ -; RUN: opt < %s -ipsccp -S | not grep global - -@G = internal global i32 undef ; <i32*> [#uses=5] - -define void @foo() { - %X = load i32* @G ; <i32> [#uses=1] - store i32 %X, i32* @G - ret void -} - -define i32 @bar() { - %V = load i32* @G ; <i32> [#uses=2] - %C = icmp eq i32 %V, 17 ; <i1> [#uses=1] - br i1 %C, label %T, label %F -T: ; preds = %0 - store i32 17, i32* @G - ret i32 %V -F: ; preds = %0 - store i32 123, i32* @G - ret i32 0 -} - diff --git a/test/Transforms/ScalarRepl/badarray.ll b/test/Transforms/ScalarRepl/badarray.ll index 909966f19038c..3ec3c01b2836e 100644 --- a/test/Transforms/ScalarRepl/badarray.ll +++ b/test/Transforms/ScalarRepl/badarray.ll @@ -1,9 +1,15 @@ -; RUN: opt < %s -scalarrepl -instcombine -S | not grep alloca -; PR3466 +; RUN: opt < %s -scalarrepl -S | FileCheck %s + +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-n8:16:32" +target triple = "i386-pc-linux-gnu" + -define i32 @test() { - %X = alloca [4 x i32] ; <[4 x i32]*> [#uses=1] - ; Off end of array! +; PR3466 +; Off end of array, don't transform. +define i32 @test1() { +; CHECK: @test1 +; CHECK-NOT: = alloca + %X = alloca [4 x i32] %Y = getelementptr [4 x i32]* %X, i64 0, i64 6 ; <i32*> [#uses=2] store i32 0, i32* %Y %Z = load i32* %Y ; <i32> [#uses=1] @@ -11,10 +17,41 @@ define i32 @test() { } +; Off end of array, don't transform. define i32 @test2() nounwind { entry: +; CHECK: @test2 +; CHECK-NOT: = alloca %yx2.i = alloca float, align 4 ; <float*> [#uses=1] %yx26.i = bitcast float* %yx2.i to i64* ; <i64*> [#uses=1] %0 = load i64* %yx26.i, align 8 ; <i64> [#uses=0] unreachable } + +%base = type { i32, [0 x i8] } +%padded = type { %base, [1 x i32] } + +; PR5436 +define void @test3() { +entry: +; CHECK: @test3 +; CHECK-NOT: = alloca +; CHECK: store i64 + %var_1 = alloca %padded, align 8 ; <%padded*> [#uses=3] + %0 = getelementptr inbounds %padded* %var_1, i32 0, i32 0 ; <%base*> [#uses=2] + + %p2 = getelementptr inbounds %base* %0, i32 0, i32 1, i32 0 ; <i8*> [#uses=1] + store i8 72, i8* %p2, align 1 + + ; 72 -> a[0]. + + %callret = call %padded *@test3f() ; <i32> [#uses=2] + %callretcast = bitcast %padded* %callret to i8* ; <i8*> [#uses=1] + %var_11 = bitcast %padded* %var_1 to i8* ; <i8*> [#uses=1] + call void @llvm.memcpy.i32(i8* %callretcast, i8* %var_11, i32 8, i32 4) + ret void +} + +declare void @llvm.memcpy.i32(i8* nocapture, i8* nocapture, i32, i32) nounwind + +declare %padded* @test3f() |