[PATCH] [SLPVectorizer] Reorder operands of shufflevector if it can result in a vectorized code.

Karthik Bhat kv.bhat at samsung.com
Sun Jan 11 22:12:29 PST 2015


Hi Michael,
One small update in the patch. I was not handling case were we have right operand as load and left as some other binary operation in case of reorderAltShuffleOperands as a result we were not vectorizing code such as -

  void foo(double* c,double* restrict a,double* restrict b,double* restrict d) {
    c[0] = (a[0] + b[0])-d[0];
    c[1] = d[1]+(a[1]+b[1]);
  }

This is fixed with this updated patch. This is not required in reorderInputsAccordingToOpcode as it is already handled while we sort as per the opcode.
Please let me know your inputs on the same.

Thanks
Karthik Bhat


REPOSITORY
  rL LLVM

http://reviews.llvm.org/D6677

Files:
  lib/Transforms/Vectorize/SLPVectorizer.cpp
  test/Transforms/SLPVectorizer/X86/addsub.ll
  test/Transforms/SLPVectorizer/X86/operandorder.ll

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D6677.18005.patch
Type: text/x-patch
Size: 20764 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150112/8e821671/attachment.bin>


More information about the llvm-commits mailing list