+2018-12-03 Ilya Leoshkevich <iii@linux.ibm.com>
+
+ PR target/80080
+ * cfgcleanup.c (class pass_postreload_jump): New pass.
+ (pass_postreload_jump::execute): Likewise.
+ (make_pass_postreload_jump): Likewise.
+ * passes.def: Add pass_postreload_jump before
+ pass_postreload_cse.
+ * tree-pass.h (make_pass_postreload_jump): New pass.
+
2018-12-02 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.c (inline_memory_move_cost): Correctly
\f
namespace {
+const pass_data pass_data_postreload_jump =
+{
+ RTL_PASS, /* type */
+ "postreload_jump", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
+ TV_JUMP, /* tv_id */
+ 0, /* properties_required */
+ 0, /* properties_provided */
+ 0, /* properties_destroyed */
+ 0, /* todo_flags_start */
+ 0, /* todo_flags_finish */
+};
+
+class pass_postreload_jump : public rtl_opt_pass
+{
+public:
+ pass_postreload_jump (gcc::context *ctxt)
+ : rtl_opt_pass (pass_data_postreload_jump, ctxt)
+ {}
+
+ /* opt_pass methods: */
+ virtual unsigned int execute (function *);
+
+}; // class pass_postreload_jump
+
+unsigned int
+pass_postreload_jump::execute (function *)
+{
+ cleanup_cfg (flag_thread_jumps ? CLEANUP_THREADING : 0);
+ return 0;
+}
+
+} // anon namespace
+
+rtl_opt_pass *
+make_pass_postreload_jump (gcc::context *ctxt)
+{
+ return new pass_postreload_jump (ctxt);
+}
+
+namespace {
+
const pass_data pass_data_jump2 =
{
RTL_PASS, /* type */
NEXT_PASS (pass_reload);
NEXT_PASS (pass_postreload);
PUSH_INSERT_PASSES_WITHIN (pass_postreload)
+ NEXT_PASS (pass_postreload_jump);
NEXT_PASS (pass_postreload_cse);
NEXT_PASS (pass_gcse2);
NEXT_PASS (pass_split_after_reload);
+2018-12-03 Ilya Leoshkevich <iii@linux.ibm.com>
+
+ PR target/80080
+ * gcc.target/s390/pr80080-4.c: New test.
+
2018-12-02 Andi Kleen <ak@linux.intel.com>
* gcc.target/i386/returninst1.c: Run on 64bit only.
--- /dev/null
+/* { dg-do compile { target { lp64 } } } */
+/* { dg-options "-march=z196 -O2" } */
+
+extern void bar(int *mem);
+
+void foo4(int *mem)
+{
+ int oldval = 0;
+ if (!__atomic_compare_exchange_n (mem, (void *) &oldval, 1,
+ 1, __ATOMIC_ACQUIRE, __ATOMIC_RELAXED))
+ {
+ bar (mem);
+ }
+}
+
+/* { dg-final { scan-assembler {(?n)\n\tlt\t.*\n\tjne\t(\.L\d+)\n(.*\n)*\tcs\t.*\n\tber\t%r14\n\1:\n\tjg\tbar\n} } } */
extern rtl_opt_pass *make_pass_branch_prob (gcc::context *ctxt);
extern rtl_opt_pass *make_pass_value_profile_transformations (gcc::context
*ctxt);
+extern rtl_opt_pass *make_pass_postreload_jump (gcc::context *ctxt);
extern rtl_opt_pass *make_pass_postreload_cse (gcc::context *ctxt);
extern rtl_opt_pass *make_pass_gcse2 (gcc::context *ctxt);
extern rtl_opt_pass *make_pass_split_after_reload (gcc::context *ctxt);