File: zdinx-asm-constraint.ll

package info (click to toggle)
llvm-toolchain-19 1%3A19.1.7-3~deb12u1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm-proposed-updates
  • size: 1,998,492 kB
  • sloc: cpp: 6,951,680; ansic: 1,486,157; asm: 913,598; python: 232,024; f90: 80,126; objc: 75,281; lisp: 37,276; pascal: 16,990; sh: 10,009; ml: 5,058; perl: 4,724; awk: 3,523; makefile: 3,167; javascript: 2,504; xml: 892; fortran: 664; cs: 573
file content (52 lines) | stat: -rw-r--r-- 1,892 bytes parent folder | download | duplicates (3)
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
; 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:    mv a5, a4
; CHECK-NEXT:    mv a7, a2
; CHECK-NEXT:    mv a4, a3
; CHECK-NEXT:    mv a6, a1
; CHECK-NEXT:    #APP
; CHECK-NEXT:    fsgnjx.d a2, a6, a4
; CHECK-NEXT:    #NO_APP
; CHECK-NEXT:    sw a2, 8(a0)
; CHECK-NEXT:    sw a3, 12(a0)
; 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
}