[llvm] d64ad3f - GlobalISel: Don't check for verifier enforced constraint
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 19 11:15:47 PDT 2020
Author: Matt Arsenault
Date: 2020-08-19T14:15:38-04:00
New Revision: d64ad3f0516a5d539080e594f16204cd2dfd6621
URL: https://github.com/llvm/llvm-project/commit/d64ad3f0516a5d539080e594f16204cd2dfd6621
DIFF: https://github.com/llvm/llvm-project/commit/d64ad3f0516a5d539080e594f16204cd2dfd6621.diff
LOG: GlobalISel: Don't check for verifier enforced constraint
Loads are always required to have a single memory operand.
Added:
Modified:
llvm/lib/CodeGen/GlobalISel/GISelKnownBits.cpp
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/GlobalISel/GISelKnownBits.cpp b/llvm/lib/CodeGen/GlobalISel/GISelKnownBits.cpp
index e5d77b0eb857..9af8e11d0a41 100644
--- a/llvm/lib/CodeGen/GlobalISel/GISelKnownBits.cpp
+++ b/llvm/lib/CodeGen/GlobalISel/GISelKnownBits.cpp
@@ -320,18 +320,16 @@ void GISelKnownBits::computeKnownBitsImpl(Register R, KnownBits &Known,
break;
}
case TargetOpcode::G_LOAD: {
- if (MI.hasOneMemOperand()) {
- const MachineMemOperand *MMO = *MI.memoperands_begin();
- if (const MDNode *Ranges = MMO->getRanges()) {
- computeKnownBitsFromRangeMetadata(*Ranges, Known);
- }
+ const MachineMemOperand *MMO = *MI.memoperands_begin();
+ if (const MDNode *Ranges = MMO->getRanges()) {
+ computeKnownBitsFromRangeMetadata(*Ranges, Known);
}
+
break;
}
case TargetOpcode::G_ZEXTLOAD: {
// Everything above the retrieved bits is zero
- if (MI.hasOneMemOperand())
- Known.Zero.setBitsFrom((*MI.memoperands_begin())->getSizeInBits());
+ Known.Zero.setBitsFrom((*MI.memoperands_begin())->getSizeInBits());
break;
}
case TargetOpcode::G_ASHR:
More information about the llvm-commits
mailing list