[llvm-commits] CVS: gcc-3.4/gcc/llvm-expand.c
Chris Lattner
lattner at cs.uiuc.edu
Mon Feb 2 11:43:08 PST 2004
Changes in directory gcc-3.4/gcc:
llvm-expand.c updated: 1.4 -> 1.5
---
Log message:
Expand -X (where X is a floating point type) as -0.0 - X instead of 0.0 - X,
in order to fix PR216.
---
Diffs of the changes: (+4 -1)
Index: gcc-3.4/gcc/llvm-expand.c
diff -u gcc-3.4/gcc/llvm-expand.c:1.4 gcc-3.4/gcc/llvm-expand.c:1.5
--- gcc-3.4/gcc/llvm-expand.c:1.4 Fri Jan 30 16:28:42 2004
+++ gcc-3.4/gcc/llvm-expand.c Mon Feb 2 11:42:13 2004
@@ -5677,7 +5677,10 @@
case NEGATE_EXPR: /* -A === 0-A */
op1 = llvm_expand_expr(Fn, TREE_OPERAND(exp, 0), 0);
- op0 = llvm_constant_get_null(op1->Ty);
+ if (!llvm_type_is_fp(op1->Ty))
+ op0 = llvm_constant_get_null(op1->Ty);
+ else
+ op0 = llvm_constant_new(op1->Ty, "-0.0");
Result = append_inst(Fn, create_binary_inst("tmp", O_Sub, op0, op1));
break;
case BIT_NOT_EXPR: /* ~A === A^-1 */
More information about the llvm-commits
mailing list