Replace test with a simpler hand crafted one.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84069 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Evan Cheng 2009-10-14 01:45:10 +00:00
parent 2b19d69553
commit 2c4f28255b

View File

@ -1,86 +1,29 @@
; RUN: opt < %s -basicaa -licm -S | FileCheck %s
; RUN: opt < %s -basicaa -aa-eval -print-all-alias-modref-info -disable-output |& grep {NoAlias:.*%P,.*@Z}
; rdar://7282591
%struct.CFRuntimeBase = type { i32, [4 x i8] }
%struct.XXXAffineTransform = type { float, float, float, float, float, float }
%struct.XXXContext = type { %struct.CFRuntimeBase, i32, i32, i32, i8*, %struct.XXXContextDelegate*, void (%struct.XXXContext*)*, void (%struct.XXXContext*)*, %struct.XXXImage* (%struct.XXXContext*, %struct.XXXRect*, %struct.XXXImage*, i8*)*, i8*, %struct.__CFDictionary*, i32, %struct.XXXGState*, %struct.XXXGStack*, %struct.XXXRenderingState*, %struct.XXXAffineTransform, %struct.XXXPath*, %struct.__CFDictionary*, %struct.XXXPixelAccess* }
%struct.XXXContextDelegate = type opaque
%struct.XXXGStack = type opaque
%struct.XXXGState = type opaque
%struct.XXXImage = type opaque
%struct.XXXPath = type opaque
%struct.XXXPixelAccess = type opaque
%struct.XXXPoint = type { float, float }
%struct.XXXRect = type { %struct.XXXPoint, %struct.XXXPoint }
%struct.XXXRenderingState = type opaque
%struct.__CFDictionary = type opaque
@X = common global i32 0
@Y = common global i32 0
@Z = common global i32 0
define void @t(%struct.XXXContext* %context, i16* %glyphs, %struct.XXXPoint* %advances, i32 %count) nounwind optsize ssp {
; CHECK: @t
; CHECK: bb21.preheader:
; CHECK: %tmp28 = getelementptr
; CHECK: %tmp28.promoted = load
define void @foo(i32 %cond) nounwind ssp {
entry:
br i1 undef, label %bb1, label %bb
%"alloca point" = bitcast i32 0 to i32
%tmp = icmp ne i32 %cond, 0
br i1 %tmp, label %bb, label %bb1
bb: ; preds = %entry
br i1 undef, label %bb2, label %bb1
bb:
br label %bb2
bb1: ; preds = %bb, %entry
ret void
bb1:
br label %bb2
bb2: ; preds = %bb
br i1 undef, label %bb35, label %bb7
bb2:
%P = phi i32* [ @X, %bb ], [ @Y, %bb1 ]
%tmp1 = load i32* @Z, align 4
store i32 123, i32* %P, align 4
%tmp2 = load i32* @Z, align 4
br label %return
bb7: ; preds = %bb2
br i1 undef, label %bb35, label %bb10
bb10: ; preds = %bb7
%tmp18 = alloca i8, i32 undef, align 1 ; <i8*> [#uses=1]
br i1 undef, label %bb35, label %bb15
bb15: ; preds = %bb10
br i1 undef, label %bb17, label %bb16
bb16: ; preds = %bb15
%tmp21 = bitcast i8* %tmp18 to %struct.XXXPoint* ; <%struct.XXXPoint*> [#uses=1]
br label %bb18
bb17: ; preds = %bb15
%tmp22 = malloc %struct.XXXPoint, i32 %count ; <%struct.XXXPoint*> [#uses=1]
br label %bb18
bb18: ; preds = %bb17, %bb16
%positions.0 = phi %struct.XXXPoint* [ %tmp21, %bb16 ], [ %tmp22, %bb17 ] ; <%struct.XXXPoint*> [#uses=1]
br i1 undef, label %bb35, label %bb20
bb20: ; preds = %bb18
br i1 undef, label %bb21, label %bb25
bb21: ; preds = %bb21, %bb20
%tmp28 = getelementptr inbounds %struct.XXXPoint* %positions.0, i32 undef, i32 0 ; <float*> [#uses=1]
store float undef, float* %tmp28, align 4
%elt22 = getelementptr inbounds %struct.XXXPoint* %advances, i32 undef, i32 1 ; <float*> [#uses=1]
%val23 = load float* %elt22 ; <float> [#uses=0]
br i1 undef, label %bb21, label %bb25
bb25: ; preds = %bb21, %bb20
switch i32 undef, label %bb26 [
i32 4, label %bb27
i32 5, label %bb27
i32 6, label %bb27
i32 7, label %bb28
]
bb26: ; preds = %bb25
unreachable
bb27: ; preds = %bb25, %bb25, %bb25
unreachable
bb28: ; preds = %bb25
unreachable
bb35: ; preds = %bb18, %bb10, %bb7, %bb2
return:
ret void
}