brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · 3587ecb Raw
26 lines · plain
1;; Test reserving argument registers.2; RUN: not llc < %s -mtriple=sparc-linux-gnu -mattr=+reserve-o0 2>&1 | FileCheck %s --check-prefixes=CHECK-RESERVED-O03; RUN: not llc < %s -mtriple=sparc64-linux-gnu -mattr=+reserve-o0 2>&1 | FileCheck %s --check-prefixes=CHECK-RESERVED-O04; RUN: not llc < %s -mtriple=sparc-linux-gnu -mattr=+reserve-i0 2>&1 | FileCheck %s --check-prefixes=CHECK-RESERVED-I05; RUN: not llc < %s -mtriple=sparc64-linux-gnu -mattr=+reserve-i0 2>&1 | FileCheck %s --check-prefixes=CHECK-RESERVED-I06 7; CHECK-RESERVED-O0: error:8; CHECK-RESERVED-O0-SAME: SPARC doesn't support function calls if any of the argument registers is reserved.9; CHECK-RESERVED-I0: error:10; CHECK-RESERVED-I0-SAME: SPARC doesn't support function calls if any of the argument registers is reserved.11define void @call_function() {12  call void @foo()13  ret void14}15declare void @foo()16 17; CHECK-RESERVED-O0: error:18; CHECK-RESERVED-O0-SAME: SPARC doesn't support function calls if any of the argument registers is reserved.19; CHECK-RESERVED-I0: error:20; CHECK-RESERVED-I0-SAME: SPARC doesn't support function calls if any of the argument registers is reserved.21define void @call_function_with_arg(i8 %in) {22  call void @bar(i8 %in)23  ret void24}25declare void @bar(i8)26