[llvm] 679ef22 - Fold one-use variable into assert. NFCI.
Benjamin Kramer via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 2 01:51:28 PST 2021
Author: Benjamin Kramer
Date: 2021-02-02T10:50:48+01:00
New Revision: 679ef22f2e553e73eda43c45d4361256c4524c00
URL: https://github.com/llvm/llvm-project/commit/679ef22f2e553e73eda43c45d4361256c4524c00
DIFF: https://github.com/llvm/llvm-project/commit/679ef22f2e553e73eda43c45d4361256c4524c00.diff
LOG: Fold one-use variable into assert. NFCI.
Avoids a warning in Release builds.
Added:
Modified:
llvm/lib/Target/AMDGPU/AMDGPUPreLegalizerCombiner.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUPreLegalizerCombiner.cpp b/llvm/lib/Target/AMDGPU/AMDGPUPreLegalizerCombiner.cpp
index c46aed39a979..e018628ae8cc 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUPreLegalizerCombiner.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUPreLegalizerCombiner.cpp
@@ -109,10 +109,10 @@ bool AMDGPUPreLegalizerCombinerHelper::matchClampI64ToI16(
// v_med3_i32 v0, Clamp_Min, v0, Clamp_Max
void AMDGPUPreLegalizerCombinerHelper::applyClampI64ToI16(
MachineInstr &MI, const ClampI64ToI16MatchInfo &MatchInfo) {
- MachineRegisterInfo &MRI = MI.getParent()->getParent()->getRegInfo();
Register Src = MatchInfo.Origin;
- assert(MRI.getType(Src) == LLT::scalar(64));
+ assert(MI.getParent()->getParent()->getRegInfo().getType(Src) ==
+ LLT::scalar(64));
const LLT S32 = LLT::scalar(32);
B.setMBB(*MI.getParent());
More information about the llvm-commits
mailing list