llvm-6502/lib/Transforms/Scalar
David Majnemer 5a57dbef33 IndVarSimplify: check if loop invariant expansion can trap
IndVarSimplify is willing to move divide instructions outside of their
loop bodies if they are invariant of the loop.  However, it may not be
safe to expand them if we do not know if they can trap.

Instead, check to see if it is not safe to expand the instruction and
skip the expansion.

This fixes PR16041.

Testcase by Rafael Ávila de Espíndola.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183239 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-04 17:51:58 +00:00
..
ADCE.cpp
BasicBlockPlacement.cpp
CMakeLists.txt
CodeGenPrepare.cpp
ConstantProp.cpp
CorrelatedValuePropagation.cpp
DCE.cpp
DeadStoreElimination.cpp
EarlyCSE.cpp
GlobalMerge.cpp
GVN.cpp
IndVarSimplify.cpp IndVarSimplify: check if loop invariant expansion can trap 2013-06-04 17:51:58 +00:00
JumpThreading.cpp
LICM.cpp
LLVMBuild.txt
LoopDeletion.cpp
LoopIdiomRecognize.cpp
LoopInstSimplify.cpp
LoopRotation.cpp
LoopStrengthReduce.cpp Loop Strength Reduce: Scaling factor cost. 2013-05-31 21:29:03 +00:00
LoopUnrollPass.cpp
LoopUnswitch.cpp
LowerAtomic.cpp
Makefile
MemCpyOptimizer.cpp
Reassociate.cpp
Reg2Mem.cpp
Scalar.cpp
ScalarReplAggregates.cpp
SCCP.cpp
SimplifyCFGPass.cpp
SimplifyLibCalls.cpp
Sink.cpp
SROA.cpp
TailRecursionElimination.cpp