[GlobalISel] G_LOAD/G_STORE i64/f64 handling

Hi all,

I am working on enabling X86 using GLobalIsel framework.

I have 32bit platform + float/double configuration (-mtriple=i386-linux-gnu -mattr=+sse2 )

load i64, i64* %p1 - illegal, require narrowScalar action

load double, double * %p1 - legal

What is the best approach to Legalize this case ? Should I mark G_LOAD/G_STORE s64 as Custom?

Regards,

Igor Breger

In the world of GlobalISel, i64 and double are both s64, so “load i64” and “load double” are the same operation; if one is Legal, both are Legal. This should just work, barring any bugs. The resulting code will probably be low-quality because there isn’t any good way to lower the resulting transfers between SSE and integer registers, but you can put off dealing with that for now. -Eli

Ok but for 32-bit target, will GlobalISel handle the splitting of
i64/double on 2 32-bit registers automatically like the SelectionDAG is
currently doing?

Yes, it should.
If it does not, it should be fixed :).