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 | 60301608f8fac2e476db250797b533bbe415b404 (patch) | |
tree | 37f9b087fc0108200daa4b94472226a1800cd165 /lib/Transforms | |
parent | a31593901de573813d1d8e7884a152011641a713 (diff) |
Fix PR2358 by resolving calls with undef arguments to overdefined.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51535 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
-rw-r--r-- | lib/Transforms/Scalar/SCCP.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Transforms/Scalar/SCCP.cpp b/lib/Transforms/Scalar/SCCP.cpp index 79cda33f79..da715acd29 100644 --- a/lib/Transforms/Scalar/SCCP.cpp +++ b/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; } } |