summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/Inline/2007-04-15-InlineEH.ll
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2016-12-27 02:47:37 +0000
committerChandler Carruth <chandlerc@gmail.com>2016-12-27 02:47:37 +0000
commit62c8b81ea83e3abb53020a7803c3483d431d3af0 (patch)
treeef00515fcf248a61f836c4023cfb0f793f75b57b /llvm/test/Transforms/Inline/2007-04-15-InlineEH.ll
parenta5ad5919187750d649e9cfa8791334a8b3e89f47 (diff)
downloadbcm5719-llvm-62c8b81ea83e3abb53020a7803c3483d431d3af0.tar.gz
bcm5719-llvm-62c8b81ea83e3abb53020a7803c3483d431d3af0.zip
[Inliner] Modernize all of the inliner tests that were using grep.
This mostly involved converting from grep to FileCheck and tidying up the IR used. In one case (invoke_test-3.ll) the test had become completely pointless as we use 'resume' rather than 'unwind' now, and even then it did not occur at the end of the line. llvm-svn: 290570
Diffstat (limited to 'llvm/test/Transforms/Inline/2007-04-15-InlineEH.ll')
-rw-r--r--llvm/test/Transforms/Inline/2007-04-15-InlineEH.ll87
1 files changed, 51 insertions, 36 deletions
diff --git a/llvm/test/Transforms/Inline/2007-04-15-InlineEH.ll b/llvm/test/Transforms/Inline/2007-04-15-InlineEH.ll
index d8f94c8f005..55555f03fd6 100644
--- a/llvm/test/Transforms/Inline/2007-04-15-InlineEH.ll
+++ b/llvm/test/Transforms/Inline/2007-04-15-InlineEH.ll
@@ -1,53 +1,68 @@
-; RUN: opt < %s -inline -S | not grep "invoke void asm"
+; RUN: opt < %s -inline -S | FileCheck %s
; PR1335
-target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64"
target triple = "i686-pc-linux-gnu"
- %struct.gnat__strings__string_access = type { i8*, %struct.string___XUB* }
- %struct.string___XUB = type { i32, i32 }
-define void @bc__support__high_resolution_time__clock() {
-entry:
- call void asm "rdtsc\0A\09movl %eax, $0\0A\09movl %edx, $1", "=*imr,=*imr,~{dirflag},~{fpsr},~{flags},~{dx},~{ax}"( i32* null, i32* null ) nounwind
- unreachable
-}
+declare i32 @__gxx_personality_v0(...)
-define fastcc void @bc__support__high_resolution_time__initialize_clock_rate() personality i32 (...)* @__gxx_personality_v0 {
-entry:
- invoke void @gnat__os_lib__getenv( %struct.gnat__strings__string_access* null )
- to label %invcont unwind label %cleanup144
+declare void @a()
-invcont: ; preds = %entry
- invoke void @ada__calendar__delays__delay_for( )
- to label %invcont64 unwind label %cleanup144
+declare void @b()
-invcont64: ; preds = %invcont
- invoke void @ada__calendar__clock( )
- to label %invcont65 unwind label %cleanup144
+declare void @c()
-invcont65: ; preds = %invcont64
- invoke void @bc__support__high_resolution_time__clock( )
- to label %invcont67 unwind label %cleanup144
+define void @f() {
+; CHECK-LABEL: define void @f()
+entry:
+ call void asm "rdtsc\0A\09movl %eax, $0\0A\09movl %edx, $1", "=*imr,=*imr,~{dirflag},~{fpsr},~{flags},~{dx},~{ax}"( i32* null, i32* null ) nounwind
+; CHECK: call void asm
+ unreachable
+}
-invcont67: ; preds = %invcont65
- ret void
+define void @g() personality i32 (...)* @__gxx_personality_v0 {
+; CHECK-LABEL: define void @g() personality i32 (...)* @__gxx_personality_v0
+entry:
+ invoke void @a() to label %invcont1 unwind label %cleanup
+; CHECK-NOT: {{call|invoke}}
+; CHECK: invoke void @a()
-cleanup144: ; preds = %invcont65, %invcont64, %invcont, %entry
- %exn = landingpad {i8*, i32}
- cleanup
- resume { i8*, i32 } %exn
-}
+invcont1:
+ invoke void @b() to label %invcont2 unwind label %cleanup
+; CHECK-NOT: {{call|invoke}}
+; CHECK: invoke void @b()
-declare i32 @__gxx_personality_v0(...)
+invcont2:
+ invoke void @c() to label %invcont3 unwind label %cleanup
+; CHECK-NOT: {{call|invoke}}
+; CHECK: invoke void @c()
-declare void @gnat__os_lib__getenv(%struct.gnat__strings__string_access*)
+invcont3:
+ invoke void @f() to label %invcont4 unwind label %cleanup
+; CHECK-NOT: {{call|invoke}}
+; CHECK: call void asm
+; CHECK-NOT: {{call|invoke}}
-declare void @ada__calendar__delays__delay_for()
+invcont4:
+ ret void
-declare void @ada__calendar__clock()
+cleanup:
+ %ex = landingpad {i8*, i32} cleanup
+ resume { i8*, i32 } %ex
+}
-define void @bc__support__high_resolution_time___elabb() {
+define void @h() {
+; CHECK-LABEL: define void @h() personality i32 (...)* @__gxx_personality_v0
entry:
- call fastcc void @bc__support__high_resolution_time__initialize_clock_rate( )
- ret void
+ call void @g()
+; CHECK-NOT: {{call|invoke}}
+; CHECK: invoke void @a()
+; CHECK-NOT: {{call|invoke}}
+; CHECK: invoke void @b()
+; CHECK-NOT: {{call|invoke}}
+; CHECK: invoke void @c()
+; CHECK-NOT: {{call|invoke}}
+; CHECK: call void asm
+; CHECK-NOT: {{call|invoke}}
+
+ ret void
}
OpenPOWER on IntegriCloud