44 lines · plain
1; RUN: llc -mtriple=hexagon < %s | FileCheck %s2; Check that all the offsets in the .cfi_offset instructions are negative.3; They are all based on R30+8 which points to the pair FP/LR stored by an4; allocframe. Since the stack grows towards negative addresses, anything5; in the current stack frame will have a negative offset with respect to6; R30+8.7 8; CHECK: cfi_def_cfa r309; CHECK-NOT: .cfi_offset r{{[0-9]+}}, {{[^-]}}10 11target triple = "hexagon"12 13define i64 @_Z3fooxxx(i64 %x, i64 %y, i64 %z) #0 personality ptr @__gxx_personality_v0 {14entry:15 %call = invoke i64 @_Z3barxxx(i64 %x, i64 %y, i64 %z)16 to label %try.cont unwind label %lpad17 18lpad: ; preds = %entry19 %0 = landingpad { ptr, i32 }20 catch ptr null21 %1 = extractvalue { ptr, i32 } %0, 022 %2 = tail call ptr @__cxa_begin_catch(ptr %1) #123 tail call void @__cxa_end_catch()24 br label %try.cont25 26try.cont: ; preds = %entry, %lpad27 %a.0 = phi i64 [ 0, %lpad ], [ %call, %entry ]28 %mul = mul nsw i64 %y, %x29 %sub = sub i64 %mul, %z30 %add = add nsw i64 %sub, %a.031 ret i64 %add32}33 34declare i64 @_Z3barxxx(i64, i64, i64) #035 36declare i32 @__gxx_personality_v0(...)37 38declare ptr @__cxa_begin_catch(ptr)39 40declare void @__cxa_end_catch()41 42attributes #0 = { "disable-tail-calls"="false" "less-precise-fpmad"="false" "frame-pointer"="all" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="hexagonv60" "target-features"="-hvx" "unsafe-fp-math"="false" "use-soft-float"="false" }43attributes #1 = { nounwind }44