patch-r267981-llvm-r211435-fix-ppc-fctiduz.diff (267982) | patch-r267981-llvm-r211435-fix-ppc-fctiduz.diff (268065) |
---|---|
1Pull in r211627 from upstream llvm trunk (by Bill Schmidt): 2 3 [PPC64] Fix PR20071 (fctiduz generated for targets lacking that 4 instruction) 5 6 PR20071 identifies a problem in PowerPC's fast-isel implementation 7 for floating-point conversion to integer. The fctiduz instruction 8 was added in Power ISA 2.06 (i.e., Power7 and later). However, this --- 18 unchanged lines hidden (view full) --- 27=================================================================== 28--- lib/Target/PowerPC/PPCFastISel.cpp (revision 106) 29+++ lib/Target/PowerPC/PPCFastISel.cpp (revision 107) 30@@ -1026,6 +1026,10 @@ bool PPCFastISel::SelectFPToI(const Instruction *I 31 if (DstVT != MVT::i32 && DstVT != MVT::i64) 32 return false; 33 34+ // If we don't have FCTIDUZ and we need it, punt to SelectionDAG. | 1Pull in r211627 from upstream llvm trunk (by Bill Schmidt): 2 3 [PPC64] Fix PR20071 (fctiduz generated for targets lacking that 4 instruction) 5 6 PR20071 identifies a problem in PowerPC's fast-isel implementation 7 for floating-point conversion to integer. The fctiduz instruction 8 was added in Power ISA 2.06 (i.e., Power7 and later). However, this --- 18 unchanged lines hidden (view full) --- 27=================================================================== 28--- lib/Target/PowerPC/PPCFastISel.cpp (revision 106) 29+++ lib/Target/PowerPC/PPCFastISel.cpp (revision 107) 30@@ -1026,6 +1026,10 @@ bool PPCFastISel::SelectFPToI(const Instruction *I 31 if (DstVT != MVT::i32 && DstVT != MVT::i64) 32 return false; 33 34+ // If we don't have FCTIDUZ and we need it, punt to SelectionDAG. |
35+ if (DstVT == MVT::i64 && !IsSigned && !PPCSubTarget->hasFPCVT()) | 35+ if (DstVT == MVT::i64 && !IsSigned && !PPCSubTarget.hasFPCVT()) |
36+ return false; 37+ 38 Value *Src = I->getOperand(0); 39 Type *SrcTy = Src->getType(); 40 if (!isTypeLegal(SrcTy, SrcVT)) 41Index: test/CodeGen/PowerPC/fast-isel-conversion-p5.ll 42=================================================================== 43--- test/CodeGen/PowerPC/fast-isel-conversion-p5.ll (revision 106) --- 451 unchanged lines hidden --- | 36+ return false; 37+ 38 Value *Src = I->getOperand(0); 39 Type *SrcTy = Src->getType(); 40 if (!isTypeLegal(SrcTy, SrcVT)) 41Index: test/CodeGen/PowerPC/fast-isel-conversion-p5.ll 42=================================================================== 43--- test/CodeGen/PowerPC/fast-isel-conversion-p5.ll (revision 106) --- 451 unchanged lines hidden --- |