aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/PowerPC/PPCISelLowering.cpp
diff options
context:
space:
mode:
authorRoman Levenstein <romix.llvm@googlemail.com>2008-04-07 10:06:32 +0000
committerRoman Levenstein <romix.llvm@googlemail.com>2008-04-07 10:06:32 +0000
commit05650fd0ba74ad3356d1bc5d1f07ff194b16b82e (patch)
tree59da0b5fe5220958b1d351b0262ffaa07e7af647 /lib/Target/PowerPC/PPCISelLowering.cpp
parentced50f8215d960d8fdbac74032a17fb12d510a0b (diff)
downloadexternal_llvm-05650fd0ba74ad3356d1bc5d1f07ff194b16b82e.zip
external_llvm-05650fd0ba74ad3356d1bc5d1f07ff194b16b82e.tar.gz
external_llvm-05650fd0ba74ad3356d1bc5d1f07ff194b16b82e.tar.bz2
Re-commit of the r48822, where the infinite looping problem discovered
by Dan Gohman is fixed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49330 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/PowerPC/PPCISelLowering.cpp')
-rw-r--r--lib/Target/PowerPC/PPCISelLowering.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/Target/PowerPC/PPCISelLowering.cpp b/lib/Target/PowerPC/PPCISelLowering.cpp
index 4055920..f307184 100644
--- a/lib/Target/PowerPC/PPCISelLowering.cpp
+++ b/lib/Target/PowerPC/PPCISelLowering.cpp
@@ -3662,11 +3662,11 @@ SDOperand PPCTargetLowering::PerformDAGCombine(SDNode *N,
SDNode *LHSN = N->getOperand(0).Val;
for (SDNode::use_iterator UI = LHSN->use_begin(), E = LHSN->use_end();
UI != E; ++UI)
- if ((*UI)->getOpcode() == PPCISD::VCMPo &&
- (*UI)->getOperand(1) == N->getOperand(1) &&
- (*UI)->getOperand(2) == N->getOperand(2) &&
- (*UI)->getOperand(0) == N->getOperand(0)) {
- VCMPoNode = *UI;
+ if ((*UI).getUser()->getOpcode() == PPCISD::VCMPo &&
+ (*UI).getUser()->getOperand(1) == N->getOperand(1) &&
+ (*UI).getUser()->getOperand(2) == N->getOperand(2) &&
+ (*UI).getUser()->getOperand(0) == N->getOperand(0)) {
+ VCMPoNode = UI->getUser();
break;
}
@@ -3682,7 +3682,7 @@ SDOperand PPCTargetLowering::PerformDAGCombine(SDNode *N,
for (SDNode::use_iterator UI = VCMPoNode->use_begin();
FlagUser == 0; ++UI) {
assert(UI != VCMPoNode->use_end() && "Didn't find user!");
- SDNode *User = *UI;
+ SDNode *User = UI->getUser();
for (unsigned i = 0, e = User->getNumOperands(); i != e; ++i) {
if (User->getOperand(i) == SDOperand(VCMPoNode, 1)) {
FlagUser = User;