[PATCH] D112870: [MergeFunctions] Don't merge functions that use @llvm.type.checked.load instrinsics

Peter Collingbourne via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Oct 30 08:50:30 PDT 2021


pcc added a comment.

In D112870#3098512 <https://reviews.llvm.org/D112870#3098512>, @kubamracek wrote:

>> Shouldn't this be fixed in FunctionComparator?
>
> So that's certainly the right question here. Should it? To me it looks like FunctionComparator is ignoring metadata attachments *on purpose*, and that fits the contract of "determine whether 2 functions will generate machine code with the same behavior".

I think FunctionComparator should be fixed, as the metadata arguments do influence the machine code here (presumably it was assumed that these arguments would only appear on debug intrinsics, where they indeed would not be expected to affect the machine code). Note that the same issue affects llvm.type.test.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D112870



More information about the llvm-commits mailing list