Adjust ScheduleDAGSDNodes::RegDefIter for patchpoints
authorHal Finkel <hfinkel@anl.gov>
Wed, 14 Jan 2015 01:07:03 +0000 (01:07 +0000)
committerHal Finkel <hfinkel@anl.gov>
Wed, 14 Jan 2015 01:07:03 +0000 (01:07 +0000)
commit7a4708e0eb025148a872f5de2d1e6c51483615ff
tree6665bbb570ccfa65eb4b9792ff96eee3aee68e13
parent73f90657708008c9589f83993323e9a7fe2e864f
Adjust ScheduleDAGSDNodes::RegDefIter for patchpoints

PATCHPOINT is a strange pseudo-instruction. Depending on how it is used, and
whether or not the AnyReg calling convention is being used, it might or might
not define a value. However, its TableGen definition says that it defines one
value, and so when it doesn't, the code in ScheduleDAGSDNodes::RegDefIter
becomes confused and the code that uses the RegDefIter will try to get the
register class of the MVT::Other type associated with the PATCHPOINT's chain
result (under certain circumstances).

This will be covered by the PPC64 PatchPoint test cases once that support is
re-committed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225907 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp