You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There was a wrong path from _llgo_0 to _llgo_10 that didn't through _llgo_2, and the return value is allocated in _llgo_2. Maybe it's jumping correctly by the blockaddress, but it can't pass the compiling.
Description
Current behavior
Consider the following Go code:
This generates LLVM IR: (WRONG SAMPLE)
Compile it with
llc
:$ /opt/homebrew/bin/llc llgo_autogen.ll Instruction does not dominate all uses! %14 = phi i64 [ 1, %_llgo_8 ], [ %14, %_llgo_3 ], [ %26, %_llgo_5 ] ret i64 %14
But it can be compiled by
clang
:When generate code with debug info, the code almost same except debug info:
When remove the debug tokens and lines, it is no difference between them.
Compile it with
llc
:Compile it with
clang
:When remove the
defer
statement, it compile passed. The code generated:The flow graph of code block
WRONG SAMPLE
There was a wrong path from
_llgo_0
to_llgo_10
that didn't through_llgo_2
, and the return value is allocated in_llgo_2
. Maybe it's jumping correctly by the blockaddress, but it can't pass the compiling.It led to this issue: https://github.com/goplus/llgo/actions/runs/10971740620/job/30467224448?pr=794
Below is the right path, the
_llgo_1
(same as_llgo_2
in the defer version) is always executed.The text was updated successfully, but these errors were encountered: