Breger, Igor via llvm-dev
2017-Jul-02 10:50 UTC
[llvm-dev] [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 --------------------------------------------------------------------- Intel Israel (74) Limited This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170702/88f190e1/attachment.html>
Friedman, Eli via llvm-dev
2017-Jul-03 20:28 UTC
[llvm-dev] [GlobalISel] G_LOAD/G_STORE i64/f64 handling
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. -Eli -- Employee of Qualcomm Innovation Center, Inc. Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170703/4667581b/attachment.html>
Francois Pichet via llvm-dev
2017-Jul-03 20:51 UTC
[llvm-dev] [GlobalISel] G_LOAD/G_STORE i64/f64 handling
On Mon, Jul 3, 2017 at 4:28 PM, Friedman, Eli via llvm-dev < 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? -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170703/682ccc16/attachment.html>