2018-08-23 Richard Biener <rguenther@suse.de>
PR middle-end/87024
* tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
calls.
* gcc.dg/pr87024.c: New testcase.
From-SVN: r263805
+2018-08-23 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/87024
+ * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
+ calls.
+
2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
* config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
+2018-08-23 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/87024
+ * gcc.dg/pr87024.c: New testcase.
+
2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
* gcc.dg/vect/no-vfa-vect-depend-2.c: Remove XFAIL.
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-O -fno-tree-dce" } */
+
+static inline void __attribute__((always_inline))
+mp ()
+{
+ (void) __builtin_va_arg_pack_len ();
+}
+
+void
+ui (void)
+{
+ mp ();
+}
for (p = DECL_ARGUMENTS (id->src_fn); p; p = DECL_CHAIN (p))
nargs--;
- if (!gimple_call_va_arg_pack_p (id->call_stmt))
+ if (!gimple_call_lhs (stmt))
+ {
+ /* Drop unused calls. */
+ gsi_remove (©_gsi, false);
+ continue;
+ }
+ else if (!gimple_call_va_arg_pack_p (id->call_stmt))
{
count = build_int_cst (integer_type_node, nargs);
new_stmt = gimple_build_assign (gimple_call_lhs (stmt), count);