[PATCH] D6407: [InstCombine] Minor optimization for bswap with binary ops

Robin Lindner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 14 01:04:32 PDT 2022


deeprobin added a comment.

In D6407#3377819 <https://reviews.llvm.org/D6407#3377819>, @lebedev.ri wrote:

> In D6407#3377769 <https://reviews.llvm.org/D6407#3377769>, @deeprobin wrote:
>
>> @xbolva00 @RKSimon
>>
>>> 8 year old patch…
>>
>> Yes I would be interested in the real-world case behind this.
>>
>>>>> No developer will …
>>>
>>> Very strong words :D
>>
>> The question is whether this is a niche optimization or whether there is some common code pattern that justifies that this is not a niche optimization.
>
> Perhaps it would be more productive to approach this from another angle - what prompted you to bring this up?

I generally have different scenarios in C# (even rare ones) and came up with that the .NET runtime does not optimize duplicate bswaps.
In the runtime niche optimizations are done rather rarely, so I wanted to see for what reason LLVM has this built in.

See https://github.com/dotnet/runtime/issues/66249


Repository:
  rL LLVM

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

https://reviews.llvm.org/D6407



More information about the llvm-commits mailing list