OSDN Git Service

[SCCP] Don't delete side-effecting instructions
authorSanjoy Das <sanjoy@playingwithpointers.com>
Wed, 24 Aug 2016 18:10:21 +0000 (18:10 +0000)
committerSanjoy Das <sanjoy@playingwithpointers.com>
Wed, 24 Aug 2016 18:10:21 +0000 (18:10 +0000)
commit09f0b3c147a9887f29c49745c25253a662f0cee7
treed69e392aef27f97501a445946ff51a05178fe65e
parentaa06e492259ae1227100f659ce510ea3588d777b
[SCCP] Don't delete side-effecting instructions

I'm not sure if the `!isa<CallInst>(Inst) &&
!isa<TerminatorInst>(Inst))` bit is correct either, but this fixes the
case we know is broken.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279647 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/SCCP.cpp
test/Transforms/SCCP/calltest.ll