+2016-05-25 Jeff Law <law@redhat.com>
+
+ PR tree-optimization/71272
+ * tree-ssa-threadbackward.c (convert_and_register_jump_thread_path):
+ Update comments. Add test for empty path.
+
2016-05-25 Bill Seurer <seurer@linux.vnet.ibm.com>
* config/rs6000/altivec.h (vec_cmpne): Add #define for vec_cmpne.
+2016-05-25 Jeff Law <law@redhat.com>
+
+ PR tree-optimization/71272
+ * gcc.c-torture/compile/pr71272.c: new test.
+
2016-05-25 Bill Seurer <seurer@linux.vnet.ibm.com>
* gcc.target/powerpc/vec-cmpne.c: New test.
{
basic_block bb1 = (*path)[path->length () - j - 1];
basic_block bb2 = (*path)[path->length () - j - 2];
+
+ /* This can happen when we have an SSA_NAME as a PHI argument and
+ its initialization block is the head of the PHI argument's
+ edge. */
if (bb1 == bb2)
continue;
jump_thread_path->safe_push (x);
}
+ /* As a consequence of the test for duplicate blocks in the path
+ above, we can get a path with no blocks. This happens if a
+ conditional can be fully evaluated at compile time using just
+ defining statements in the same block as the test.
+
+ When we no longer push the block associated with a PHI argument
+ onto the stack, then this as well as the test in the loop above
+ can be removed. */
+ if (jump_thread_path->length () == 0)
+ {
+ jump_thread_path->release ();
+ delete jump_thread_path;
+ path->pop ();
+ return;
+ }
+
/* Add the edge taken when the control variable has value ARG. */
jump_thread_edge *x
= new jump_thread_edge (taken_edge, EDGE_NO_COPY_SRC_BLOCK);