+2016-09-21 Kugan Vivekanandarajah <kuganv@linaro.org>
+
+ * tree-vrp.c (get_value_range): Teach PARM_DECL to use ipa-vrp
+ results.
+
2016-09-21 Kugan Vivekanandarajah <kuganv@linaro.org>
* common.opt: New option -fipa-vrp.
+2016-09-21 Kugan Vivekanandarajah <kuganv@linaro.org>
+
+ * gcc.dg/guality/pr54519-1.c: Add -fno-ipa-vrp. Else constant
+ arguments/compare will be optimized away.
+ * gcc.dg/torture/ftrapv-1.c: Likewise.
+
2016-09-21 Kugan Vivekanandarajah <kuganv@linaro.org>
* g++.dg/ipa/pure-const-3.C: Add -fno-ipa-vrp. Else constant arguments
/* PR debug/54519 */
/* { dg-do run } */
-/* { dg-options "-g" } */
+/* { dg-options "-g -fno-ipa-vrp" } */
__attribute__((noinline, noclone)) void
fn1 (int x)
/* { dg-do run } */
-/* { dg-additional-options "-ftrapv" } */
+/* { dg-additional-options "-ftrapv -fno-ipa-vrp" } */
/* { dg-require-effective-target trapping } */
/* { dg-require-fork "" } */
if (POINTER_TYPE_P (TREE_TYPE (sym))
&& nonnull_arg_p (sym))
set_value_range_to_nonnull (vr, TREE_TYPE (sym));
+ else if (INTEGRAL_TYPE_P (TREE_TYPE (sym)))
+ {
+ wide_int min, max;
+ value_range_type rtype = get_range_info (var, &min, &max);
+ if (rtype == VR_RANGE || rtype == VR_ANTI_RANGE)
+ set_value_range (vr, rtype,
+ wide_int_to_tree (TREE_TYPE (var), min),
+ wide_int_to_tree (TREE_TYPE (var), max),
+ NULL);
+ else
+ set_value_range_to_varying (vr);
+ }
else
set_value_range_to_varying (vr);
}