[llvm] r252748 - Remove unused variable in disable-assert builds. NFC.
David Blaikie via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 11 08:34:54 PST 2015
On Wed, Nov 11, 2015 at 8:14 AM, Diego Novillo via llvm-commits <
llvm-commits at lists.llvm.org> wrote:
> Author: dnovillo
> Date: Wed Nov 11 10:14:52 2015
> New Revision: 252748
>
> URL: http://llvm.org/viewvc/llvm-project?rev=252748&view=rev
> Log:
> Remove unused variable in disable-assert builds. NFC.
>
> Modified:
> llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp
>
> Modified: llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp?rev=252748&r1=252747&r2=252748&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp (original)
> +++ llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp Wed Nov 11 10:14:52 2015
> @@ -9141,8 +9141,7 @@ static SDValue PerformBFICombine(SDNode
> SDValue From1 = ParseBFI(N, ToMask1, FromMask1);
>
> APInt ToMask2, FromMask2;
> - SDValue From2 = ParseBFI(CombineBFI.getNode(), ToMask2, FromMask2);
> - assert(From1 == From2);
> + assert(From1 == ParseBFI(CombineBFI.getNode(), ToMask2, FromMask2));
>
This looks like the wrong transformation - presumably ParseBFI has side
effects, like parsing the result into ToMask2 and FromMask2 - putting it
inside the assert means those side effects will not be performed in a
-Asserts build.
The right thing in this instance is probably to add a (void)From2;
statement either before or after the assert (we're not terribly consistent
about whether it goes before or after)
- Dave
>
> // First, unlink CombineBFI.
> DCI.DAG.ReplaceAllUsesWith(CombineBFI, CombineBFI.getOperand(0));
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://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/20151111/d38e426b/attachment.html>
More information about the llvm-commits
mailing list