aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/Local.cpp
diff options
context:
space:
mode:
authorPeter Waller <peter.waller@arm.com>2021-10-13 15:13:56 +0000
committerPeter Waller <peter.waller@arm.com>2021-10-18 11:00:01 +0000
commitc4603a8a4384d36d23fd284689b453b9927541be (patch)
tree6fae5e118469810647fb600ae57c94b872973d31 /llvm/lib/Transforms/Utils/Local.cpp
parentd55db4b033f037d60489a145ab3fdd0a0ce3a389 (diff)
downloadllvm-c4603a8a4384d36d23fd284689b453b9927541be.zip
llvm-c4603a8a4384d36d23fd284689b453b9927541be.tar.gz
llvm-c4603a8a4384d36d23fd284689b453b9927541be.tar.bz2
[InstCombine][DebugInfo] Remove superflous assertion, add test
When this code was added, an unnecessary assertion slipped in which we now hit in real code. Add a test to defend against it firing again.
Diffstat (limited to 'llvm/lib/Transforms/Utils/Local.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/Local.cpp2
1 files changed, 0 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Utils/Local.cpp b/llvm/lib/Transforms/Utils/Local.cpp
index 122977c..3e36f49 100644
--- a/llvm/lib/Transforms/Utils/Local.cpp
+++ b/llvm/lib/Transforms/Utils/Local.cpp
@@ -1413,8 +1413,6 @@ static bool valueCoversEntireFragment(Type *ValTy, DbgVariableIntrinsic *DII) {
if (auto *AI =
dyn_cast_or_null<AllocaInst>(DII->getVariableLocationOp(0))) {
if (Optional<TypeSize> FragmentSize = AI->getAllocationSizeInBits(DL)) {
- assert(ValueSize.isScalable() == FragmentSize->isScalable() &&
- "Both sizes should agree on the scalable flag.");
return TypeSize::isKnownGE(ValueSize, *FragmentSize);
}
}