[PATCH] D114425: [clang] Add __builtin_bswap128

Craig Topper via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Jan 2 14:02:55 PST 2022


craig.topper added a comment.

In D114425#3216231 <https://reviews.llvm.org/D114425#3216231>, @philnik wrote:

> In D114425#3209794 <https://reviews.llvm.org/D114425#3209794>, @craig.topper wrote:
>
>> What does the builtin due if __int128 isn't supported? Even though the type isn't legal the builtin can still be called with a narrower type that would be implicitly converted. Does that work correctly?
>
> Would the correct behavior be to throw an error in that case? Or what exactly do you expect?

gcc only defines the builtin if __int128 is a supported type. It doesn't look like it generates an error, it just leaves it as call to an unknown function. I don't know how easy it is to do the same in clang.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D114425



More information about the cfe-commits mailing list