CGSCC should not treat intrinsic calls like function calls (PR21403)
authorSanjay Patel <spatel@rotateright.com>
Wed, 12 Nov 2014 18:25:47 +0000 (18:25 +0000)
committerSanjay Patel <spatel@rotateright.com>
Wed, 12 Nov 2014 18:25:47 +0000 (18:25 +0000)
commit4c219fd248e9e07dd884642dab6c579cfaf65fe6
tree4645c8724042f86d8ac4181d8a2fec64b84d0e2a
parenta41cf018b896f05e78ba1c5a711edd8c1e59ad8d
CGSCC should not treat intrinsic calls like function calls (PR21403)

Make the handling of calls to intrinsics in CGSCC consistent:
they are not treated like regular function calls because they
are never lowered to function calls.

Without this patch, we can get dangling pointer asserts from
the subsequent loop that processes callsites because it already
ignores intrinsics.

See http://llvm.org/bugs/show_bug.cgi?id=21403 for more details / discussion.

Differential Revision: http://reviews.llvm.org/D6124

llvm-svn: 221802
llvm/lib/Analysis/IPA/CallGraphSCCPass.cpp
llvm/test/Transforms/InstCombine/no_cgscc_assert.ll [new file with mode: 0644]