[PATCH] Add intrinsic definitions for unary op AVX instructions [x86]

Sanjay Patel spatel at rotateright.com
Tue Jan 13 16:14:48 PST 2015


Hi Craig -

Thank you for looking at this. I was hoping to solve PR21507 using patterns like this:

  def : Pat<(v4f32 (X86Blendi (v4f32 VR128:$dst), (int_x86_sse_rcp_ss VR128:$src), (i8 1))),
            (VRCPSSr_Int VR128:$dst, VR128:$src)>;

I thought that would be similar to the existing patterns used for binops in this file.

Do you think it would better to not create these new defs and just write out the patterns using COPY_TO_REGCLASSes instead? Eg:

  def : Pat<(v4f32 (X86Blendi (v4f32 VR128:$dst), (int_x86_sse_rcp_ss VR128:$src), (i8 1))),
            (COPY_TO_REGCLASS (VRCPSSr (COPY_TO_REGCLASS VR128:$dst, FR32), (COPY_TO_REGCLASS VR128:$src, FR32)), VR128)>;


http://reviews.llvm.org/D6958

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list