[llvm] b54b4ec - Fix `-Wextra` warning. NFC.
Michael Liao via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 10 00:22:18 PDT 2020
Author: Michael Liao
Date: 2020-04-10T03:22:02-04:00
New Revision: b54b4ecac3e5a340cecfabb41f845ab345945785
URL: https://github.com/llvm/llvm-project/commit/b54b4ecac3e5a340cecfabb41f845ab345945785
DIFF: https://github.com/llvm/llvm-project/commit/b54b4ecac3e5a340cecfabb41f845ab345945785.diff
LOG: Fix `-Wextra` warning. NFC.
Added:
Modified:
llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp b/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
index fb1b4b9f5f03..6e5907b12510 100644
--- a/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
+++ b/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
@@ -734,11 +734,12 @@ void SIInstrInfo::copyPhysReg(MachineBasicBlock &MBB,
: AMDGPU::V_LSHLREV_B32_e32;
auto First = BuildMI(MBB, &*Last, DL, get(OpcFirst), DestReg);
if (DstLow == SrcLow) { // alignbyte
- First.addReg(SrcLow ? SrcReg : DestReg,
- SrcLow ? getKillRegState(KillSrc) : RegState::Undef)
- .addReg(SrcLow ? DestReg : SrcReg,
- SrcLow ? RegState::Undef :getKillRegState(KillSrc))
- .addImm(2);
+ First
+ .addReg(SrcLow ? SrcReg : DestReg,
+ SrcLow ? getKillRegState(KillSrc) : unsigned(RegState::Undef))
+ .addReg(SrcLow ? DestReg : SrcReg,
+ SrcLow ? unsigned(RegState::Undef) : getKillRegState(KillSrc))
+ .addImm(2);
} else {
First.addImm(16)
.addReg(DestReg, RegState::Undef);
More information about the llvm-commits
mailing list