aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-04-30 23:34:46 +0000
committerChris Lattner <sabre@nondot.org>2007-04-30 23:34:46 +0000
commit045a9278b88ba9d7edc9e24e1673a0a7332c30b4 (patch)
treec443110f9af92ba7d6c63c0ddeda42c6b4be2f36 /test
parentc11ce86943847a95ee20b65b4d1fc4611b59ddc6 (diff)
downloadexternal_llvm-045a9278b88ba9d7edc9e24e1673a0a7332c30b4.zip
external_llvm-045a9278b88ba9d7edc9e24e1673a0a7332c30b4.tar.gz
external_llvm-045a9278b88ba9d7edc9e24e1673a0a7332c30b4.tar.bz2
testcase for PR1228
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36601 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/CodeGen/Generic/2007-04-30-LandingPadBranchFolding.ll59
1 files changed, 59 insertions, 0 deletions
diff --git a/test/CodeGen/Generic/2007-04-30-LandingPadBranchFolding.ll b/test/CodeGen/Generic/2007-04-30-LandingPadBranchFolding.ll
new file mode 100644
index 0000000..71b4c85
--- /dev/null
+++ b/test/CodeGen/Generic/2007-04-30-LandingPadBranchFolding.ll
@@ -0,0 +1,59 @@
+; RUN: llvm-as < %s | llc
+; PR1228
+
+ "struct.std::basic_string<char,std::char_traits<char>,std::allocator<char> >::_Alloc_hider" = type { i8* }
+ "struct.std::locale" = type { "struct.std::locale::_Impl"* }
+ "struct.std::locale::_Impl" = type { i32, "struct.std::locale::facet"**, i32, "struct.std::locale::facet"**, i8** }
+ "struct.std::locale::facet" = type { i32 (...)**, i32 }
+ "struct.std::string" = type { "struct.std::basic_string<char,std::char_traits<char>,std::allocator<char> >::_Alloc_hider" }
+
+define void @_ZNKSt6locale4nameEv("struct.std::string"* %agg.result) {
+entry:
+ %tmp105 = icmp eq i8* null, null ; <i1> [#uses=1]
+ br i1 %tmp105, label %cond_true, label %cond_true222
+
+cond_true: ; preds = %entry
+ invoke void @_ZNSs14_M_replace_auxEjjjc( )
+ to label %cond_next1328 unwind label %cond_true1402
+
+cond_true222: ; preds = %cond_true222, %entry
+ %tmp207 = call i32 @strcmp( ) ; <i32> [#uses=1]
+ %tmp208 = icmp eq i32 %tmp207, 0 ; <i1> [#uses=2]
+ %bothcond1480 = and i1 %tmp208, false ; <i1> [#uses=1]
+ br i1 %bothcond1480, label %cond_true222, label %cond_next226.loopexit
+
+cond_next226.loopexit: ; preds = %cond_true222
+ %phitmp = xor i1 %tmp208, true ; <i1> [#uses=1]
+ br i1 %phitmp, label %cond_false280, label %cond_true235
+
+cond_true235: ; preds = %cond_next226.loopexit
+ invoke void @_ZNSs6assignEPKcj( )
+ to label %cond_next1328 unwind label %cond_true1402
+
+cond_false280: ; preds = %cond_next226.loopexit
+ invoke void @_ZNSs7reserveEj( )
+ to label %invcont282 unwind label %cond_true1402
+
+invcont282: ; preds = %cond_false280
+ invoke void @_ZNSs6appendEPKcj( )
+ to label %invcont317 unwind label %cond_true1402
+
+invcont317: ; preds = %invcont282
+ ret void
+
+cond_next1328: ; preds = %cond_true235, %cond_true
+ ret void
+
+cond_true1402: ; preds = %invcont282, %cond_false280, %cond_true235, %cond_true
+ ret void
+}
+
+declare void @_ZNSs14_M_replace_auxEjjjc()
+
+declare i32 @strcmp()
+
+declare void @_ZNSs6assignEPKcj()
+
+declare void @_ZNSs7reserveEj()
+
+declare void @_ZNSs6appendEPKcj()