summaryrefslogtreecommitdiff
path: root/gcc/trans-mem.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2018-11-15 13:44:34 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2018-11-15 13:44:34 +0000
commit0e02fb26381e7c8a4766eb0e29c325b5ef6917f9 (patch)
tree847f652b13c72a623572026c35b54afecacf9801 /gcc/trans-mem.c
parent22692f3ce9d00eac18d5582de90dda5ae5c07c77 (diff)
re PR tree-optimization/88029 (ICE in execute_todo, at passes.c:1974)
2018-11-15 Richard Biener <rguenther@suse.de> PR middle-end/88029 * gimple.c (gimple_call_flags): Union flags from decl, type and call fntype. * trans-mem.c (is_tm_pure_call): Simplify. * gcc.dg/tree-ssa/pr88029.c: New testcase. From-SVN: r266183
Diffstat (limited to 'gcc/trans-mem.c')
-rw-r--r--gcc/trans-mem.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/gcc/trans-mem.c b/gcc/trans-mem.c
index 938f4e28b90..bb7146bc153 100644
--- a/gcc/trans-mem.c
+++ b/gcc/trans-mem.c
@@ -265,20 +265,7 @@ is_tm_safe (const_tree x)
static bool
is_tm_pure_call (gimple *call)
{
- if (gimple_call_internal_p (call))
- return (gimple_call_flags (call) & (ECF_CONST | ECF_TM_PURE)) != 0;
-
- tree fn = gimple_call_fn (call);
-
- if (TREE_CODE (fn) == ADDR_EXPR)
- {
- fn = TREE_OPERAND (fn, 0);
- gcc_assert (TREE_CODE (fn) == FUNCTION_DECL);
- }
- else
- fn = TREE_TYPE (fn);
-
- return is_tm_pure (fn);
+ return (gimple_call_flags (call) & (ECF_CONST | ECF_TM_PURE)) != 0;
}
/* Return true if X has been marked TM_CALLABLE. */