Skip to content

Commit e11194d

Browse files
committed
[X86] load atomic vector tests for combine
Vector types of 2 elements that don't require widening are lowered via the prior commit's combine method, which is also needed to avoid a vector move. This change adds the tests that depend strictly on combineAtomicLoad so that SelectionDAG can translate vectors with type bfloat,half. commit-id:3a045357
1 parent 3a82883 commit e11194d

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

llvm/test/CodeGen/X86/atomic-load-store.ll

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,24 @@ define <2 x float> @atomic_vec2_float_align(ptr %x) {
187187
ret <2 x float> %ret
188188
}
189189

190+
define <2 x half> @atomic_vec2_half(ptr %x) {
191+
; CHECK-LABEL: atomic_vec2_half:
192+
; CHECK: ## %bb.0:
193+
; CHECK-NEXT: movl (%rdi), %eax
194+
; CHECK-NEXT: retq
195+
%ret = load atomic <2 x half>, ptr %x acquire, align 4
196+
ret <2 x half> %ret
197+
}
198+
199+
define <2 x bfloat> @atomic_vec2_bfloat(ptr %x) {
200+
; CHECK-LABEL: atomic_vec2_bfloat:
201+
; CHECK: ## %bb.0:
202+
; CHECK-NEXT: movl (%rdi), %eax
203+
; CHECK-NEXT: retq
204+
%ret = load atomic <2 x bfloat>, ptr %x acquire, align 4
205+
ret <2 x bfloat> %ret
206+
}
207+
190208
define <1 x ptr> @atomic_vec1_ptr(ptr %x) nounwind {
191209
; CHECK3-LABEL: atomic_vec1_ptr:
192210
; CHECK3: ## %bb.0:

0 commit comments

Comments
 (0)