xbolva00 added a comment. I am trying to do this in functionattrs but problem is that the call was sunk to the successor before the functionattrs ran and in the functionattrs we just go thru instruction of EntryBlock :/ https://reviews.llvm.org/D50039