[LLVMdev] SSE Scalar Convert Intrinsics

Eli Friedman eli.friedman at gmail.com
Fri Jun 5 13:22:31 PDT 2009


On Fri, Jun 5, 2009 at 8:51 AM, David Greene<dag at cray.com> wrote:
> def Int_CVTSD2SIrm : SDI<0x2D, MRMSrcMem, (outs GR32:$dst), (ins f128mem:
> $src),
>                         "cvtsd2si\t{$src, $dst|$dst, $src}",
>                         [(set GR32:$dst, (int_x86_sse2_cvtsd2si
>                                           (load addr:$src)))]>;
>
> Er, this makes us load a 128-bit quantity, which is almost certainly not
> what we want.

I agree, that doesn't look right.

> 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.

-Eli




More information about the llvm-dev mailing list