[PATCH] D86430: [SelectionDAG] Fix miscompile bug in expandFunnelShift
Bjorn Pettersson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 24 00:49:10 PDT 2020
bjope added a comment.
In D86430#2232959 <https://reviews.llvm.org/D86430#2232959>, @foad wrote:
> 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.
Exactly, I did not have any test case where the benefit was shown. I could have spent some time on trying to create one, but no idea if it is likely to happen for real application code.
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