diff options
author | Quentin Colombet <qcolombet@apple.com> | 2013-11-08 18:14:17 +0000 |
---|---|---|
committer | Quentin Colombet <qcolombet@apple.com> | 2013-11-08 18:14:17 +0000 |
commit | f0c6ab6f00861fd97ad593cfc6d841082e4b4bd1 (patch) | |
tree | a4b17ccfe921f6276a7c3a1b7e5952eb5fc667c7 /test/CodeGen/ARM | |
parent | 071a4f1a661d5469b67a64bea90887d8fd229a8f (diff) | |
download | external_llvm-f0c6ab6f00861fd97ad593cfc6d841082e4b4bd1.zip external_llvm-f0c6ab6f00861fd97ad593cfc6d841082e4b4bd1.tar.gz external_llvm-f0c6ab6f00861fd97ad593cfc6d841082e4b4bd1.tar.bz2 |
[VirtRegMap] Fix for PR17825. Do not ignore noreturn definitions when setting
isPhysRegUsed if the unwind information is required.
Indeed, the runtime may need a correct stack to be able to unwind the call.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194271 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/ARM')
-rw-r--r-- | test/CodeGen/ARM/noreturn.ll | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/test/CodeGen/ARM/noreturn.ll b/test/CodeGen/ARM/noreturn.ll index 3a5c39e..4c876ce 100644 --- a/test/CodeGen/ARM/noreturn.ll +++ b/test/CodeGen/ARM/noreturn.ll @@ -2,8 +2,7 @@ ; Test case from PR16882. target triple = "thumbv7s-apple-ios" -; Function Attrs: noreturn -define i32 @test1() #0 { +define i32 @test1() { ; CHECK-LABEL: @test1 ; CHECK-NOT: push entry: @@ -11,7 +10,7 @@ entry: unreachable } -; Function Attrs: noreturn +; Function Attrs: noreturn nounwind declare void @overflow() #0 define i32 @test2(i32 %x, i32 %y) { @@ -35,4 +34,17 @@ if.end: ; preds = %entry ret i32 %conv2 } -attributes #0 = { noreturn } +; Test case for PR17825. +define i32 @test3() { +; CHECK-LABEL: @test3 +; CHECK: push +entry: + tail call void @overflow_with_unwind() #1 + unreachable +} + +; Function Attrs: noreturn +declare void @overflow_with_unwind() #1 + +attributes #0 = { noreturn nounwind } +attributes #1 = { noreturn } |