[llvm] r230517 - AArch64: Add debug message for large shift constants.
Matthias Braun
matze at braunis.de
Thu Feb 26 14:43:42 PST 2015
Because currently it does happen. The patch that fixes it (http://reviews.llvm.org/D6946 <http://reviews.llvm.org/D6946>) is complicated and not accepted yet...
- Matthias
> On Feb 26, 2015, at 2:18 PM, Sean Silva <chisophugis at gmail.com> wrote:
>
> If it should not happen, why not just assert?
>
> -- Sean Silva
>
> On Wed, Feb 25, 2015 at 10:03 AM, Matthias Braun <matze at braunis.de <mailto:matze at braunis.de>> wrote:
> Author: matze
> Date: Wed Feb 25 12:03:50 2015
> New Revision: 230517
>
> URL: http://llvm.org/viewvc/llvm-project?rev=230517&view=rev <http://llvm.org/viewvc/llvm-project?rev=230517&view=rev>
> Log:
> AArch64: Add debug message for large shift constants.
>
> As requested in code review.
>
> Modified:
> llvm/trunk/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp
>
> Modified: llvm/trunk/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp?rev=230517&r1=230516&r2=230517&view=diff <http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp?rev=230517&r1=230516&r2=230517&view=diff>
> ==============================================================================
> --- llvm/trunk/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp (original)
> +++ llvm/trunk/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp Wed Feb 25 12:03:50 2015
> @@ -1399,8 +1399,11 @@ static bool isBitfieldExtractOpFromAnd(S
>
> // Bail out on large immediates. This happens when no proper
> // combining/constant folding was performed.
> - if (!BiggerPattern && (Srl_imm <= 0 || Srl_imm >= VT.getSizeInBits()))
> + if (!BiggerPattern && (Srl_imm <= 0 || Srl_imm >= VT.getSizeInBits())) {
> + DEBUG((dbgs() << N
> + << ": Found large shift immediate, this should not happen\n"));
> return false;
> + }
>
> LSB = Srl_imm;
> MSB = Srl_imm + (VT == MVT::i32 ? countTrailingOnes<uint32_t>(And_imm)
> @@ -1506,8 +1509,11 @@ static bool isBitfieldExtractOpFromShr(S
>
> // Missing combines/constant folding may have left us with strange
> // constants.
> - if (Shl_imm >= VT.getSizeInBits())
> + if (Shl_imm >= VT.getSizeInBits()) {
> + DEBUG((dbgs() << N
> + << ": Found large shift immediate, this should not happen\n"));
> return false;
> + }
>
> uint64_t Srl_imm = 0;
> if (!isIntImmediate(N->getOperand(1), Srl_imm))
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu <mailto:llvm-commits at cs.uiuc.edu>
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits <http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150226/cc2ef618/attachment.html>
More information about the llvm-commits
mailing list