1 // min-llvm-version: 13.0.0
5 #![crate_type = "rlib"]
6 #![feature(asm_unwind)]
11 pub extern "C" fn panicky() {}
21 // CHECK-LABEL: @asm_may_unwind
23 pub unsafe fn asm_may_unwind() {
25 // CHECK: invoke void asm sideeffect alignstack inteldialect unwind ""
26 asm!("", options(may_unwind));
29 // CHECK-LABEL: @asm_with_result_may_unwind
31 pub unsafe fn asm_with_result_may_unwind() -> u64 {
34 // CHECK: [[RES:%[0-9]+]] = invoke i64 asm sideeffect alignstack inteldialect unwind
35 // CHECK-NEXT: to label %[[NORMALBB:[a-b0-9]+]]
36 asm!("mov {}, 1", out(reg) res, options(may_unwind));
37 // CHECK: [[NORMALBB]]:
38 // CHECK: ret i64 [[RES:%[0-9]+]]