diff mbox series

[committed] Fix ICE on scan* OpenMP tests on various targets (PR tree-optimization/91074)

Message ID 20190704045845.GE815@tucnak
State New
Headers show
Series [committed] Fix ICE on scan* OpenMP tests on various targets (PR tree-optimization/91074) | expand

Commit Message

Jakub Jelinek July 4, 2019, 4:58 a.m. UTC
Hi!

In this case we create
  temp = .MUL_OVERFLOW (arg1, arg2);
  temp2 = REALPART_EXPR <temp>;
  temp3 = IMAGPART_EXPR <temp>;
x86 has been happy in the testing even without the following patch,
though temp hasn't been rewritten into SSA, but on various other targets
the expansion assumes that .???_OVERFLOW result must be a SSA_NAME.

Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux,
committed to trunk.

2019-07-04  Jakub Jelinek  <jakub@redhat.com>

	PR tree-optimization/91074
	* omp-low.c (lower_omp_for_scan): Set DECL_GIMPLE_REG_P on cplx
	temporary.


	Jakub
diff mbox series

Patch

--- gcc/omp-low.c.jj	2019-07-03 07:02:16.460989884 +0200
+++ gcc/omp-low.c	2019-07-03 16:59:25.819391742 +0200
@@ -9699,6 +9699,7 @@  lower_omp_for_scan (gimple_seq *body_p,
   gimple_seq_add_stmt (body_p, g);
 
   tree cplx = create_tmp_var (build_complex_type (unsigned_type_node, false));
+  DECL_GIMPLE_REG_P (cplx) = 1;
   g = gimple_build_call_internal (IFN_MUL_OVERFLOW, 2, thread_nump1, twok);
   gimple_call_set_lhs (g, cplx);
   gimple_seq_add_stmt (body_p, g);