diff options
author | Evan Cheng <evan.cheng@apple.com> | 2008-03-18 08:26:47 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2008-03-18 08:26:47 +0000 |
commit | 04a848204f6a9b1ac3b840eeeef4ab7cce9ca4d5 (patch) | |
tree | 91486580dd8864e186c580e945d84c0af184ac24 /test/CodeGen/PowerPC | |
parent | 307f46ef2c59faf05bc8b439b22d545ac3dd6566 (diff) | |
download | external_llvm-04a848204f6a9b1ac3b840eeeef4ab7cce9ca4d5.zip external_llvm-04a848204f6a9b1ac3b840eeeef4ab7cce9ca4d5.tar.gz external_llvm-04a848204f6a9b1ac3b840eeeef4ab7cce9ca4d5.tar.bz2 |
Rewrite code that propagate isDead information after a dead copy is coalesced. This remove some ugly spaghetti code and fixed a number of subtle bugs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48490 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/PowerPC')
-rw-r--r-- | test/CodeGen/PowerPC/2008-03-17-RegScavengerCrash.ll | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/test/CodeGen/PowerPC/2008-03-17-RegScavengerCrash.ll b/test/CodeGen/PowerPC/2008-03-17-RegScavengerCrash.ll new file mode 100644 index 0000000..eaeccc5 --- /dev/null +++ b/test/CodeGen/PowerPC/2008-03-17-RegScavengerCrash.ll @@ -0,0 +1,31 @@ +; RUN: llvm-as < %s | llc -march=ppc32 -enable-ppc32-regscavenger + + %struct._cpp_strbuf = type { i8*, i32, i32 } + %struct.cpp_string = type { i32, i8* } + +declare fastcc void @emit_numeric_escape(i32, i32, %struct._cpp_strbuf*, i32) nounwind + +define i32 @cpp_interpret_string(i32 %pfile, %struct.cpp_string* %from, i32 %wide) nounwind { +entry: + %tmp61 = load i32* null, align 4 ; <i32> [#uses=1] + %toBool = icmp eq i32 %wide, 0 ; <i1> [#uses=2] + %iftmp.87.0 = select i1 %toBool, i32 %tmp61, i32 0 ; <i32> [#uses=2] + %tmp69 = icmp ult i32 %iftmp.87.0, 33 ; <i1> [#uses=1] + %min = select i1 %tmp69, i32 %iftmp.87.0, i32 32 ; <i32> [#uses=1] + %tmp71 = icmp ugt i32 %min, 31 ; <i1> [#uses=1] + br i1 %tmp71, label %bb79, label %bb75 +bb75: ; preds = %entry + ret i32 0 +bb79: ; preds = %entry + br i1 %toBool, label %bb103, label %bb94 +bb94: ; preds = %bb79 + br i1 false, label %bb729, label %bb130.preheader +bb103: ; preds = %bb79 + ret i32 0 +bb130.preheader: ; preds = %bb94 + %tmp134 = getelementptr %struct.cpp_string* %from, i32 0, i32 1 ; <i8**> [#uses=0] + ret i32 0 +bb729: ; preds = %bb94 + call fastcc void @emit_numeric_escape( i32 %pfile, i32 0, %struct._cpp_strbuf* null, i32 %wide ) nounwind + ret i32 1 +} |