phoebewang wrote:

> > Thanks for checking it, fixed.
> 
> ```
> target datalayout = 
> "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
> target triple = "x86_64-pc-windows-gnu"
> 
> define ptr @__gdtoa(ptr %0, i32 %1, i32 %2, i32 %3, ptr %4, i1 %5) {
>   %7 = call double @__b2d_D2A()
>   switch i32 %1, label %13 [
>     i32 0, label %14
>     i32 1, label %14
>     i32 2, label %8
>     i32 4, label %9
>     i32 3, label %common.ret1
>   ]
> 
> 8:                                                ; preds = %6
>   br label %9
> 
> 9:                                                ; preds = %8, %6
>   %10 = phi i32 [ 0, %8 ], [ 1, %6 ]
>   store i32 %1, ptr %4, align 4
>   %11 = call ptr @__rv_alloc_D2A()
>   %12 = icmp eq i32 %3, 0
>   %.not1.not.not = select i1 %5, i1 false, i1 %12
>   br i1 %.not1.not.not, label %23, label %14
> 
> common.ret1:                                      ; preds = %23, %22, %18, 
> %14, %6
>   %common.ret1.op = phi ptr [ null, %23 ], [ null, %22 ], [ null, %18 ], [ 
> null, %14 ], [ null, %6 ]
>   ret ptr %common.ret1.op
> 
> 13:                                               ; preds = %6
>   unreachable
> 
> 14:                                               ; preds = %9, %6, %6
>   %15 = phi i32 [ %10, %9 ], [ 0, %6 ], [ 0, %6 ]
>   %16 = phi ptr [ %0, %9 ], [ null, %6 ], [ null, %6 ]
>   %17 = icmp slt i32 %2, 0
>   br i1 %17, label %18, label %common.ret1
> 
> 18:                                               ; preds = %14
>   %19 = call ptr @__i2b_D2A()
>   %20 = icmp ne i32 %15, 0
>   %21 = select i1 %20, i1 true, i1 %5
>   br i1 %21, label %22, label %common.ret1
> 
> 22:                                               ; preds = %18
>   store i8 0, ptr %16, align 1
>   br label %common.ret1
> 
> 23:                                               ; preds = %9
>   store i32 0, ptr %4, align 4
>   br label %common.ret1
> }
> 
> declare double @__b2d_D2A()
> 
> declare ptr @__rv_alloc_D2A()
> 
> declare ptr @__i2b_D2A()
> ```
> 
> ```
> clang -march=novalake reduced.ll --target=x86_64-pc-windows-gnu -O3 -c -o 
> /dev/null
> fatal error: error in backend: Cannot emit physreg copy instruction
> PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ 
> and include the crash backtrace, preprocessed source, and associated run 
> script.
> Stack dump:
> 0.      Program arguments: /build/install/llvmbin/clang -march=novalake 
> reduced.ll --target=x86_64-pc-windows-gnu -O3 -c -o /dev/null
> 1.      Code generation
> 2.      Running pass 'Function Pass Manager' on module 'reduced.ll'.
> 3.      Running pass 'Post-RA pseudo instruction expansion pass' on function 
> '@__gdtoa'
> #0 0x000055c907acbc16 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) 
> Signals.cpp:0:0
> clang: error: clang frontend command failed with exit code 70 (use -v to see 
> invocation)
> ```
> 
> I encountered another crash that was very similar.
> 
> Original IR 
> [www.ll.txt](https://github.com/user-attachments/files/26632571/www.ll.txt)

Fixed, thanks!

https://github.com/llvm/llvm-project/pull/191368
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to