- // a copy of the input value in this block. In SSE mode, we only care about
- // 80-bit values.
-
- // Final check, check LLVM BB's that are successors to the LLVM BB
- // corresponding to BB for FP PHI nodes.
- const BasicBlock *LLVMBB = MBB->getBasicBlock();
- for (succ_const_iterator SI = succ_begin(LLVMBB), E = succ_end(LLVMBB);
- SI != E; ++SI) {
- const PHINode *PN;
- for (BasicBlock::const_iterator II = SI->begin();
- (PN = dyn_cast<PHINode>(II)); ++II) {
- if (PN->getType()->isX86_FP80Ty() ||
- (SSELevel == 0 && PN->getType()->isFloatingPointTy()) ||
- (SSELevel < 2 && PN->getType()->isDoubleTy())) {
+ // a copy of the input value in this block, which is a definition of the
+ // value.
+ for (MachineBasicBlock::succ_iterator SI = MBB->succ_begin(),
+ E = MBB->succ_end(); SI != E; ++ SI) {
+ MachineBasicBlock *SuccBB = *SI;
+ for (MachineBasicBlock::iterator I = SuccBB->begin(), E = SuccBB->end();
+ I != E; ++I) {
+ // All PHI nodes are at the top of the block.
+ if (!I->isPHI()) break;
+
+ if (isFPStackVReg(I->getOperand(0).getReg(), MRI))