[PATCH] D49242: [Intrinsics] define funnel shift IR intrinsics + DAG builder support

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 13 11:58:28 PDT 2018


spatel updated this revision to Diff 155445.
spatel added a comment.

Patch updated:
Given the problems with the general funnel shift, I didn't bother to update the LangRef as suggested, but I (hopefully) fixed the translation to be safe, so we can see what that code and current codegen looks like.

We modulo both shift amounts now, and if it's not a rotate, we have to cmp/select the 0 case. I added tests for constant shifting by the bitwidth to verify that we're getting the expected output in those cases.


https://reviews.llvm.org/D49242

Files:
  docs/LangRef.rst
  include/llvm/IR/Intrinsics.td
  lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
  test/CodeGen/AArch64/funnel-shift.ll
  test/CodeGen/PowerPC/funnel-shift.ll
  test/CodeGen/X86/funnel-shift.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D49242.155445.patch
Type: text/x-patch
Size: 50387 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180713/97fc4c74/attachment-0001.bin>


More information about the llvm-commits mailing list