[llvm-dev] [GlobalISel] G_LOAD/G_STORE i64/f64 handling

Quentin Colombet via llvm-dev llvm-dev at lists.llvm.org
Wed Jul 5 09:14:26 PDT 2017


> On Jul 3, 2017, at 1:51 PM, Francois Pichet via llvm-dev <llvm-dev at lists.llvm.org> wrote:
> 
> 
> 
> On Mon, Jul 3, 2017 at 4:28 PM, Friedman, Eli via llvm-dev <llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org>> wrote:
> On 7/2/2017 3:50 AM, Breger, Igor via llvm-dev wrote:
>> 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?
>> 
>>  
>> 
> 
> 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.
> 
> 
> 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 :).


> 
>  
> 
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org>
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev <http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170705/55a76f79/attachment.html>


More information about the llvm-dev mailing list