forked from OSchip/llvm-project
[GISel]:Skip legalizing Intermediate inst(with generic types)
During legalization, targets can create Pseudo Instructions with generic types. We shouldn't try to legalize them. Reviewed by Quentin, dsanders https://reviews.llvm.org/D32575 llvm-svn: 302199
This commit is contained in:
parent
1f673d4450
commit
21d8d317d6
|
@ -176,8 +176,13 @@ bool Legalizer::runOnMachineFunction(MachineFunction &MF) {
|
|||
unsigned NumNewInsns = 0;
|
||||
SmallVector<MachineInstr *, 4> WorkList;
|
||||
Helper.MIRBuilder.recordInsertions([&](MachineInstr *MI) {
|
||||
++NumNewInsns;
|
||||
WorkList.push_back(MI);
|
||||
// Only legalize pre-isel generic instructions.
|
||||
// Legalization process could generate Target specific pseudo
|
||||
// instructions with generic types. Don't record them
|
||||
if (isPreISelGenericOpcode(MI->getOpcode())) {
|
||||
++NumNewInsns;
|
||||
WorkList.push_back(MI);
|
||||
}
|
||||
});
|
||||
WorkList.push_back(&*MI);
|
||||
|
||||
|
|
Loading…
Reference in New Issue