[llvm-commits] [llvm] r72904 - in /llvm/trunk: lib/Target/CBackend/CBackend.cpp test/CodeGen/CBackend/fneg.ll
Dan Gohman
gohman at apple.com
Thu Jun 4 16:43:30 PDT 2009
Author: djg
Date: Thu Jun 4 18:43:29 2009
New Revision: 72904
URL: http://llvm.org/viewvc/llvm-project?rev=72904&view=rev
Log:
Fix an erroneous check for isFNeg; the FNeg case is handled
a few lines later on.
Added:
llvm/trunk/test/CodeGen/CBackend/fneg.ll
Modified:
llvm/trunk/lib/Target/CBackend/CBackend.cpp
Modified: llvm/trunk/lib/Target/CBackend/CBackend.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CBackend/CBackend.cpp?rev=72904&r1=72903&r2=72904&view=diff
==============================================================================
--- llvm/trunk/lib/Target/CBackend/CBackend.cpp (original)
+++ llvm/trunk/lib/Target/CBackend/CBackend.cpp Thu Jun 4 18:43:29 2009
@@ -2600,7 +2600,7 @@
// 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 << ")";
Added: llvm/trunk/test/CodeGen/CBackend/fneg.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/CBackend/fneg.ll?rev=72904&view=auto
==============================================================================
--- llvm/trunk/test/CodeGen/CBackend/fneg.ll (added)
+++ llvm/trunk/test/CodeGen/CBackend/fneg.ll Thu Jun 4 18:43:29 2009
@@ -0,0 +1,7 @@
+; RUN: llvm-as < %s | llc -march=c
+
+define void @func() nounwind {
+ entry:
+ %0 = fsub double -0.0, undef
+ ret void
+}
More information about the llvm-commits
mailing list