[llvm] b54b4ec - Fix `-Wextra` warning. NFC.

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 13 17:55:08 PDT 2020


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)

On Fri, Apr 10, 2020 at 12:22 AM Michael Liao via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

>
> 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);
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200413/fb04263b/attachment.html>


More information about the llvm-commits mailing list