diff options
| author | Bill Schmidt <wschmidt@linux.vnet.ibm.com> | 2013-08-30 15:18:11 +0000 |
|---|---|---|
| committer | Bill Schmidt <wschmidt@linux.vnet.ibm.com> | 2013-08-30 15:18:11 +0000 |
| commit | 8d86fe7d6f541f4b3f2c6ab09afe3d0ce889e386 (patch) | |
| tree | ae66c10f57b2567338406f968bcff7c13bdee95a /llvm/lib/Target/PowerPC/InstPrinter | |
| parent | 998cda23b9c90e1e0aa0fe049283f77351c3fb34 (diff) | |
| download | bcm5719-llvm-8d86fe7d6f541f4b3f2c6ab09afe3d0ce889e386.tar.gz bcm5719-llvm-8d86fe7d6f541f4b3f2c6ab09afe3d0ce889e386.zip | |
[PowerPC] Add handling for conversions to fast-isel.
Yet another chunk of fast-isel code. This one handles various
conversions involving floating-point. (It also includes some
miscellaneous handling throughout the back end for LWA_32 and LWAX_32
that should have been part of the load-store patch.)
llvm-svn: 189677
Diffstat (limited to 'llvm/lib/Target/PowerPC/InstPrinter')
| -rw-r--r-- | llvm/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/llvm/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp b/llvm/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp index 08d7665065c..79af2ef1e67 100644 --- a/llvm/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp +++ b/llvm/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp @@ -19,6 +19,7 @@ #include "llvm/MC/MCInst.h" #include "llvm/MC/MCInstrInfo.h" #include "llvm/Support/raw_ostream.h" +#include "llvm/Target/TargetOpcodes.h" using namespace llvm; #include "PPCGenAsmWriter.inc" @@ -78,6 +79,17 @@ void PPCInstPrinter::printInst(const MCInst *MI, raw_ostream &O, } } + // For fast-isel, a COPY_TO_REGCLASS may survive this long. This is + // used when converting a 32-bit float to a 64-bit float as part of + // conversion to an integer (see PPCFastISel.cpp:SelectFPToI()), + // as otherwise we have problems with incorrect register classes + // in machine instruction verification. For now, just avoid trying + // to print it as such an instruction has no effect (a 32-bit float + // in a register is already in 64-bit form, just with lower + // precision). FIXME: Is there a better solution? + if (MI->getOpcode() == TargetOpcode::COPY_TO_REGCLASS) + return; + printInstruction(MI, O); printAnnotation(O, Annot); } |

