[PATCH] D126903: [clang] Add support for __builtin_memset_inline

Guillaume Chatelet via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 26 02:08:47 PDT 2022


gchatelet added a comment.

In D126903#3884873 <https://reviews.llvm.org/D126903#3884873>, @courbet wrote:

> I think there's a bug in the code though:
>
>   // If this is memset, we just need to see if the offset is valid in the size
>     // of the memset..
>     if (MI->getIntrinsicID() == Intrinsic::memset)
>
> should really be:
>
>   // If this is memset, we just need to see if the offset is valid in the size
>     // of the memset..
>     if (isa<MemSetInst>(MI))

Yes this seems a likely culprit <https://github.com/llvm/llvm-project/blob/a8b0f580170089fcd555ade5565ceff0ec60f609/llvm/lib/Transforms/Utils/VNCoercion.cpp#L357-L367>.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D126903



More information about the cfe-commits mailing list