brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.1 KiB · f10adca Raw
40 lines · plain
1; RUN: llc < %s -mtriple=i386-apple-darwin | FileCheck %s2 3; CodeGen should align the top of the loop, which differs from the loop4; header in this case.5 6; CHECK: jmp LBB0_27; CHECK: .p2align8; CHECK: LBB0_1:9 10@A = common global [100 x i32] zeroinitializer, align 32		; <ptr> [#uses=1]11 12define ptr @test(ptr %Q, ptr %L) nounwind {13entry:14	%tmp = tail call i32 (...) @foo() nounwind		; <i32> [#uses=2]15	%tmp1 = inttoptr i32 %tmp to ptr		; <ptr> [#uses=1]16	br label %bb117 18bb:		; preds = %bb1, %bb119	%indvar.next = add i32 %P.0.rec, 1		; <i32> [#uses=1]20	br label %bb121 22bb1:		; preds = %bb, %entry23	%P.0.rec = phi i32 [ 0, %entry ], [ %indvar.next, %bb ]		; <i32> [#uses=2]24	%P.0 = getelementptr i8, ptr %tmp1, i32 %P.0.rec		; <ptr> [#uses=3]25	%tmp2 = load i8, ptr %P.0, align 1		; <i8> [#uses=1]26	switch i8 %tmp2, label %bb4 [27		i8 12, label %bb28		i8 42, label %bb29	]30 31bb4:		; preds = %bb132	%tmp3 = ptrtoint ptr %P.0 to i32		; <i32> [#uses=1]33	%tmp4 = sub i32 %tmp3, %tmp		; <i32> [#uses=1]34	%tmp5 = getelementptr [100 x i32], ptr @A, i32 0, i32 %tmp4		; <ptr> [#uses=1]35	store i32 4, ptr %tmp5, align 436	ret ptr %P.037}38 39declare i32 @foo(...)40