[PATCH] D55747: [SelectionDAGBuilder] Enable funnel shift building to custom rotates

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 17 14:32:18 PST 2018


spatel added inline comments.


================
Comment at: lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:5765-5766
     if (X == Y && isPowerOf2_32(VT.getScalarSizeInBits())) {
       // TODO: This should also be done if the operation is custom, but we have
       // to make sure targets are handling the modulo shift amount as expected.
       auto RotateOpcode = IsFSHL ? ISD::ROTL : ISD::ROTR;
----------------
Can remove the TODO comment with this change.


================
Comment at: test/CodeGen/X86/funnel-shift-rot.ll:94-96
 ; Vector rotate.
 
 define <4 x i32> @rotl_v4i32(<4 x i32> %x, <4 x i32> %z) nounwind {
----------------
Is it worth repeating some of the code comments here to describe how this works? 
Shouldn't we have coverage for v8i16 and 256/512-bit custom types?


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55747/new/

https://reviews.llvm.org/D55747





More information about the llvm-commits mailing list