1 ; RUN: llc -mtriple arm-eabi -mcpu swift -verify-machineinstrs %s -o /dev/null
3 declare i32 @f(i32 %p0, i32 %p1)
5 define i32 @foo(i32* %ptr) {
7 %cmp = icmp ne i32* %ptr, null
8 br i1 %cmp, label %if.then, label %if.else
10 ; present something which can be easily if-converted
12 ; %R0 should be killed here
13 %valt = load i32, i32* %ptr, align 4
17 ; %R0 should be killed here, however after if-conversion the %R0 kill
18 ; has to be removed because if.then will follow after this and still
20 %addr = getelementptr inbounds i32, i32* %ptr, i32 4
21 %vale = load i32, i32* %addr, align 4
25 %phival = phi i32 [ %valt, %if.then ], [ %vale, %if.else ]
26 ; suggest to bring %phival/%valt/%vale into %R1 (because otherwise there
27 ; will be no kills in if.then/if.else)
28 %retval = call i32 @f (i32 0, i32 %phival)