[llvm-commits] [llvm] r61276 - in /llvm/trunk: lib/CodeGen/ScheduleDAG.cpp test/CodeGen/X86/fold-pcmpeqd-0.ll test/CodeGen/X86/pr3241.ll
Dan Gohman
gohman at apple.com
Sat Dec 20 08:34:59 PST 2008
Author: djg
Date: Sat Dec 20 10:34:57 2008
New Revision: 61276
URL: http://llvm.org/viewvc/llvm-project?rev=61276&view=rev
Log:
Use the correct Preds and Succs lists in setHeightDirty()
and setDepthDirty(), respectively. This fixes PR3241.
Added:
llvm/trunk/test/CodeGen/X86/pr3241.ll
Modified:
llvm/trunk/lib/CodeGen/ScheduleDAG.cpp
llvm/trunk/test/CodeGen/X86/fold-pcmpeqd-0.ll
Modified: llvm/trunk/lib/CodeGen/ScheduleDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/ScheduleDAG.cpp?rev=61276&r1=61275&r2=61276&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/ScheduleDAG.cpp (original)
+++ llvm/trunk/lib/CodeGen/ScheduleDAG.cpp Sat Dec 20 10:34:57 2008
@@ -126,8 +126,8 @@
WorkList.pop_back();
if (!SU->isDepthCurrent) continue;
SU->isDepthCurrent = false;
- for (SUnit::const_succ_iterator I = Succs.begin(),
- E = Succs.end(); I != E; ++I)
+ for (SUnit::const_succ_iterator I = SU->Succs.begin(),
+ E = SU->Succs.end(); I != E; ++I)
WorkList.push_back(I->getSUnit());
}
}
@@ -140,8 +140,8 @@
WorkList.pop_back();
if (!SU->isHeightCurrent) continue;
SU->isHeightCurrent = false;
- for (SUnit::const_pred_iterator I = Preds.begin(),
- E = Preds.end(); I != E; ++I)
+ for (SUnit::const_pred_iterator I = SU->Preds.begin(),
+ E = SU->Preds.end(); I != E; ++I)
WorkList.push_back(I->getSUnit());
}
}
Modified: llvm/trunk/test/CodeGen/X86/fold-pcmpeqd-0.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/fold-pcmpeqd-0.ll?rev=61276&r1=61275&r2=61276&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/fold-pcmpeqd-0.ll (original)
+++ llvm/trunk/test/CodeGen/X86/fold-pcmpeqd-0.ll Sat Dec 20 10:34:57 2008
@@ -1,4 +1,4 @@
-; RUN: llvm-as < %s | llc -mtriple=i386-apple-darwin | grep pcmpeqd | count 1
+; RUN: llvm-as < %s | llc -mtriple=i386-apple-darwin | not grep pcmpeqd
; RUN: llvm-as < %s | llc -mtriple=x86_64-apple-darwin | grep pcmpeqd | count 1
; This testcase shouldn't need to spill the -1 value,
Added: llvm/trunk/test/CodeGen/X86/pr3241.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/pr3241.ll?rev=61276&view=auto
==============================================================================
--- llvm/trunk/test/CodeGen/X86/pr3241.ll (added)
+++ llvm/trunk/test/CodeGen/X86/pr3241.ll Sat Dec 20 10:34:57 2008
@@ -0,0 +1,29 @@
+; RUN: llvm-as < %s | llc -march=x86
+; PR3241
+
+ at g_620 = external global i32
+
+define void @func_18(i32 %p_21) nounwind {
+entry:
+ %t0 = call i32 @func_31(i32 %p_21) nounwind
+ %t1 = call i32 @safe_add_macro_uint32_t_u_u() nounwind
+ %t2 = icmp sgt i32 %t1, 0
+ %t3 = zext i1 %t2 to i32
+ %t4 = load i32* @g_620, align 4
+ %t5 = icmp eq i32 %t3, %t4
+ %t6 = xor i32 %p_21, 1
+ %t7 = call i32 @func_55(i32 %t6) nounwind
+ br i1 %t5, label %return, label %bb
+
+bb:
+ unreachable
+
+return:
+ unreachable
+}
+
+declare i32 @func_31(i32)
+
+declare i32 @safe_add_macro_uint32_t_u_u()
+
+declare i32 @func_55(i32)
More information about the llvm-commits
mailing list