Skip to content

Commit ff30d20

Browse files
committed
[Xtensa] Fix cpus test.
1 parent dd773b2 commit ff30d20

File tree

2 files changed

+25
-9
lines changed

2 files changed

+25
-9
lines changed
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
21
; RUN: llc < %s --mtriple=xtensa --mcpu=invalid 2>&1 | FileCheck %s
32

43
; CHECK: {{.*}} is not a recognized processor for this target
54

65
define void @f() {
76
ret void
8-
}
7+
}

llvm/test/CodeGen/Xtensa/cpus.ll

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,29 @@
1+
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
12
; This tests that llc accepts all valid Xtensa CPUs
23

3-
; RUN: llc < %s --mtriple=xtensa --mcpu=esp8266 2>&1 | FileCheck %s
4-
; RUN: llc < %s --mtriple=xtensa --mcpu=esp32 2>&1 | FileCheck %s
5-
; RUN: llc < %s --mtriple=xtensa --mcpu=generic 2>&1 | FileCheck %s
6-
7-
; CHECK-NOT: {{.*}} is not a recognized processor for this target
8-
; INVALID: {{.*}} is not a recognized processor for this target
4+
; RUN: llc < %s --mtriple=xtensa --mcpu=esp8266 2>&1 | FileCheck -check-prefix=XTENSA-ESP8266 %s
5+
; RUN: llc < %s --mtriple=xtensa --mcpu=esp32 2>&1 | FileCheck -check-prefix=XTENSA-ESP32 %s
6+
; RUN: llc < %s --mtriple=xtensa --mcpu=generic 2>&1 | FileCheck -check-prefix=XTENSA-GENERIC %s
97

108
define i32 @f(i32 %z) {
11-
ret i32 0
9+
; XTENSA-ESP8266-LABEL: f:
10+
; XTENSA-ESP8266: .cfi_startproc
11+
; XTENSA-ESP8266-NEXT: # %bb.0:
12+
; XTENSA-ESP8266-NEXT: movi a2, 0
13+
; XTENSA-ESP8266-NEXT: ret
14+
;
15+
; XTENSA-ESP32-LABEL: f:
16+
; XTENSA-ESP32: .cfi_startproc
17+
; XTENSA-ESP32-NEXT: # %bb.0:
18+
; XTENSA-ESP32-NEXT: entry a1, 32
19+
; XTENSA-ESP32-NEXT: .cfi_def_cfa_offset 32
20+
; XTENSA-ESP32-NEXT: movi a2, 0
21+
; XTENSA-ESP32-NEXT: retw.n
22+
;
23+
; XTENSA-GENERIC-LABEL: f:
24+
; XTENSA-GENERIC: .cfi_startproc
25+
; XTENSA-GENERIC-NEXT: # %bb.0:
26+
; XTENSA-GENERIC-NEXT: movi a2, 0
27+
; XTENSA-GENERIC-NEXT: ret
28+
ret i32 0
1229
}

0 commit comments

Comments
 (0)