https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64412

--- Comment #4 from iverbin at gcc dot gnu.org ---
(In reply to H.J. Lu from comment #3)
> (In reply to iverbin from comment #2)
> > (In reply to H.J. Lu from comment #1)
> > > (In reply to iverbin from comment #0)
> > > > To reproduce using Intel Xeon Phi emulation:
> > > > 1. Build offload and host compilers as described in
> > > > https://gcc.gnu.org/wiki/Offloading#How_to_try_offloading_enabled_GCC
> > > > 2. Run make check-target-libgomp RUNTESTFLAGS="c.exp=e.53.5.c"
> > > 
> > > Can you create a stanalone testcase for the Intel Xeon Phi offload
> > > cross compiler?  It will be easier to debug.
> > 
> > The offload model in GCC implies 2 compilers: one produces IR for OpenMP
> > target regions, and another compiles this IR for Intel Xeon Phi.
> > There is no single compiler, which could stream offload IR out, then stream
> > it in, and then compile.
> > I can reduce e.53.5.c testcase, not sure whether this is helpful.
> 
> Can you use "gcc -v -save-temps" to see what is passed to the offload
> compiler and feed them to the offload compiler directly?

Yes, this is possible.
However, the function preload_common_nodes, modified in r218767, is used for
both IN/OUT streaming, therefore the IR should be produced and consumed by
compilers built from the same sources.

Here are the reduced testcase and corresponding IR for: gcc -fopenmp -O1 -S
pr64412.c

To reproduce the error:
1. Configure and make gcc with:
--enable-as-accelerator-for=x86_64-unknown-linux
--host=x86_64-intelmicemul-linux --build=x86_64-intelmicemul-linux
--target=x86_64-intelmicemul-linux
2. Run: as pr64412.s -o pr64412.o &&
x86_64-unknown-linux-accel-x86_64-intelmicemul-linux-gnu-gcc -xlto -fopenmp -O1
-shared -fPIC pr64412.o

Reply via email to