1 ; RUN: llc < %s -mtriple=armv7-apple-darwin | FileCheck %s
2 ; PHI elimination shouldn't break backedge.
5 %struct.list_data_s = type { i16, i16 }
6 %struct.list_head = type { %struct.list_head*, %struct.list_data_s* }
8 define arm_apcscc %struct.list_head* @t(%struct.list_head* %list) nounwind {
10 %0 = icmp eq %struct.list_head* %list, null
11 br i1 %0, label %bb2, label %bb
18 %list_addr.05 = phi %struct.list_head* [ %2, %bb ], [ %list, %entry ]
19 %next.04 = phi %struct.list_head* [ %list_addr.05, %bb ], [ null, %entry ]
20 %1 = getelementptr inbounds %struct.list_head* %list_addr.05, i32 0, i32 0
21 %2 = load %struct.list_head** %1, align 4
22 store %struct.list_head* %next.04, %struct.list_head** %1, align 4
23 %3 = icmp eq %struct.list_head* %2, null
24 br i1 %3, label %bb2, label %bb
27 %next.0.lcssa = phi %struct.list_head* [ null, %entry ], [ %list_addr.05, %bb ]
28 ret %struct.list_head* %next.0.lcssa