diff options
author | Chris Lattner <sabre@nondot.org> | 2008-05-24 03:59:33 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-05-24 03:59:33 +0000 |
commit | 5c207c83c6760a508c51271757c821144edcf3cb (patch) | |
tree | 9ddf516ce70944d90ff48a48a1a0f3b9a01152eb /llvm/lib/Transforms/Scalar/SCCP.cpp | |
parent | 91a2e56b065759eeffda3d27949f4aa9ad94a980 (diff) | |
download | bcm5719-llvm-5c207c83c6760a508c51271757c821144edcf3cb.tar.gz bcm5719-llvm-5c207c83c6760a508c51271757c821144edcf3cb.zip |
Fix PR2358 by resolving calls with undef arguments to overdefined.
llvm-svn: 51535
Diffstat (limited to 'llvm/lib/Transforms/Scalar/SCCP.cpp')
-rw-r--r-- | llvm/lib/Transforms/Scalar/SCCP.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Scalar/SCCP.cpp b/llvm/lib/Transforms/Scalar/SCCP.cpp index 79cda33f793..da715acd29b 100644 --- a/llvm/lib/Transforms/Scalar/SCCP.cpp +++ b/llvm/lib/Transforms/Scalar/SCCP.cpp @@ -1370,6 +1370,12 @@ bool SCCPSolver::ResolvedUndefsIn(Function &F) { else markOverdefined(LV, I); return true; + case Instruction::Call: + // If a call has an undef result, it is because it is constant foldable + // but one of the inputs was undef. Just force the result to + // overdefined. + markOverdefined(LV, I); + return true; } } |