On Friday 05 June 2009 15:22, Eli Friedman 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? > > We really need zero intrinsics... it's quite easy to map onto existing > LLVM instructions. See the definition of CVTSD2SIrm.In some cases, yes. But not all of the X86 instructions are accessible through LLVM IR. And sometimes we like the ability to have our frontend lower to intrinsics so we know EXACTLY what code will come out the other end. And see my previous post about sint_to_fp with a memory operand not working in TableGen ("TableGen Type Inference"). I'll be debugging that next week, probably. -Dave
On Fri, Jun 5, 2009 at 3:19 PM, David Greene<dag at cray.com> wrote:> On Friday 05 June 2009 15:22, Eli Friedman 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? >> >> We really need zero intrinsics... it's quite easy to map onto existing >> LLVM instructions. See the definition of CVTSD2SIrm. > > In some cases, yes. But not all of the X86 instructions are accessible > through LLVM IR.Like this one :) Sorry, I was confusing it with CVTTSD2SIrm. -Eli
On Friday 05 June 2009 17:48, Eli Friedman wrote:> > In some cases, yes. But not all of the X86 instructions are accessible > > through LLVM IR. > > Like this one :) Sorry, I was confusing it with CVTTSD2SIrm.It happens. :) Stupid Intel mnemonics... -Dave