Bug 89302 - libgomp.c-c++-common/for-11.c fails when offloaded to HSA
Summary: libgomp.c-c++-common/for-11.c fails when offloaded to HSA
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: hsa (show other bugs)
Version: 9.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-02-12 10:21 UTC by Martin Jambor
Modified: 2019-02-21 12:20 UTC (History)
1 user (show)

See Also:
Host:
Target: hsa
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Jambor 2019-02-12 10:21:43 UTC
I can see the following two libgomp failures when the testsuite is run
on an HSA-capable machine and HSA offloading is enabled.

  libgomp.c/../libgomp.c-c++-common/for-11.c execution test
  libgomp.c++/../libgomp.c-c++-common/for-11.c execution test

The reason is that gridification cannot cope with != operator in
OpenMP loops.  A fix has been proposed on the mailing list:

  https://gcc.gnu.org/ml/gcc-patches/2019-02/msg00105.html
Comment 1 Martin Jambor 2019-02-21 11:01:21 UTC
Author: jamborm
Date: Thu Feb 21 11:00:47 2019
New Revision: 269066

URL: https://gcc.gnu.org/viewcvs?rev=269066&root=gcc&view=rev
Log:
[omp] Move NE_EXPR handling to omp_adjust_for_condition

2019-02-21  Martin Jambor  <mjambor@suse.cz>

	PR hsa/89302
	* omp-general.c (omp_extract_for_data): Removed a duplicate call
	to omp_adjust_for_condition, moved NE_EXPR code_cond processing...
	(omp_adjust_for_condition): ...here.  Added necessary parameters.
	* omp-general.h (omp_adjust_for_condition): Updated declaration.
	* omp-grid.c (grid_attempt_target_gridification): Adjust to pass
	proper values to new parameters of omp_adjust_for_condition.



Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/omp-general.c
    trunk/gcc/omp-general.h
    trunk/gcc/omp-grid.c
Comment 2 Martin Jambor 2019-02-21 12:20:17 UTC
Fixed.