summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-03-26 10:06:40 +0000
committerChris Lattner <sabre@nondot.org>2006-03-26 10:06:40 +0000
commit6961fc76bbbde5a113dbc61bc230b7a8b265d66f (patch)
tree7f65411d406a39e567d16f0f57a833c69429c599 /llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
parented6184aef292f7de61441336a1a5ef6c0e6b37f4 (diff)
downloadbcm5719-llvm-6961fc76bbbde5a113dbc61bc230b7a8b265d66f.tar.gz
bcm5719-llvm-6961fc76bbbde5a113dbc61bc230b7a8b265d66f.zip
Codegen vector predicate compares.
llvm-svn: 27151
Diffstat (limited to 'llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp')
-rw-r--r--llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp b/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
index 8e5cff798f9..4e74b2c639d 100644
--- a/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
+++ b/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
@@ -1060,6 +1060,20 @@ void PPCDAGToDAGISel::Select(SDOperand &Result, SDOperand Op) {
getI32Imm(0)), 0);
return;
}
+
+ case PPCISD::MFCR: {
+ SDOperand InFlag;
+ Select(InFlag, N->getOperand(1));
+ // Use MFOCRF if supported.
+ if (TLI.getTargetMachine().getSubtarget<PPCSubtarget>().isGigaProcessor())
+ Result = SDOperand(CurDAG->getTargetNode(PPC::MFOCRF, MVT::i32,
+ N->getOperand(0), InFlag), 0);
+ else
+ Result = SDOperand(CurDAG->getTargetNode(PPC::MFCR, MVT::i32, InFlag), 0);
+ CodeGenMap[Op] = Result;
+ return;
+ }
+
case ISD::SDIV: {
// FIXME: since this depends on the setting of the carry flag from the srawi
// we should really be making notes about that for the scheduler.
OpenPOWER on IntegriCloud