diff options
author | Ahmed Bougacha <ahmed.bougacha@gmail.com> | 2016-08-02 11:41:09 +0000 |
---|---|---|
committer | Ahmed Bougacha <ahmed.bougacha@gmail.com> | 2016-08-02 11:41:09 +0000 |
commit | faf8e9f8c65a4ad8577189688dd373f124f7052f (patch) | |
tree | 90cc7b314e0006b005fb9ff4d26880a59d27668a /llvm/lib | |
parent | f49ab9af2c776465291db05a7b29b1b7f0f00241 (diff) | |
download | bcm5719-llvm-faf8e9f8c65a4ad8577189688dd373f124f7052f.tar.gz bcm5719-llvm-faf8e9f8c65a4ad8577189688dd373f124f7052f.zip |
[GlobalISel] Don't legalize non-generic instructions.
They don't have types and should be legal.
llvm-svn: 277446
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/CodeGen/GlobalISel/MachineLegalizePass.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/GlobalISel/MachineLegalizePass.cpp b/llvm/lib/CodeGen/GlobalISel/MachineLegalizePass.cpp index 0b8264f613d..bf5025201ba 100644 --- a/llvm/lib/CodeGen/GlobalISel/MachineLegalizePass.cpp +++ b/llvm/lib/CodeGen/GlobalISel/MachineLegalizePass.cpp @@ -54,6 +54,12 @@ bool MachineLegalizePass::runOnMachineFunction(MachineFunction &MF) { // Get the next Instruction before we try to legalize, because there's a // good chance MI will be deleted. NextMI = std::next(MI); + + // Only legalize pre-isel generic instructions: others don't have types + // and are assumed to be legal. + if (!isPreISelGenericOpcode(MI->getOpcode())) + continue; + auto Res = Helper.legalizeInstr(*MI, Legalizer); // Error out if we couldn't legalize this instruction. We may want to fall |