Skip to content

Commit d27d0c7

Browse files
committed
[X86] atomic-load-store.ll - add SSE/AVX level coverage for future vector atomic memory operations
Help #138635 where we need to ensure correct SSE/AVX load instructions
1 parent 4e53560 commit d27d0c7

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed
Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
11
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2-
; RUN: llc < %s -mtriple=x86_64-apple-macosx10.7.0 -verify-machineinstrs | FileCheck %s
3-
; RUN: llc < %s -mtriple=x86_64-apple-macosx10.7.0 -verify-machineinstrs -O0 | FileCheck %s
2+
; RUN: llc < %s -mtriple=x86_64-- -verify-machineinstrs -mcpu=x86-64 | FileCheck %s --check-prefixes=CHECK,CHECK-O3
3+
; RUN: llc < %s -mtriple=x86_64-- -verify-machineinstrs -mcpu=x86-64-v2 | FileCheck %s --check-prefixes=CHECK,CHECK-O3
4+
; RUN: llc < %s -mtriple=x86_64-- -verify-machineinstrs -mcpu=x86-64-v3 | FileCheck %s --check-prefixes=CHECK,CHECK-O3
5+
; RUN: llc < %s -mtriple=x86_64-- -verify-machineinstrs -mcpu=x86-64-v4 | FileCheck %s --check-prefixes=CHECK,CHECK-O3
6+
; RUN: llc < %s -mtriple=x86_64-- -verify-machineinstrs -O0 -mcpu=x86-64 | FileCheck %s --check-prefixes=CHECK,CHECK-O0
7+
; RUN: llc < %s -mtriple=x86_64-- -verify-machineinstrs -O0 -mcpu=x86-64-v2 | FileCheck %s --check-prefixes=CHECK,CHECK-O0
8+
; RUN: llc < %s -mtriple=x86_64-- -verify-machineinstrs -O0 -mcpu=x86-64-v3 | FileCheck %s --check-prefixes=CHECK,CHECK-O0
9+
; RUN: llc < %s -mtriple=x86_64-- -verify-machineinstrs -O0 -mcpu=x86-64-v4 | FileCheck %s --check-prefixes=CHECK,CHECK-O0
410

511
define void @test1(ptr %ptr, i32 %val1) {
612
; CHECK-LABEL: test1:
7-
; CHECK: ## %bb.0:
13+
; CHECK: # %bb.0:
814
; CHECK-NEXT: xchgl %esi, (%rdi)
915
; CHECK-NEXT: retq
1016
store atomic i32 %val1, ptr %ptr seq_cst, align 4
@@ -13,7 +19,7 @@ define void @test1(ptr %ptr, i32 %val1) {
1319

1420
define void @test2(ptr %ptr, i32 %val1) {
1521
; CHECK-LABEL: test2:
16-
; CHECK: ## %bb.0:
22+
; CHECK: # %bb.0:
1723
; CHECK-NEXT: movl %esi, (%rdi)
1824
; CHECK-NEXT: retq
1925
store atomic i32 %val1, ptr %ptr release, align 4
@@ -22,9 +28,12 @@ define void @test2(ptr %ptr, i32 %val1) {
2228

2329
define i32 @test3(ptr %ptr) {
2430
; CHECK-LABEL: test3:
25-
; CHECK: ## %bb.0:
31+
; CHECK: # %bb.0:
2632
; CHECK-NEXT: movl (%rdi), %eax
2733
; CHECK-NEXT: retq
2834
%val = load atomic i32, ptr %ptr seq_cst, align 4
2935
ret i32 %val
3036
}
37+
;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line:
38+
; CHECK-O0: {{.*}}
39+
; CHECK-O3: {{.*}}

0 commit comments

Comments
 (0)