forked from OSchip/llvm-project
Fix an erroneous check for isFNeg; the FNeg case is handled
a few lines later on. llvm-svn: 72904
This commit is contained in:
parent
72c9722c64
commit
5c36f4f40c
|
@ -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 << ")";
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
; RUN: llvm-as < %s | llc -march=c
|
||||
|
||||
define void @func() nounwind {
|
||||
entry:
|
||||
%0 = fsub double -0.0, undef
|
||||
ret void
|
||||
}
|
Loading…
Reference in New Issue