On Friday 05 June 2009 15:19, Dan Gohman wrote:> > Do we need two intrinsics for these scalar converts, one to satisfy > > the > > (arguably broken) GCC interface and one to really reflect the > > operation > > as specified by the ISA? > > That's what's done for most other instructions, unfortunately. > For cvtsd2si, there's currently no "normal" version in the tree, > but if you add one, it wouldn't be alone.Ok.> One thing we'd like to do at some point is have front-ends lower > intrinsics for scalar instructions into > extractelement+op+insertelement, so that we don't need two > versions of each of the instructions. Doing this for everything > will require some work to make sure that the extra insert/extract > operators don't incur unnecessary copying, but that's also > something we'd like to do regardless.So then how does one do a memop intrinsic? Does it mean we can't match to the memop versions of instructions? -Dave
On Jun 5, 2009, at 3:16 PM, David Greene wrote:> On Friday 05 June 2009 15:19, Dan Gohman wrote: > >> One thing we'd like to do at some point is have front-ends lower >> intrinsics for scalar instructions into >> extractelement+op+insertelement, so that we don't need two >> versions of each of the instructions. Doing this for everything >> will require some work to make sure that the extra insert/extract >> operators don't incur unnecessary copying, but that's also >> something we'd like to do regardless. > > So then how does one do a memop intrinsic? Does it mean we can't > match to the memop versions of instructions?Memory operands would be lowered to explicit loads and stores, which would be pattern-matched into memop instructions by instruction selection. Dan
On Friday 05 June 2009 17:41, Dan Gohman wrote:> On Jun 5, 2009, at 3:16 PM, David Greene wrote: > > On Friday 05 June 2009 15:19, Dan Gohman wrote: > >> One thing we'd like to do at some point is have front-ends lower > >> intrinsics for scalar instructions into > >> extractelement+op+insertelement, so that we don't need two > >> versions of each of the instructions. Doing this for everything > >> will require some work to make sure that the extra insert/extract > >> operators don't incur unnecessary copying, but that's also > >> something we'd like to do regardless. > > > > So then how does one do a memop intrinsic? Does it mean we can't > > match to the memop versions of instructions? > > Memory operands would be lowered to explicit loads and stores, > which would be pattern-matched into memop instructions by > instruction selection.Ok, that'd be cool. :) -Dave