<div dir="ltr">Could you include in the commit message details of what the warning was/how the code was changed to address the issue (in general I think the semantics of the code change should be in the commit title - the fact they were motivated by a warning should be secondary/in the commit description body)</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Apr 10, 2020 at 12:22 AM Michael Liao via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
Author: Michael Liao<br>
Date: 2020-04-10T03:22:02-04:00<br>
New Revision: b54b4ecac3e5a340cecfabb41f845ab345945785<br>
<br>
URL: <a href="https://github.com/llvm/llvm-project/commit/b54b4ecac3e5a340cecfabb41f845ab345945785" rel="noreferrer" target="_blank">https://github.com/llvm/llvm-project/commit/b54b4ecac3e5a340cecfabb41f845ab345945785</a><br>
DIFF: <a href="https://github.com/llvm/llvm-project/commit/b54b4ecac3e5a340cecfabb41f845ab345945785.diff" rel="noreferrer" target="_blank">https://github.com/llvm/llvm-project/commit/b54b4ecac3e5a340cecfabb41f845ab345945785.diff</a><br>
<br>
LOG: Fix `-Wextra` warning. NFC.<br>
<br>
Added: <br>
<br>
<br>
Modified: <br>
    llvm/lib/Target/AMDGPU/SIInstrInfo.cpp<br>
<br>
Removed: <br>
<br>
<br>
<br>
################################################################################<br>
diff  --git a/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp b/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp<br>
index fb1b4b9f5f03..6e5907b12510 100644<br>
--- a/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp<br>
+++ b/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp<br>
@@ -734,11 +734,12 @@ void SIInstrInfo::copyPhysReg(MachineBasicBlock &MBB,<br>
                                                     : AMDGPU::V_LSHLREV_B32_e32;<br>
     auto First = BuildMI(MBB, &*Last, DL, get(OpcFirst), DestReg);<br>
     if (DstLow == SrcLow) { // alignbyte<br>
-      First.addReg(SrcLow ? SrcReg : DestReg,<br>
-                   SrcLow ? getKillRegState(KillSrc) : RegState::Undef)<br>
-           .addReg(SrcLow ? DestReg : SrcReg,<br>
-                   SrcLow ? RegState::Undef :getKillRegState(KillSrc))<br>
-           .addImm(2);<br>
+      First<br>
+          .addReg(SrcLow ? SrcReg : DestReg,<br>
+                  SrcLow ? getKillRegState(KillSrc) : unsigned(RegState::Undef))<br>
+          .addReg(SrcLow ? DestReg : SrcReg,<br>
+                  SrcLow ? unsigned(RegState::Undef) : getKillRegState(KillSrc))<br>
+          .addImm(2);<br>
     } else {<br>
       First.addImm(16)<br>
            .addReg(DestReg, RegState::Undef);<br>
<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div>