File: zdinx-asm-constraint.ll

package info (click to toggle)
llvm-toolchain-18 1%3A18.1.8-18
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,908,340 kB
  • sloc: cpp: 6,667,937; ansic: 1,440,452; asm: 883,619; python: 230,549; objc: 76,880; f90: 74,238; lisp: 35,989; pascal: 16,571; sh: 10,229; perl: 7,459; ml: 5,047; awk: 3,523; makefile: 2,987; javascript: 2,149; xml: 892; fortran: 649; cs: 573
file content (58 lines) | stat: -rw-r--r-- 2,095 bytes parent folder | download
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 3
; RUN: llc -mtriple=riscv32 -mattr=+zdinx -verify-machineinstrs < %s \
; RUN:   -target-abi=ilp32 -mattr=+zhinx | FileCheck %s
define dso_local void @zdinx_asm(ptr nocapture noundef writeonly %a, double noundef %b, double noundef %c) nounwind {
; CHECK-LABEL: zdinx_asm:
; CHECK:       # %bb.0: # %entry
; CHECK-NEXT:    addi sp, sp, -16
; CHECK-NEXT:    sw a1, 8(sp)
; CHECK-NEXT:    sw a2, 12(sp)
; CHECK-NEXT:    lw a6, 8(sp)
; CHECK-NEXT:    lw a7, 12(sp)
; CHECK-NEXT:    sw a3, 8(sp)
; CHECK-NEXT:    sw a4, 12(sp)
; CHECK-NEXT:    lw a2, 8(sp)
; CHECK-NEXT:    lw a3, 12(sp)
; CHECK-NEXT:    #APP
; CHECK-NEXT:    fsgnjx.d a2, a6, a2
; CHECK-NEXT:    #NO_APP
; CHECK-NEXT:    sw a2, 8(a0)
; CHECK-NEXT:    sw a3, 12(a0)
; CHECK-NEXT:    addi sp, sp, 16
; CHECK-NEXT:    ret
entry:
  %arrayidx = getelementptr inbounds double, ptr %a, i32 1
  %0 = tail call double asm "fsgnjx.d $0, $1, $2", "=r,r,r"(double %b, double %c)
  store double %0, ptr %arrayidx, align 8
  ret void
}

define dso_local void @zfinx_asm(ptr nocapture noundef writeonly %a, float noundef %b, float noundef %c) nounwind {
; CHECK-LABEL: zfinx_asm:
; CHECK:       # %bb.0: # %entry
; CHECK-NEXT:    #APP
; CHECK-NEXT:    fsgnjx.s a1, a1, a2
; CHECK-NEXT:    #NO_APP
; CHECK-NEXT:    sw a1, 4(a0)
; CHECK-NEXT:    ret
entry:
  %arrayidx = getelementptr inbounds float, ptr %a, i32 1
  %0 = tail call float asm "fsgnjx.s $0, $1, $2", "=r,r,r"(float %b, float %c)
  store float %0, ptr %arrayidx, align 8
  ret void
}

define dso_local void @zhinx_asm(ptr nocapture noundef writeonly %a, half noundef %b, half noundef %c) nounwind {
; CHECK-LABEL: zhinx_asm:
; CHECK:       # %bb.0: # %entry
; CHECK-NEXT:    #APP
; CHECK-NEXT:    fsgnjx.h a1, a1, a2
; CHECK-NEXT:    #NO_APP
; CHECK-NEXT:    sh a1, 2(a0)
; CHECK-NEXT:    ret
entry:
  %arrayidx = getelementptr inbounds half, ptr %a, i32 1
  %0 = tail call half asm "fsgnjx.h $0, $1, $2", "=r,r,r"(half %b, half %c)
  store half %0, ptr %arrayidx, align 8
  ret void
}