The following fixes detecting of VEC_COND_EXPR <cmp, {0,..}, {-1,...}>
which we recognize in ovce_extract_ops by inverting 'cmp'. But
after checking that the false value is {-1,...} we then continue
verifying it is also {0,...} which it of course is not. Fixed
by checking the true value in that case.
Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed to trunk.
Richard.
* tree-ssa-reassoc.cc (ovce_extract_ops): Fixup
false value matching for the inverted comparison case.
---
gcc/tree-ssa-reassoc.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/tree-ssa-reassoc.cc b/gcc/tree-ssa-reassoc.cc
index 924742878ea..dec64883891 100644
--- a/gcc/tree-ssa-reassoc.cc
+++ b/gcc/tree-ssa-reassoc.cc
@@ -4207,7 +4207,7 @@ ovce_extract_ops (tree var, gassign **rets, bool *reti,
tree *type,
}
else
return ERROR_MARK;
- if (!integer_zerop (f))
+ if (!integer_zerop (inv ? t : f))
return ERROR_MARK;
/* Success! */
--
2.51.0