[llvm-commits] CVS: llvm-gcc/gcc/llvm-expand.c
Chris Lattner
lattner at cs.uiuc.edu
Fri Apr 8 21:34:51 PDT 2005
Changes in directory llvm-gcc/gcc:
llvm-expand.c updated: 1.90 -> 1.91
---
Log message:
The negation part of fabs should use -0.0 for FP values.
---
Diffs of the changes: (+4 -1)
llvm-expand.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletion(-)
Index: llvm-gcc/gcc/llvm-expand.c
diff -u llvm-gcc/gcc/llvm-expand.c:1.90 llvm-gcc/gcc/llvm-expand.c:1.91
--- llvm-gcc/gcc/llvm-expand.c:1.90 Fri Mar 11 00:12:27 2005
+++ llvm-gcc/gcc/llvm-expand.c Fri Apr 8 23:34:34 2005
@@ -6603,7 +6603,10 @@
}
case ABS_EXPR: {
op0 = llvm_expand_expr(Fn, TREE_OPERAND(exp, 0), 0);
- op1 = llvm_constant_get_null(op0->Ty);
+ if (!llvm_type_is_fp(op1->Ty))
+ op1 = llvm_constant_get_null(op0->Ty);
+ else
+ op1 = llvm_constant_new(op1->Ty, "-0.0");
Result = llvm_expand_minmaxabs_expr(Fn, exp, op0, op1);
break;
}
More information about the llvm-commits
mailing list