[llvm-dev] 'Simple Register Coalescing' pass error
Quentin Colombet via llvm-dev
llvm-dev at lists.llvm.org
Fri Apr 12 09:41:50 PDT 2019
Hi Josh,
That sounds like a bug, but I don’t have enough information to know what is going on.
Could you file a public report in buzgilla and attach the IR (run clang with `-emit-llvm`) and the debug output of the coalescer (-mllvm -debug-only=regalloc)?
Thanks,
-Quentin
> On Apr 11, 2019, at 9:32 PM, Josh Sharp via llvm-dev <llvm-dev at lists.llvm.org> wrote:
>
>
> Hi all,
> I have an error I do not understand. My program crashes during the 'Simple Register Coalescing' pass. All I know is that the crash happens inside LiveRange::Query() in llvm/include/llvm/CodeGen/LiveInterval.h and is due to the fact that EarlyVal is null and causes a crash when evaluating if (EarlyVal->def == Idx.getBaseIndex()). What could be the reason why EarlyVal is null? The function on which the pass is being run is:
>
>
>
> void foo(uint8_t* input, const uint8_t* key, uint8_t *output, size_t len)
> {
>
> uint16_t np1 = (len * 8)/64;
> uint16_t n = np1 - 1;
> uint64_t A;
> uint64_t R[n+1];
> int i,j;
>
>
> memcpy(&A,input,8);
> for (i = 1; i<= n;i++)
> {
> memcpy(&R[i], input + 8*i,8);
> }
>
>
> for (j = 5; j >= 0; j--)
> for (i = n; i >= 1; i--)
> {
> uint64_t l_input[2] =
> {
> A ^ (((uint64_t)(n*j+i))<<56),
> R[i]
> };
>
> dec((uint8_t*)l_input, key, output);
> memcpy(&A,output,8);
> memcpy(&R[i],output+8,8);
> }
>
> memcpy(output,&A,8);
> int k;
> for(k=1;k<(n+1);k++)
> {
> memcpy(output+8*k,&R[k],8);
> }
> }
>
> Thanks.
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org>
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev <https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190412/de10f657/attachment.html>
More information about the llvm-dev
mailing list