38 lines · plain
1; RUN: llc -mtriple=hexagon < %s | FileCheck %s2; Check that "r0 = rN" is packetized together with dealloc_return.3; CHECK: r0 = r4; CHECK-NOT: {5; CHECK: dealloc_return6 7target triple = "hexagon-unknown--elf"8 9; Function Attrs: nounwind10define ptr @fred(ptr %user_context, i32 %x) #0 {11entry:12 %and14 = add i32 %x, 25513 %add1 = and i32 %and14, -12814 %call = tail call ptr @malloc(i32 %add1) #115 %cmp = icmp eq ptr %call, null16 br i1 %cmp, label %cleanup, label %if.end17 18if.end: ; preds = %entry19 %0 = ptrtoint ptr %call to i3220 %sub4 = add i32 %0, 13121 %and5 = and i32 %sub4, -12822 %1 = inttoptr i32 %and5 to ptr23 %2 = inttoptr i32 %and5 to ptr24 %arrayidx = getelementptr inbounds ptr, ptr %2, i32 -125 store ptr %call, ptr %arrayidx, align 426 br label %cleanup27 28cleanup: ; preds = %if.end, %entry29 %retval.0 = phi ptr [ %1, %if.end ], [ null, %entry ]30 ret ptr %retval.031}32 33; Function Attrs: nounwind34declare noalias ptr @malloc(i32) local_unnamed_addr #135 36attributes #0 = { nounwind }37attributes #1 = { nobuiltin nounwind }38