[llvm] 90b76da - GloblaISel: Remove unreachable condition
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 29 10:42:31 PDT 2020
Author: Matt Arsenault
Date: 2020-07-29T13:42:22-04:00
New Revision: 90b76dac57861e438880a260834afb193e603c5a
URL: https://github.com/llvm/llvm-project/commit/90b76dac57861e438880a260834afb193e603c5a
DIFF: https://github.com/llvm/llvm-project/commit/90b76dac57861e438880a260834afb193e603c5a.diff
LOG: GloblaISel: Remove unreachable condition
Fixes bug 46882
Added:
Modified:
llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp b/llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
index 441e5ca6d209..15e1ac8a3974 100644
--- a/llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
+++ b/llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
@@ -1614,8 +1614,7 @@ LegalizerHelper::widenScalarExtract(MachineInstr &MI, unsigned TypeIdx,
if (WideTy.getSizeInBits() > SrcTy.getSizeInBits()) {
Src = MIRBuilder.buildAnyExt(WideTy, Src);
ShiftTy = WideTy;
- } else if (WideTy.getSizeInBits() > SrcTy.getSizeInBits())
- return UnableToLegalize;
+ }
auto LShr = MIRBuilder.buildLShr(
ShiftTy, Src, MIRBuilder.buildConstant(ShiftTy, Offset));
More information about the llvm-commits
mailing list