aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2007-10-17 02:15:06 +0000
committerEvan Cheng <evan.cheng@apple.com>2007-10-17 02:15:06 +0000
commit6ee4561ba73ca1f619b771c344e9a7f9265d7f5c (patch)
tree6010501d46090ad8b46afa317968153189842ebb /test
parent303fed8a6365ef87a947fb42e115da07f3151fbb (diff)
downloadexternal_llvm-6ee4561ba73ca1f619b771c344e9a7f9265d7f5c.zip
external_llvm-6ee4561ba73ca1f619b771c344e9a7f9265d7f5c.tar.gz
external_llvm-6ee4561ba73ca1f619b771c344e9a7f9265d7f5c.tar.bz2
Yet another test case for extract_subreg coalescing crash.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43063 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/CodeGen/X86/2007-10-16-CoalescerCrash.ll31
1 files changed, 31 insertions, 0 deletions
diff --git a/test/CodeGen/X86/2007-10-16-CoalescerCrash.ll b/test/CodeGen/X86/2007-10-16-CoalescerCrash.ll
new file mode 100644
index 0000000..a414ef0
--- /dev/null
+++ b/test/CodeGen/X86/2007-10-16-CoalescerCrash.ll
@@ -0,0 +1,31 @@
+; RUN: llvm-as < %s | llc -mtriple=x86_64-apple-darwin
+
+define i64 @__ashldi3(i64 %u, i64 %b) {
+entry:
+ br i1 false, label %UnifiedReturnBlock, label %cond_next
+
+cond_next: ; preds = %entry
+ %tmp9 = sub i64 32, %b ; <i64> [#uses=2]
+ %tmp11 = icmp slt i64 %tmp9, 1 ; <i1> [#uses=1]
+ %tmp2180 = trunc i64 %u to i32 ; <i32> [#uses=2]
+ %tmp2223 = trunc i64 %tmp9 to i32 ; <i32> [#uses=2]
+ br i1 %tmp11, label %cond_true14, label %cond_false
+
+cond_true14: ; preds = %cond_next
+ %tmp24 = sub i32 0, %tmp2223 ; <i32> [#uses=1]
+ %tmp25 = shl i32 %tmp2180, %tmp24 ; <i32> [#uses=1]
+ %tmp2569 = zext i32 %tmp25 to i64 ; <i64> [#uses=1]
+ %tmp256970 = shl i64 %tmp2569, 32 ; <i64> [#uses=1]
+ ret i64 %tmp256970
+
+cond_false: ; preds = %cond_next
+ %tmp35 = lshr i32 %tmp2180, %tmp2223 ; <i32> [#uses=1]
+ %tmp54 = or i32 %tmp35, 0 ; <i32> [#uses=1]
+ %tmp5464 = zext i32 %tmp54 to i64 ; <i64> [#uses=1]
+ %tmp546465 = shl i64 %tmp5464, 32 ; <i64> [#uses=1]
+ %tmp546465.ins = or i64 %tmp546465, 0 ; <i64> [#uses=1]
+ ret i64 %tmp546465.ins
+
+UnifiedReturnBlock:
+ ret i64 %u
+}