From 4805ea975de0fd3b183b27324df1caa7ff29f887 Mon Sep 17 00:00:00 2001
From: Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
Date: Sat, 25 Jun 2016 11:52:57 +1000
Subject: [PATCH 2/7] Prevent setting __builtin_constant_p of param to null
before inlining in Early VRP
---
gcc/tree-vrp.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
@@ -3763,7 +3763,8 @@ extract_range_basic (value_range *vr, gimple *stmt)
arg = gimple_call_arg (stmt, 0);
if (TREE_CODE (arg) == SSA_NAME
&& SSA_NAME_IS_DEFAULT_DEF (arg)
- && TREE_CODE (SSA_NAME_VAR (arg)) == PARM_DECL)
+ && TREE_CODE (SSA_NAME_VAR (arg)) == PARM_DECL
+ && cfun->after_inlining)
{
set_value_range_to_null (vr, type);
return;
--
1.9.1