File: test-interp-vec-arithm_float.ll

package info (click to toggle)
llvm-toolchain-19 1%3A19.1.7-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,998,520 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 (26 lines) | stat: -rw-r--r-- 1,022 bytes parent folder | download | duplicates (6)
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
; LoongArch does not support mcjit.
; UNSUPPORTED: target=loongarch{{.*}}

; RUN: %lli -jit-kind=mcjit %s > /dev/null
; RUN: %lli %s > /dev/null


define i32 @main() {

    %A_float = fadd <4 x float> <float 0.0, float 11.0, float 22.0, float 33.0>, <float 44.0, float 55.0, float 66.0, float 77.0>
    %B_float = fsub <4 x float> %A_float, <float 88.0, float 99.0, float 100.0, float 111.0>
    %C_float = fmul <4 x float> %B_float, %B_float
    %D_float = fdiv <4 x float> %C_float, %B_float
    %E_float = frem <4 x float> %D_float, %A_float
    %F_float = fneg <4 x float> %E_float


    %A_double = fadd <3 x double> <double 0.0, double 111.0, double 222.0>, <double 444.0, double 555.0, double 665.0>
    %B_double = fsub <3 x double> %A_double, <double 888.0, double 999.0, double 1001.0>
    %C_double = fmul <3 x double> %B_double, %B_double
    %D_double = fdiv <3 x double> %C_double, %B_double
    %E_double = frem <3 x double> %D_double, %A_double
    %F_double = fneg <3 x double> %E_double

    ret i32 0
}