]> granicus.if.org Git - llvm/commitdiff
UpdateTestChecks: Consider .section as end of function for AMDGPU
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Fri, 14 Jun 2019 20:40:15 +0000 (20:40 +0000)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Fri, 14 Jun 2019 20:40:15 +0000 (20:40 +0000)
Kernels seem to go directly to a section switch instead of emitting
.Lfunc_end. This fixes including all of the kernel metadata in the
check lines, which is undesirable most of the time.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363452 91177308-0d34-0410-b5e6-96231b3b80d8

utils/UpdateTestChecks/asm.py

index a27cd04205b3b5d5653237c802ec88b35f7db952..208deb79171e05f51951255f7d72ce6ef532566a 100644 (file)
@@ -39,7 +39,7 @@ ASM_FUNCTION_AMDGPU_RE = re.compile(
     r'^_?(?P<func>[^:]+):[ \t]*;+[ \t]*@(?P=func)\n[^:]*?'
     r'(?P<body>.*?)\n' # (body of the function)
     # This list is incomplete
-    r'.Lfunc_end[0-9]+:\n',
+    r'^\s*(\.Lfunc_end[0-9]+:\n|\.section)',
     flags=(re.M | re.S))
 
 ASM_FUNCTION_HEXAGON_RE = re.compile(