| Issue |
109250
|
| Summary |
SEH on Windows ARM64 causes error: Assembler label cannot be undefined
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
momo5502
|
Invoking LLC with the sample IR code below generates the following error:
```
<unknown>:0: error: assembler label '.LBB0_-1' can not be undefined
```
`-filetype=obj` must be passed as option, as the error happens during object file generation.
The issue can be reproduced in godbolt: https://godbolt.org/z/7zao143hP
Sample IR code:
```llvm
target datalayout = "e-m:w-p:64:64-i32:32-i64:64-i128:128-n32:64-S128"
target triple = "aarch64-unknown-windows-msvc19.41.34120"
declare i32 @__CxxFrameHandler3(...)
; Function Attrs: nounwind willreturn memory(write)
declare void @llvm.seh.try.begin() #0
define fastcc ptr @test_function(i1 %0, ptr %_Fmtfl.i.i, i1 %1) personality ptr @__CxxFrameHandler3 {
entry:
br i1 %0, label %right-block527, label %left-block526
common.ret1: ; preds = %left-block530, %left-block526, %some-block, %invoke.cont.i124
%common.ret1.op = phi ptr [ null, %left-block530 ], [ null, %some-block ], [ %_Fmtfl.i.i, %invoke.cont.i124 ], [ null, %left-block526 ]
ret ptr %common.ret1.op
invoke.cont.i124: ; preds = %right-block527
%.not657 = icmp eq i32 1, 0
br i1 %.not657, label %some-block, label %common.ret1
catch.dispatch.i: ; preds = %right-block527
%2 = catchswitch within none [label %catch.i] unwind to caller
catch.i: ; preds = %catch.dispatch.i
%3 = catchpad within %2 [ptr null, i32 0, ptr null]
catchret from %3 to label %some-block
some-block: ; preds = %catch.i, %invoke.cont.i124
br label %common.ret1
left-block526: ; preds = %entry
br i1 %1, label %common.ret1, label %left-block530
right-block527: ; preds = %entry
invoke void @llvm.seh.try.begin()
to label %invoke.cont.i124 unwind label %catch.dispatch.i
left-block530: ; preds = %left-block526
%.not = icmp eq i32 0, 0
br label %common.ret1
}
attributes #0 = { nounwind willreturn memory(write) }
!llvm.module.flags = !{!0}
!0 = !{i32 2, !"eh-asynch", i32 1}
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs