This does not seem like the right fix. What is isSafeToSpeculativelyExecute checking that C->canTrap is not checking? I'd think that fixing C->canTrap is the right way to address this problem. http://reviews.llvm.org/D5459