1 ; RUN: llc -march=hexagon < %s | FileCheck %s
2 ; Check that "r0 = rN" is packetized together with dealloc_return.
5 ; CHECK: dealloc_return
7 target triple = "hexagon-unknown--elf"
9 ; Function Attrs: nounwind
10 define ptr @fred(ptr %user_context, i32 %x) #0 {
12 %and14 = add i32 %x, 255
13 %add1 = and i32 %and14, -128
14 %call = tail call ptr @malloc(i32 %add1) #1
15 %cmp = icmp eq ptr %call, null
16 br i1 %cmp, label %cleanup, label %if.end
18 if.end: ; preds = %entry
19 %0 = ptrtoint ptr %call to i32
20 %sub4 = add i32 %0, 131
21 %and5 = and i32 %sub4, -128
22 %1 = inttoptr i32 %and5 to ptr
23 %2 = inttoptr i32 %and5 to ptr
24 %arrayidx = getelementptr inbounds ptr, ptr %2, i32 -1
25 store ptr %call, ptr %arrayidx, align 4
28 cleanup: ; preds = %if.end, %entry
29 %retval.0 = phi ptr [ %1, %if.end ], [ null, %entry ]
33 ; Function Attrs: nounwind
34 declare noalias ptr @malloc(i32) local_unnamed_addr #1
36 attributes #0 = { nounwind }
37 attributes #1 = { nobuiltin nounwind }