[llvm-commits] CVS: llvm-gcc/gcc/llvm-expand.c

Chris Lattner lattner at cs.uiuc.edu
Sat Sep 24 14:42:04 PDT 2005



Changes in directory llvm-gcc/gcc:

llvm-expand.c updated: 1.115 -> 1.116
---
Log message:

This optimization is bogus and broke in the presence of gotos


---
Diffs of the changes:  (+0 -11)

 llvm-expand.c |   11 -----------
 1 files changed, 11 deletions(-)


Index: llvm-gcc/gcc/llvm-expand.c
diff -u llvm-gcc/gcc/llvm-expand.c:1.115 llvm-gcc/gcc/llvm-expand.c:1.116
--- llvm-gcc/gcc/llvm-expand.c:1.115	Sat Sep 24 16:01:44 2005
+++ llvm-gcc/gcc/llvm-expand.c	Sat Sep 24 16:41:53 2005
@@ -3400,17 +3400,6 @@
   
   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 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))
-      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 */
   PHI = llvm_instruction_new(BoolTy, "shortcirc_val", O_PHINode, 4);






More information about the llvm-commits mailing list