[PATCH] D149971: [UpdateTestChecks] More support for X86 exception handling

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat May 6 07:22:00 PDT 2023


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGcaf22ec64a03: [UpdateTestChecks] More support for X86 exception handling (authored by foad).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D149971/new/

https://reviews.llvm.org/D149971

Files:
  llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/x86-basic.ll
  llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/x86-basic.ll.expected
  llvm/utils/UpdateTestChecks/asm.py


Index: llvm/utils/UpdateTestChecks/asm.py
===================================================================
--- llvm/utils/UpdateTestChecks/asm.py
+++ llvm/utils/UpdateTestChecks/asm.py
@@ -18,7 +18,7 @@
     r'^_?(?P<func>[^:]+):[ \t]*#+[ \t]*(@"?(?P=func)"?| -- Begin function (?P=func))\n(?:\s*\.?Lfunc_begin[^:\n]*:\n)?'
     r'(?:\.L(?P=func)\$local:\n)?'      # drop .L<func>$local:
     r'(?:\s*\.type\s+\.L(?P=func)\$local, at function\n)?'  # drop .type .L<func>$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<body>^##?[ \t]+[^:]+:.*?)\s*'
     r'^\s*(?:[^:\n]+?:\s*\n\s*\.size|\.cfi_endproc|\.globl|\.comm|\.(?:sub)?section|#+ -- End function)',
     flags=(re.M | re.S))
Index: llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/x86-basic.ll.expected
===================================================================
--- llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/x86-basic.ll.expected
+++ 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
+}
Index: llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/x86-basic.ll
===================================================================
--- llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/x86-basic.ll
+++ 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
+}


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D149971.520088.patch
Type: text/x-patch
Size: 2195 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230506/dffd2b43/attachment.bin>


More information about the llvm-commits mailing list