diff options
author | Chris Lattner <sabre@nondot.org> | 2002-04-08 22:05:54 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-04-08 22:05:54 +0000 |
commit | aca4d447c9248e12f138976353b576773153ac6e (patch) | |
tree | 4ce9071d8614c95dcaa6a078780e62b514baf1e3 /llvm/lib/CodeGen/InstrSelection/InstrSelection.cpp | |
parent | 4a317367e913dc5b0d2991f1283701cc624d4373 (diff) | |
download | bcm5719-llvm-aca4d447c9248e12f138976353b576773153ac6e.tar.gz bcm5719-llvm-aca4d447c9248e12f138976353b576773153ac6e.zip |
Value cannot be directly instantiated. I think that this code was TRYING to
make a PHI node, although it was badly broken. This keeps tests passing, so
we'll go with it.
llvm-svn: 2184
Diffstat (limited to 'llvm/lib/CodeGen/InstrSelection/InstrSelection.cpp')
-rw-r--r-- | llvm/lib/CodeGen/InstrSelection/InstrSelection.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/InstrSelection/InstrSelection.cpp b/llvm/lib/CodeGen/InstrSelection/InstrSelection.cpp index 1eb507a695b..583df38360a 100644 --- a/llvm/lib/CodeGen/InstrSelection/InstrSelection.cpp +++ b/llvm/lib/CodeGen/InstrSelection/InstrSelection.cpp @@ -202,11 +202,9 @@ InsertCode4AllPhisInMeth(Function *F, TargetMachine &target) // for( ; IIt != InstList.end(); ++IIt ) { - if( (*IIt)->getOpcode() == Instruction::PHINode ) { - - PHINode *PN = (PHINode *) (*IIt); - - Value *PhiCpRes = new Value(PN->getType(),PN->getValueType(),"PhiCp:"); + if (PHINode *PN = dyn_cast<PHINode>(*IIt)) { + // FIXME: This is probably wrong... + Value *PhiCpRes = new PHINode(PN->getType(), "PhiCp:"); // for each incoming value of the phi, insert phi elimination // |