File: atomic-non-integer-fp128.ll

package info (click to toggle)
llvm-toolchain-17 1%3A17.0.6-22
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,799,624 kB
  • sloc: cpp: 6,428,607; ansic: 1,383,196; asm: 793,408; python: 223,504; objc: 75,364; f90: 60,502; lisp: 33,869; pascal: 15,282; sh: 9,684; perl: 7,453; ml: 4,937; awk: 3,523; makefile: 2,889; javascript: 2,149; xml: 888; fortran: 619; cs: 573
file content (35 lines) | stat: -rw-r--r-- 1,567 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc < %s -mtriple=x86_64-linux-generic -verify-machineinstrs -mattr=-sse | FileCheck %s --check-prefix=X64-NOSSE
; RUN: llc < %s -mtriple=x86_64-linux-generic -verify-machineinstrs | FileCheck %s --check-prefix=X64-SSE

; Note: This test is testing that the lowering for atomics matches what we
; currently emit for non-atomics + the atomic restriction.  The presence of
; particular lowering detail in these tests should not be read as requiring
; that detail for correctness unless it's related to the atomicity itself.
; (Specifically, there were reviewer questions about the lowering for halfs
;  and their calling convention which remain unresolved.)

define void @store_fp128(ptr %fptr, fp128 %v) {
; X64-NOSSE-LABEL: store_fp128:
; X64-NOSSE:       # %bb.0:
; X64-NOSSE-NEXT:    pushq %rax
; X64-NOSSE-NEXT:    .cfi_def_cfa_offset 16
; X64-NOSSE-NEXT:    callq __sync_lock_test_and_set_16@PLT
; X64-NOSSE-NEXT:    popq %rax
; X64-NOSSE-NEXT:    .cfi_def_cfa_offset 8
; X64-NOSSE-NEXT:    retq
;
; X64-SSE-LABEL: store_fp128:
; X64-SSE:       # %bb.0:
; X64-SSE-NEXT:    subq $24, %rsp
; X64-SSE-NEXT:    .cfi_def_cfa_offset 32
; X64-SSE-NEXT:    movaps %xmm0, (%rsp)
; X64-SSE-NEXT:    movq (%rsp), %rsi
; X64-SSE-NEXT:    movq {{[0-9]+}}(%rsp), %rdx
; X64-SSE-NEXT:    callq __sync_lock_test_and_set_16@PLT
; X64-SSE-NEXT:    addq $24, %rsp
; X64-SSE-NEXT:    .cfi_def_cfa_offset 8
; X64-SSE-NEXT:    retq
  store atomic fp128 %v, ptr %fptr unordered, align 16
  ret void
}