diff options
| author | Bob Wilson <bob.wilson@apple.com> | 2009-09-10 00:49:22 +0000 |
|---|---|---|
| committer | Bob Wilson <bob.wilson@apple.com> | 2009-09-10 00:49:22 +0000 |
| commit | 59e4c84c6f5c57cf664579b21a3d0cce704140c2 (patch) | |
| tree | 447c4661dee1c9a670ec8ea03c17b907a489e7fc /llvm/lib/CodeGen/SelectionDAG | |
| parent | a482ec83c5bf5dd5039c5faf8b335464014c2a68 (diff) | |
| download | bcm5719-llvm-59e4c84c6f5c57cf664579b21a3d0cce704140c2.tar.gz bcm5719-llvm-59e4c84c6f5c57cf664579b21a3d0cce704140c2.zip | |
Revert r81171 which was causing pr4927.
llvm-svn: 81415
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG')
| -rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/FastISel.cpp | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp b/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp index 8550ea9813d..f0c70861843 100644 --- a/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp @@ -615,25 +615,12 @@ FastISel::SelectFNeg(User *I) { unsigned OpReg = getRegForValue(BinaryOperator::getFNegArgument(I)); if (OpReg == 0) return false; - // Bitcast the value to integer, twiddle the sign bit with xor, - // and then bitcast it back to floating-point. + // Twiddle the sign bit with xor. EVT VT = TLI.getValueType(I->getType()); if (VT.getSizeInBits() > 64) return false; - EVT IntVT = EVT::getIntegerVT(I->getContext(), VT.getSizeInBits()); - - unsigned IntReg = FastEmit_r(VT.getSimpleVT(), IntVT.getSimpleVT(), - ISD::BIT_CONVERT, OpReg); - if (IntReg == 0) - return false; - - unsigned IntResultReg = FastEmit_ri_(IntVT.getSimpleVT(), ISD::XOR, IntReg, - UINT64_C(1) << (VT.getSizeInBits()-1), - IntVT.getSimpleVT()); - if (IntResultReg == 0) - return false; - - unsigned ResultReg = FastEmit_r(IntVT.getSimpleVT(), VT.getSimpleVT(), - ISD::BIT_CONVERT, IntResultReg); + unsigned ResultReg = FastEmit_ri_(VT.getSimpleVT(), ISD::XOR, OpReg, + UINT64_C(1) << (VT.getSizeInBits()-1), + VT.getSimpleVT()); if (ResultReg == 0) return false; |

