33 lines · plain
1; RUN: llc < %s2 3;; Date: May 28, 2003.4;; From: test/Programs/SingleSource/richards_benchmark.c5;; Function: struct task *handlerfn(struct packet *pkt)6;;7;; Error: PreSelection puts the arguments of the Phi just before8;; the Phi instead of in predecessor blocks. This later9;; causes llc to produces an invalid register <NULL VALUE>10;; for the phi arguments.11 12 %struct..packet = type { ptr, i32, i32, i32, [4 x i8] }13 %struct..task = type { ptr, i32, i32, ptr, i32, ptr, i32, i32 }14@v1 = external global i32 ; <ptr> [#uses=1]15@v2 = external global i32 ; <ptr> [#uses=1]16 17define ptr @handlerfn(ptr %pkt.2) {18entry:19 %tmp.1 = icmp ne ptr %pkt.2, null ; <i1> [#uses=1]20 br i1 %tmp.1, label %cond_false, label %cond_continue21 22cond_false: ; preds = %entry23 br label %cond_continue24 25cond_continue: ; preds = %cond_false, %entry26 %mem_tmp.0 = phi ptr [ @v2, %cond_false ], [ @v1, %entry ] ; <ptr> [#uses=1]27 call void @append( ptr %pkt.2, ptr %mem_tmp.0 )28 ret ptr null29}30 31declare void @append(ptr, ptr)32 33