brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · 67f4ec4 Raw
43 lines · plain
1; RUN: llc -mtriple=hexagon < %s | FileCheck %s2 3target datalayout = "e-m:e-p:32:32:32-a:0-n16:32-i64:64:64-i32:32:32-i16:16:16-i1:8:8-f32:32:32-f64:64:64-v32:32:32-v64:64:64-v512:512:512-v1024:1024:1024-v2048:2048:2048"4target triple = "hexagon"5 6; Generate the inline restore for single register pair for functions7; with "optsize" attribute.8 9; CHECK-LABEL:    fred_os10; CHECK-DAG:      memd{{.*}} = r17:1611; CHECK-DAG:      r17:16 = memd{{.*}}12; CHECK-DAG:      deallocframe13; CHECK-NOT:  call __restore14 15define i32 @fred_os(i32 %x) #0 {16entry:17  %call = tail call i32 @foo(i32 %x) #218  %call1 = tail call i32 @bar(i32 %x, i32 %call) #219  ret i32 %call120}21 22; Generate the restoring call for single register pair for functions23; with "minsize" attribute.24 25; CHECK-LABEL:    fred_oz26; CHECK-DAG:      memd{{.*}} = r17:1627; CHECK-NOT:  r17:16 = memd{{.*}}28; CHECK-DAG:      call __restore29 30define i32 @fred_oz(i32 %x) #1 {31entry:32  %call = tail call i32 @foo(i32 %x) #233  %call1 = tail call i32 @bar(i32 %x, i32 %call) #234  ret i32 %call135}36 37declare i32 @foo(i32) #238declare i32 @bar(i32, i32) #239 40attributes #0 = { nounwind optsize "disable-tail-calls"="false" }41attributes #1 = { nounwind minsize "disable-tail-calls"="false" }42attributes #2 = { nounwind optsize }43