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)
commitbc8114f73339f49619dc1b4c016ccbf6f9ca0082
treeef8733834f6f21080a242c307b2b9ab40c42dfde
parentdc9e73b4f8cca3a96149a18a3ae09f6e1da9d3c8
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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221802 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/IPA/CallGraphSCCPass.cpp
test/Transforms/InstCombine/no_cgscc_assert.ll [new file with mode: 0644]