[PATCH] D76140: [InlineFunction] update attributes during inlining

Anna Thomas via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 31 14:17:27 PDT 2020


anna reopened this revision.
anna added a comment.
This revision is now accepted and ready to land.

In D76140#1953201 <https://reviews.llvm.org/D76140#1953201>, @anna wrote:

> I got a failure in one of the binaryFormats:
>  lib/BinaryFormat/CMakeFiles/LLVMBinaryFormat.dir/MsgPackReader.cpp
>
>   Attributes 'zeroext and signext' are incompatible!
>     %rev.i.i.i.i.i.i.i.i = tail call signext zeroext i16 @llvm.bswap.i16(i16 %ret.0.copyload.i.i.i.i) #6
>   in function _ZN4llvm7msgpack6Reader7readIntIsEENS_8ExpectedIbEERNS0_6ObjectE
>   fatal error: error in backend: Broken function found, compilation aborted!
>
>
> I believe this just showcases undefined behaviour since we were having a returnValue (i.e. call) with an incomptable attribute compared to the return attribute on the callsite.


The last statement is not true. Had a discussion offline with Philip and he pointed out that we missed the fact that attributes such as `signext` and `zeroext` are part of the *call* itself. We cannot propagate these attributes into the callee since such attributes are part of the ABI for the call it is attached to. 
I'm reopening this review to fix this issue.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D76140





More information about the llvm-commits mailing list