diff options
author | Arnold Schwaighofer <arnolds@codeaurora.org> | 2012-08-13 19:54:01 +0000 |
---|---|---|
committer | Arnold Schwaighofer <arnolds@codeaurora.org> | 2012-08-13 19:54:01 +0000 |
commit | d252aa43c91027f3f6234c06c7a05c498d73a954 (patch) | |
tree | 32a25a5e590f7d973e23fff26f400376a385a2e6 /test | |
parent | 2e018f1cf6c056c05b212eb6a69cf0c852329fb9 (diff) | |
download | external_llvm-d252aa43c91027f3f6234c06c7a05c498d73a954.zip external_llvm-d252aa43c91027f3f6234c06c7a05c498d73a954.tar.gz external_llvm-d252aa43c91027f3f6234c06c7a05c498d73a954.tar.bz2 |
[Hexagon] Don't mark callee saved registers as clobbered by a tail call
This was causing unnecessary spills/restores of callee saved registers.
Fixes PR13572.
Patch by Pranav Bhandarkar!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161778 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/CodeGen/Hexagon/simpletailcall.ll | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/CodeGen/Hexagon/simpletailcall.ll b/test/CodeGen/Hexagon/simpletailcall.ll new file mode 100644 index 0000000..2876404 --- /dev/null +++ b/test/CodeGen/Hexagon/simpletailcall.ll @@ -0,0 +1,14 @@ +; RUN: llc -march=hexagon -mcpu=hexagonv4 < %s | FileCheck %s +; CHECK: foo_empty +; CHECK-NOT: allocframe +; CHECK-NOT: memd(r29 +; CHECK: jump bar_empty + +define void @foo_empty(i32 %h) nounwind { +entry: + %add = add nsw i32 %h, 3 + %call = tail call i32 bitcast (i32 (...)* @bar_empty to i32 (i32)*)(i32 %add) nounwind + ret void +} + +declare i32 @bar_empty(...) |