Skip to content

Commit 7d78e5c

Browse files
author
Jinsong Ji
committed
[UpdateChecks] Add support for armv7-apple-darwin
armv7-apple-darwin was not supported well, the script can't generate checks. https://reviews.llvm.org/D60601/new/#inline-568671 Differential Revision: https://reviews.llvm.org/D63939 llvm-svn: 364668
1 parent 978a08c commit 7d78e5c

File tree

2 files changed

+21
-2
lines changed

2 files changed

+21
-2
lines changed

llvm/test/CodeGen/ARM/ldst-f32-2-i32.ll

+12-2
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,27 @@
1+
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
12
; RUN: llc < %s -mtriple=armv7-apple-darwin -mcpu=cortex-a8 | FileCheck %s
23
; Check if the f32 load / store pair are optimized to i32 load / store.
34
; rdar://8944252
45

56
define void @t(i32 %width, float* nocapture %src, float* nocapture %dst, i32 %index) nounwind {
67
; CHECK-LABEL: t:
8+
; CHECK: @ %bb.0: @ %entry
9+
; CHECK-NEXT: cmp r0, #0
10+
; CHECK-NEXT: bxeq lr
11+
; CHECK-NEXT: LBB0_1: @ %bb
12+
; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1
13+
; CHECK-NEXT: ldr r9, [r1], r3
14+
; CHECK-NEXT: subs r0, r0, #1
15+
; CHECK-NEXT: str r9, [r2], #4
16+
; CHECK-NEXT: bne LBB0_1
17+
; CHECK-NEXT: @ %bb.2: @ %return
18+
; CHECK-NEXT: bx lr
719
entry:
820
%src6 = bitcast float* %src to i8*
921
%0 = icmp eq i32 %width, 0
1022
br i1 %0, label %return, label %bb
1123

1224
bb:
13-
; CHECK: ldr [[REGISTER:(r[0-9]+)]], [{{r[0-9]+}}], {{r[0-9]+}}
14-
; CHECK: str [[REGISTER]], [{{r[0-9]+}}], #4
1525
%j.05 = phi i32 [ %2, %bb ], [ 0, %entry ]
1626
%tmp = mul i32 %j.05, %index
1727
%uglygep = getelementptr i8, i8* %src6, i32 %tmp

llvm/utils/UpdateTestChecks/asm.py

+9
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,14 @@ class string:
104104
r'^[ \t]*;[ \t]--[ \t]End[ \t]function',
105105
flags=(re.M | re.S))
106106

107+
ASM_FUNCTION_ARM_DARWIN_RE = re.compile(
108+
r'^[ \t]*\.globl[ \t]*_(?P<func>[^ \t])[ \t]*@[ \t]--[ \t]Begin[ \t]function[ \t](?P=func)'
109+
r'(?P<directives>.*?)'
110+
r'^_(?P=func):\n[ \t]*'
111+
r'(?P<body>.*?)'
112+
r'^[ \t]*@[ \t]--[ \t]End[ \t]function',
113+
flags=(re.M | re.S ))
114+
107115
ASM_FUNCTION_ARM_MACHO_RE = re.compile(
108116
r'^_(?P<func>[^:]+):[ \t]*\n'
109117
r'([ \t]*.cfi_startproc\n[ \t]*)?'
@@ -301,6 +309,7 @@ def build_function_body_dictionary_for_triple(args, raw_tool_output, triple, pre
301309
'arm64': (scrub_asm_arm_eabi, ASM_FUNCTION_AARCH64_RE),
302310
'arm64-apple-ios': (scrub_asm_arm_eabi, ASM_FUNCTION_AARCH64_DARWIN_RE),
303311
'armv7-apple-ios' : (scrub_asm_arm_eabi, ASM_FUNCTION_ARM_IOS_RE),
312+
'armv7-apple-darwin': (scrub_asm_arm_eabi, ASM_FUNCTION_ARM_DARWIN_RE),
304313
'thumb': (scrub_asm_arm_eabi, ASM_FUNCTION_ARM_RE),
305314
'thumb-macho': (scrub_asm_arm_eabi, ASM_FUNCTION_ARM_MACHO_RE),
306315
'thumbv5-macho': (scrub_asm_arm_eabi, ASM_FUNCTION_ARM_MACHO_RE),

0 commit comments

Comments
 (0)