[GlobalOpt] don't change CC of musttail calle(e|r)
authorJonas Devlieghere <jonas@devlieghere.com>
Wed, 28 Feb 2018 22:28:44 +0000 (22:28 +0000)
committerJonas Devlieghere <jonas@devlieghere.com>
Wed, 28 Feb 2018 22:28:44 +0000 (22:28 +0000)
commit9ca064552a7c38798f763b64113ae74bf04a0b23
treeddacc5d6408cb548819a97df200a62f102ea66b5
parente31b9d1e5f1af55e4eea4826a91b8a0c5f6ec71d
[GlobalOpt] don't change CC of musttail calle(e|r)

When the function has musttail call - its cc is fixed to be equal to the
cc of the musttail callee. In such case (and in the case of the musttail
callee), GlobalOpt should not change the cc to fastcc as it will break
the invariant.

This fixes PR36546

Patch by: Fedor Indutny (indutny)

Differential revision: https://reviews.llvm.org/D43859

llvm-svn: 326376
llvm/lib/Transforms/IPO/GlobalOpt.cpp
llvm/test/Transforms/GlobalOpt/musttail_cc.ll [new file with mode: 0644]