Fix an erroneous check for isFNeg; the FNeg case is handled

a few lines later on.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72904 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Dan Gohman 2009-06-04 23:43:29 +00:00
parent 40e233f103
commit 9f5f322a03
2 changed files with 8 additions and 1 deletions

View File

@ -2600,7 +2600,7 @@ void CWriter::visitBinaryOperator(Instruction &I) {
// If this is a negation operation, print it out as such. For FP, we don't
// want to print "-0.0 - X".
if (BinaryOperator::isNeg(&I) || BinaryOperator::isFNeg(&I)) {
if (BinaryOperator::isNeg(&I)) {
Out << "-(";
writeOperand(BinaryOperator::getNegArgument(cast<BinaryOperator>(&I)));
Out << ")";

View File

@ -0,0 +1,7 @@
; RUN: llvm-as < %s | llc -march=c
define void @func() nounwind {
entry:
%0 = fsub double -0.0, undef
ret void
}