[PATCH] D86430: [SelectionDAG] Fix miscompile bug in expandFunnelShift

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 24 00:46:28 PDT 2020


foad accepted this revision.
foad added a comment.
This revision is now accepted and ready to land.

In D86430#2232951 <https://reviews.llvm.org/D86430#2232951>, @foad wrote:

>> It could be possible to add back the transform, given that logic
>> is added to check that (Z % BW) can't be zero. Since there were
>> no test cases proving that such a transform actually would be useful
>> I decided to simply remove the faulty code in this patch.
>
> I don't understand this. The AMDGPU test changes clearly show that the transform is useful. AMDGPU has an alignbit instruction which is fshr, but no instruction for fshl.

Oh I see, I guess you mean that the check for non-zero Z didn't help any of these test cases, because none of them use a shift amount that is known to be non-zero.

OK then. I can try to fix the AMDGPU regressions as a follow up, maybe with a target-specific lowering.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D86430



More information about the llvm-commits mailing list