summaryrefslogtreecommitdiff
path: root/test/CodeGen/X86/2008-02-05-ISelCrash.ll
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2008-02-05 22:50:29 +0000
committerEvan Cheng <evan.cheng@apple.com>2008-02-05 22:50:29 +0000
commita58891ff1e6b5cc61cbb3cfe46be7f2eeddbfe98 (patch)
treebde597ab334f6b85410379f63fde4d78d89573f0 /test/CodeGen/X86/2008-02-05-ISelCrash.ll
parentebaaa91094ae54d16ca4f6fc247d47739a761d63 (diff)
downloadllvm-a58891ff1e6b5cc61cbb3cfe46be7f2eeddbfe98.tar.gz
llvm-a58891ff1e6b5cc61cbb3cfe46be7f2eeddbfe98.tar.bz2
llvm-a58891ff1e6b5cc61cbb3cfe46be7f2eeddbfe98.tar.xz
Fix PR1975: dag isel emitter produces patterns that isel wrong flag result.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46776 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86/2008-02-05-ISelCrash.ll')
-rw-r--r--test/CodeGen/X86/2008-02-05-ISelCrash.ll12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/CodeGen/X86/2008-02-05-ISelCrash.ll b/test/CodeGen/X86/2008-02-05-ISelCrash.ll
new file mode 100644
index 0000000000..6885cf14cf
--- /dev/null
+++ b/test/CodeGen/X86/2008-02-05-ISelCrash.ll
@@ -0,0 +1,12 @@
+; RUN: llvm-as < %s | llc -march=x86
+; PR1975
+
+@nodes = external global i64 ; <i64*> [#uses=2]
+
+define fastcc i32 @ab(i32 %alpha, i32 %beta) nounwind {
+entry:
+ %tmp1 = load i64* @nodes, align 8 ; <i64> [#uses=1]
+ %tmp2 = add i64 %tmp1, 1 ; <i64> [#uses=1]
+ store i64 %tmp2, i64* @nodes, align 8
+ ret i32 0
+}