Fix a bug in the new PPC CTR-Loops pass.
authorHal Finkel <hfinkel@anl.gov>
Fri, 8 Jun 2012 15:38:23 +0000 (15:38 +0000)
committerHal Finkel <hfinkel@anl.gov>
Fri, 8 Jun 2012 15:38:23 +0000 (15:38 +0000)
commitdaa03ec60475a641bcc66799764977f79997ca45
tree88764859180b5f2af3a95fd201eaddeba589fa61
parent99f823f94374917174f96a7689955b8463db6816
Fix a bug in the new PPC CTR-Loops pass.

The code which tests for an induction operation cannot assume that any
ADDI instruction will have a register operand because the operand could
also be a frame index; for example:
    %vreg16<def> = ADDI8 <fi#0>, 0; G8RC:%vreg16

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158205 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/PowerPC/PPCCTRLoops.cpp
test/CodeGen/PowerPC/ctrloop-reg.ll [new file with mode: 0644]