diff --git a/llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/x86-basic.ll b/llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/x86-basic.ll --- a/llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/x86-basic.ll +++ b/llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/x86-basic.ll @@ -30,3 +30,9 @@ %c = add i32 %a, %b ret i32 %c } + +declare i32 @pers(...) + +define i32 @eh() personality ptr @pers { + ret i32 0 +} diff --git a/llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/x86-basic.ll.expected b/llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/x86-basic.ll.expected --- a/llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/x86-basic.ll.expected +++ b/llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/x86-basic.ll.expected @@ -94,3 +94,27 @@ %c = add i32 %a, %b ret i32 %c } + +declare i32 @pers(...) + +define i32 @eh() personality ptr @pers { +; CHECK-LABEL: eh: +; CHECK: # %bb.0: +; CHECK-NEXT: xorl %eax, %eax +; CHECK-NEXT: retq +; +; PIC-LABEL: eh: +; PIC: # %bb.0: +; PIC-NEXT: xorl %eax, %eax +; PIC-NEXT: retq +; +; WIN-LABEL: eh: +; WIN: # %bb.0: +; WIN-NEXT: xorl %eax, %eax +; WIN-NEXT: retq +; WIN-NEXT: .Lfunc_end0: +; WIN-NEXT: .seh_handlerdata +; WIN-NEXT: .text +; WIN-NEXT: .seh_endproc + ret i32 0 +} diff --git a/llvm/utils/UpdateTestChecks/asm.py b/llvm/utils/UpdateTestChecks/asm.py --- a/llvm/utils/UpdateTestChecks/asm.py +++ b/llvm/utils/UpdateTestChecks/asm.py @@ -18,7 +18,7 @@ r'^_?(?P[^:]+):[ \t]*#+[ \t]*(@"?(?P=func)"?| -- Begin function (?P=func))\n(?:\s*\.?Lfunc_begin[^:\n]*:\n)?' r'(?:\.L(?P=func)\$local:\n)?' # drop .L$local: r'(?:\s*\.type\s+\.L(?P=func)\$local,@function\n)?' # drop .type .L$local - r'(?:[ \t]+.cfi_startproc\n|.seh_proc[^\n]+\n)?' # drop optional cfi + r'(?:[ \t]*(?:\.cfi_startproc|\.cfi_personality|\.cfi_lsda|\.seh_proc|\.seh_handler)\b[^\n]*\n)*' # drop optional cfi r'(?P^##?[ \t]+[^:]+:.*?)\s*' r'^\s*(?:[^:\n]+?:\s*\n\s*\.size|\.cfi_endproc|\.globl|\.comm|\.(?:sub)?section|#+ -- End function)', flags=(re.M | re.S))