aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/TargetMachine/Sparc
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2001-09-12 01:28:49 +0000
committerChris Lattner <sabre@nondot.org>2001-09-12 01:28:49 +0000
commit4ddb4c82d7451f7ab0269a4d0ca948f96e80402e (patch)
treec3daa33ddc40dc527d4d654182faf4bdcf0ccc74 /lib/CodeGen/TargetMachine/Sparc
parentd268ad6e2e6c224c688a8e2a51de706e9e6f8165 (diff)
* Clean up InstrForest
* Fix ins sel problem, test case: void "foo" (int *%x, int *%y) begin seteq int *%x, %y ret void end git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@552 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/TargetMachine/Sparc')
-rw-r--r--lib/CodeGen/TargetMachine/Sparc/SparcInstrSelection.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/CodeGen/TargetMachine/Sparc/SparcInstrSelection.cpp b/lib/CodeGen/TargetMachine/Sparc/SparcInstrSelection.cpp
index ca2bca6584..ddee541ce6 100644
--- a/lib/CodeGen/TargetMachine/Sparc/SparcInstrSelection.cpp
+++ b/lib/CodeGen/TargetMachine/Sparc/SparcInstrSelection.cpp
@@ -540,12 +540,11 @@ ChooseFcmpInstruction(const InstructionNode* instrNode)
MachineOpCode opCode = INVALID_OPCODE;
Value* operand = ((InstrTreeNode*) instrNode->leftChild())->getValue();
- switch(operand->getType()->getPrimitiveID())
- {
- case Type::FloatTyID: opCode = FCMPS; break;
- case Type::DoubleTyID: opCode = FCMPD; break;
- default: assert(0 && "Invalid type for FCMP instruction"); break;
- }
+ switch(operand->getType()->getPrimitiveID()) {
+ case Type::FloatTyID: opCode = FCMPS; break;
+ case Type::DoubleTyID: opCode = FCMPD; break;
+ default: assert(0 && "Invalid type for FCMP instruction"); break;
+ }
return opCode;
}
@@ -1700,7 +1699,8 @@ GetInstructionsByRule(InstructionNode* subtreeRoot,
int valueToMove;
MachineOpCode movOpCode;
- if (subtreeRoot->leftChild()->getValue()->getType()->isIntegral())
+ if (subtreeRoot->leftChild()->getValue()->getType()->isIntegral() ||
+ subtreeRoot->leftChild()->getValue()->getType()->isPointerType())
{
// integer condition: destination should be %g0 or integer register
// if result must be saved but condition is not SetEQ then we need