diff options
| -rw-r--r-- | llvm/lib/Transforms/Scalar/SCCP.cpp | 3 | ||||
| -rw-r--r-- | llvm/test/Transforms/ConstProp/shift.ll | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Scalar/SCCP.cpp b/llvm/lib/Transforms/Scalar/SCCP.cpp index 75414ef3864..49748ff4c43 100644 --- a/llvm/lib/Transforms/Scalar/SCCP.cpp +++ b/llvm/lib/Transforms/Scalar/SCCP.cpp @@ -1331,6 +1331,9 @@ bool SCCPSolver::ResolvedUndefsIn(Function &F) { } Op1LV = getValueState(I.getOperand(1)); + + if (!Op0LV.isUndefined() && !Op1LV.isUndefined()) + break; } // If this is an instructions whose result is defined even if the input is // not fully defined, propagate the information. diff --git a/llvm/test/Transforms/ConstProp/shift.ll b/llvm/test/Transforms/ConstProp/shift.ll index de23fe98ad8..91027096dd5 100644 --- a/llvm/test/Transforms/ConstProp/shift.ll +++ b/llvm/test/Transforms/ConstProp/shift.ll @@ -1,4 +1,5 @@ ; RUN: opt < %s -constprop -S | FileCheck %s +; RUN: opt < %s -sccp -S | FileCheck %s ; CHECK-LABEL: shift_undef_64 define void @shift_undef_64(i64* %p) { |

