[llvm-commits] CVS: llvm-gcc/gcc/llvm-expand.c
Chris Lattner
lattner at cs.uiuc.edu
Fri May 7 11:59:02 PDT 2004
Changes in directory llvm-gcc/gcc:
llvm-expand.c updated: 1.36 -> 1.37
---
Log message:
Minor code cleanups
---
Diffs of the changes: (+4 -4)
Index: llvm-gcc/gcc/llvm-expand.c
diff -u llvm-gcc/gcc/llvm-expand.c:1.36 llvm-gcc/gcc/llvm-expand.c:1.37
--- llvm-gcc/gcc/llvm-expand.c:1.36 Fri May 7 11:55:09 2004
+++ llvm-gcc/gcc/llvm-expand.c Fri May 7 11:59:33 2004
@@ -3186,15 +3186,15 @@
llvm_emit_label(Fn, DoneBlock);
/* If the conditional branch was folded into an unconditional branch (because
- * the condition was known true or false, don't insert a PHI node, just use
+ * the condition was known true or false) don't insert a PHI node, just use
* the known value instead.
*/
if (CondBr->NumOperands == 1) {
llvm_type *Ty = llvm_type_get_from_tree(TREE_TYPE(exp));
+ llvm_value *Val = SecondOp;
if (CondBr->Operands[0] == D2V(FromBlock))
- return cast_if_type_not_equal(Fn, isAndExpr ? llvm_constant_bool_false :
- llvm_constant_bool_true, Ty);
- return cast_if_type_not_equal(Fn, SecondOp, Ty);
+ Val = isAndExpr ? llvm_constant_bool_false : llvm_constant_bool_true;
+ return cast_if_type_not_equal(Fn, Val, Ty);
}
/* Add a PHI node to merge together the two computed values */
More information about the llvm-commits
mailing list