Home
last modified time | relevance | path

Searched full:sqrt (Results 1 – 25 of 1313) sorted by relevance

12345678910>>...53

/llvm-project/llvm/test/CodeGen/AMDGPU/
H A Damdgpu-simplify-libcall-sqrt.ll30 ; CHECK-NEXT: [[SQRT:%.*]] = tail call float @llvm.sqrt.f32(float [[ARG]]), !fpmath [[META0:![0-…
31 ; CHECK-NEXT: ret float [[SQRT]]
33 %sqrt = tail call float @_Z4sqrtf(float %arg), !fpmath !0
34 ret float %sqrt
40 ; CHECK-NEXT: [[SQRT:%.*]] = tail call <2 x float> @llvm.sqrt.v2f32(<2 x float> [[ARG]]), !fpmat…
41 ; CHECK-NEXT: ret <2 x float> [[SQRT]]
43 %sqrt = tail call <2 x float> @_Z4sqrtDv2_f(<2 x float> %arg), !fpmath !0
44 ret <2 x float> %sqrt
50 ; CHECK-NEXT: [[SQRT:%.*]] = tail call <3 x float> @llvm.sqrt.v3f32(<3 x float> [[ARG]]), !fpmat…
51 ; CHECK-NEXT: ret <3 x float> [[SQRT]]
[all …]
H A Damdgpu-codegenprepare-sqrt.ll9 ; CHECK-NEXT: [[MD_25ULP:%.*]] = call float @llvm.sqrt.f32(float [[X]]), !fpmath !0
13 %md.25ulp = call float @llvm.sqrt.f32(float %x), !fpmath !3
21 ; IEEE-NEXT: [[NO_MD:%.*]] = call float @llvm.sqrt.f32(float [[X]])
23 ; IEEE-NEXT: [[MD_HALF_ULP:%.*]] = call float @llvm.sqrt.f32(float [[X]]), !fpmath !1
25 ; IEEE-NEXT: [[MD_1ULP:%.*]] = call float @llvm.sqrt.f32(float [[X]]), !fpmath !2
30 ; IEEE-NEXT: [[TMP4:%.*]] = call float @llvm.amdgcn.sqrt.f32(float [[TMP3]])
37 ; IEEE-NEXT: [[TMP9:%.*]] = call float @llvm.amdgcn.sqrt.f32(float [[TMP8]])
44 ; IEEE-NEXT: [[TMP14:%.*]] = call float @llvm.amdgcn.sqrt.f32(float [[TMP13]])
52 ; DAZ-NEXT: [[NO_MD:%.*]] = call float @llvm.sqrt.f32(float [[X]])
54 ; DAZ-NEXT: [[MD_HALF_ULP:%.*]] = call float @llvm.sqrt.f32(float [[X]]), !fpmath !1
[all …]
H A Dllvm.amdgcn.sqrt.ll13 %sqrt = call float @llvm.amdgcn.sqrt.f32(float %src)
14 ret float %sqrt
24 %sqrt = call float @llvm.amdgcn.sqrt.f32(float %fabs.src)
25 ret float %sqrt
36 %sqrt = call float @llvm.amdgcn.sqrt.f32(float %neg.fabs.src)
37 ret float %sqrt
46 %sqrt = call double @llvm.amdgcn.sqrt.f64(double %src)
47 ret double %sqrt
57 %sqrt = call double @llvm.amdgcn.sqrt.f64(double %fabs.src)
58 ret double %sqrt
[all …]
H A Dllvm.amdgcn.rcp.ll6 declare double @llvm.amdgcn.sqrt.f64(double) #0
7 declare float @llvm.amdgcn.sqrt.f32(float) #0
8 declare double @llvm.sqrt.f64(double) #0
9 declare float @llvm.sqrt.f32(float) #0
78 %sqrt = call contract float @llvm.sqrt.f32(float %src)
79 %rcp = call contract float @llvm.amdgcn.rcp.f32(float %sqrt)
88 %sqrt = call contract float @llvm.amdgcn.sqrt.f32(float %src)
89 %rcp = call contract float @llvm.amdgcn.rcp.f32(float %sqrt)
98 %sqrt = call float @llvm.amdgcn.sqrt.f32(float %src)
99 %rcp = call contract float @llvm.amdgcn.rcp.f32(float %sqrt)
[all …]
/llvm-project/llvm/test/Transforms/InstCombine/AMDGPU/
H A Drcp-contract-rsq.ll4 declare half @llvm.amdgcn.sqrt.f16(half)
5 declare float @llvm.amdgcn.sqrt.f32(float)
6 declare double @llvm.amdgcn.sqrt.f64(double)
17 declare half @llvm.sqrt.f16(half)
18 declare float @llvm.sqrt.f32(float)
19 declare double @llvm.sqrt.f64(double)
28 %sqrt = call contract float @llvm.amdgcn.sqrt.f32(float %x)
29 %rsq = call contract float @llvm.amdgcn.rcp.f32(float %sqrt)
37 ; CHECK-NEXT: [[SQRT:%.*]] = call float @llvm.amdgcn.sqrt.f32(float [[X]])
38 ; CHECK-NEXT: [[RSQ:%.*]] = call contract float @llvm.amdgcn.rcp.f32(float [[SQRT]])
[all …]
/llvm-project/llvm/test/CodeGen/NVPTX/
H A Drsqrt-opt.ll1 ; RUN: llc < %s -mtriple=nvptx64 | FileCheck %s --check-prefixes CHECK,CHECK-APPROX-OPT,CHECK-SQRT-NOOPT
2 ; RUN: llc < %s -mtriple=nvptx64 -nvptx-prec-sqrtf32=0 | FileCheck %s --check-prefixes CHECK,CHECK-APPROX-OPT,CHECK-SQRT-OPT
3 ; RUN: llc < %s -mtriple=nvptx64 -nvptx-rsqrt-approx-opt=0 | FileCheck %s --check-prefixes CHECK,CHECK-APPROX-NOOPT,CHECK-SQRT-NOOPT
13 ; CHECK-APPROX-NOOPT: sqrt.approx.f32
15 %sqrt = tail call float @llvm.nvvm.sqrt.approx.f(float %in)
16 %rsqrt = fdiv float 1.0, %sqrt
22 ; CHECK-APPROX-NOOPT: sqrt.approx.ftz.f32
24 %sqrt = tail call float @llvm.nvvm.sqrt
[all...]
H A Dsqrt-approx.ll10 declare float @llvm.sqrt.f32(float)
11 declare double @llvm.sqrt.f64(double)
13 ; -- reciprocal sqrt --
18 %val = tail call float @llvm.sqrt.f32(float %a)
26 %val = tail call float @llvm.sqrt.f32(float %a)
34 %val = tail call double @llvm.sqrt.f64(double %a)
43 %val = tail call double @llvm.sqrt.f64(double %a)
48 ; -- sqrt --
52 ; CHECK: sqrt.rn.f32
53 %ret = tail call float @llvm.sqrt
[all...]
/llvm-project/llvm/test/Transforms/InstCombine/
H A Dfmul-sqrt.ll4 declare double @llvm.sqrt.f64(double) nounwind readnone speculatable
5 declare <2 x float> @llvm.sqrt.v2f32(<2 x float>)
8 ; sqrt(a) * sqrt(b) no math flags
12 ; CHECK-NEXT: [[TMP1:%.*]] = call double @llvm.sqrt.f64(double [[A:%.*]])
13 ; CHECK-NEXT: [[TMP2:%.*]] = call double @llvm.sqrt.f64(double [[B:%.*]])
17 %1 = call double @llvm.sqrt.f64(double %a)
18 %2 = call double @llvm.sqrt.f64(double %b)
23 ; sqrt(a) * sqrt(
[all...]
H A Dfdiv-sqrt.ll4 declare double @llvm.sqrt.f64(double)
10 ; CHECK-NEXT: [[TMP1:%.*]] = call fast double @llvm.sqrt.f64(double [[TMP0]])
16 %sqrt = call fast double @llvm.sqrt.f64(double %div)
17 %div1 = fdiv fast double %x, %sqrt
25 ; CHECK-NEXT: [[SQRT:%.*]] = call double @llvm.sqrt.f64(double [[DIV]])
26 ; CHECK-NEXT: [[DIV1:%.*]] = fdiv double [[X:%.*]], [[SQRT]]
31 %sqrt = call double @llvm.sqrt
[all...]
H A Dpow-sqrt.ll6 ; The transform to sqrt is not allowed if we risk setting errno due to -INF.
17 ; The transform to (non-errno setting) sqrt is allowed as long as we deal with -0.0 and -INF.
21 ; CHECK-NEXT: [[SQRT:%.*]] = call double @llvm.sqrt.f64(double [[X:%.*]])
22 ; CHECK-NEXT: [[ABS:%.*]] = call double @llvm.fabs.f64(double [[SQRT]])
33 ; (As above) the transform to sqrt may generate EDOM due to -INF. Generally, EDOM implies
47 ; (As above) the transform to (non-errno setting) sqrt is allowed as long as we deal with -0.0
52 ; CHECK-NEXT: [[SQRT:%.*]] = call afn <2 x double> @llvm.sqrt.v2f64(<2 x double> [[X:%.*]])
53 ; CHECK-NEXT: [[ABS:%.*]] = call afn <2 x double> @llvm.fabs.v2f64(<2 x double> [[SQRT]])
[all...]
H A Dsqrt.ll10 %call = tail call double @sqrt(double %conv) readnone nounwind
23 %call = tail call double @sqrt(double %conv) nounwind
29 ; Can't fold (fptrunc (sqrt (fpext x))) -> (sqrtf x) since there is another
30 ; use of sqrt result.
34 ; CHECK-NEXT: [[CALL34:%.*]] = call double @sqrt(double 0x7FF8000000000000) #[[ATTR4]]
44 %call34 = call double @sqrt(double %conv) readnone
58 %r = call double @sqrt(double %d)
64 ; CHECK-NEXT: [[SQRT:%.*]] = call nnan float @sqrtf(float [[X:%.*]])
65 ; CHECK-NEXT: ret float [[SQRT]]
67 %sqrt
[all...]
/llvm-project/llvm/test/Analysis/CostModel/RISCV/
H A Dfp-sqrt-pow.ll5 define void @sqrt() {
6 ; CHECK-LABEL: 'sqrt'
7 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = call bfloat @llvm.sqrt.bf16(bfloat poison)
8 ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %2 = call <2 x bfloat> @llvm.sqrt.v2bf16(<2 x bfloat> poison)
9 ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %3 = call <4 x bfloat> @llvm.sqrt.v4bf16(<4 x bfloat> poison)
10 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %4 = call <8 x bfloat> @llvm.sqrt.v8bf16(<8 x bfloat> poison)
11 ; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %5 = call <16 x bfloat> @llvm.sqrt.v16bf16(<16 x bfloat> poison)
12 ; CHECK-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %6 = call <32 x bfloat> @llvm.sqrt.v32bf16(<32 x bfloat> poison)
13 ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %7 = call <vscale x 2 x bfloat> @llvm.sqrt.nxv2bf16(<vscale x 2 x bfloat> poison)
14 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %8 = call <vscale x 4 x bfloat> @llvm.sqrt
[all...]
/llvm-project/llvm/test/CodeGen/SystemZ/
H A Dfp-strict-alias.ll5 declare float @llvm.experimental.constrained.sqrt.f32(float, metadata, metadata)
6 declare float @llvm.sqrt.f32(float)
25 %sqrt1 = call float @llvm.sqrt.f32(float %f1)
26 %sqrt2 = call float @llvm.sqrt.f32(float %f2)
42 %sqrt1 = call float @llvm.experimental.constrained.sqrt.f32(
46 %sqrt2 = call float @llvm.experimental.constrained.sqrt.f32(
65 %sqrt1 = call float @llvm.experimental.constrained.sqrt.f32(
69 %sqrt2 = call float @llvm.experimental.constrained.sqrt.f32(
88 %sqrt1 = call float @llvm.experimental.constrained.sqrt.f32(
92 %sqrt2 = call float @llvm.experimental.constrained.sqrt.f32(
[all …]
H A Dfp-sqrt-02.ll7 declare double @llvm.sqrt.f64(double %f)
8 declare double @sqrt(double)
15 %res = call double @llvm.sqrt.f64(double %val)
25 %res = call double @llvm.sqrt.f64(double %val)
36 %res = call double @llvm.sqrt.f64(double %val)
49 %res = call double @llvm.sqrt.f64(double %val)
61 %res = call double @llvm.sqrt.f64(double %val)
74 %res = call double @llvm.sqrt.f64(double %val)
102 %sqrt0 = call double @llvm.sqrt.f64(double %val0)
103 %sqrt1 = call double @llvm.sqrt.f64(double %val1)
[all …]
H A Dfp-sqrt-01.ll7 declare float @llvm.sqrt.f32(float)
15 %res = call float @llvm.sqrt.f32(float %val)
25 %res = call float @llvm.sqrt.f32(float %val)
36 %res = call float @llvm.sqrt.f32(float %val)
49 %res = call float @llvm.sqrt.f32(float %val)
61 %res = call float @llvm.sqrt.f32(float %val)
74 %res = call float @llvm.sqrt.f32(float %val)
102 %sqrt0 = call float @llvm.sqrt.f32(float %val0)
103 %sqrt1 = call float @llvm.sqrt.f32(float %val1)
104 %sqrt2 = call float @llvm.sqrt.f32(float %val2)
[all …]
/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/
H A Dcombine-fdiv-sqrt-to-rsq.mir21 %sqrt:_(s16) = contract G_FSQRT %x
23 %rsq:_(s16) = contract G_FDIV %one, %sqrt
41 ; GCN-NEXT: %sqrt:_(s16) = G_FSQRT %x
43 ; GCN-NEXT: %rsq:_(s16) = contract G_FDIV %one, %sqrt
48 %sqrt:_(s16) = G_FSQRT %x
50 %rsq:_(s16) = contract G_FDIV %one, %sqrt
68 ; GCN-NEXT: %sqrt:_(s16) = contract G_FSQRT %x
70 ; GCN-NEXT: %rsq:_(s16) = G_FDIV %one, %sqrt
75 %sqrt:_(s16) = contract G_FSQRT %x
77 %rsq:_(s16) = G_FDIV %one, %sqrt
[all …]
/llvm-project/llvm/test/Transforms/AggressiveInstCombine/X86/
H A Dsqrt.ll5 declare double @sqrt(double)
15 ; CHECK-NEXT: [[SQRT1:%.*]] = call nnan float @llvm.sqrt.f32(float [[X:%.*]])
18 %sqrt = call nnan float @sqrtf(float %x)
19 ret float %sqrt
27 ; CHECK-NEXT: [[SQRT1:%.*]] = call nnan ninf double @llvm.sqrt.f64(double [[X:%.*]])
30 %sqrt = tail call nnan ninf double @sqrt(double %x)
31 ret double %sqrt
39 ; CHECK-NEXT: [[SQRT:%.*]] = call nnan fp128 @sqrtl(fp128 [[X:%.*]])
40 ; CHECK-NEXT: ret fp128 [[SQRT]]
42 %sqrt = call nnan fp128 @sqrtl(fp128 %x)
[all …]
/llvm-project/flang/test/Evaluate/
H A Dfolding28.f902 ! Tests folding of SQRT()
7 logical, parameter :: test_inf8 = sqrt(inf8) == inf8
11 real(8), parameter :: sqrt_h8 = sqrt(h8), sqrt_h8z = z'5fefffffffffffff'
15 ! -0 (sqrt is -0)
17 real(8), parameter :: sqrt_n08 = sqrt(n08)
24 real(8), parameter :: sqrt_t8 = sqrt(t8), sqrt_t8z = z'2000000000000000'
30 real(8), parameter :: sqrt_maxs8 = sqrt(maxs8), sqrt_maxs8z = z'1fffffffffffffff'
34 real(8), parameter :: sqrt_mins8 = sqrt(mins8), sqrt_mins8z = z'1e60000000000000'
39 real(4), parameter :: sqrt_under1 = sqrt(.96875)
41 ! oddball case: the value before 1. is also its own sqrt, but not its own square
[all …]
/llvm-project/llvm/test/CodeGen/PowerPC/
H A Dvec_sqrt.ll3 ; Check for vector sqrt expansion using floating-point types, since altivec
9 declare <2 x float> @llvm.sqrt.v2f32(<2 x float> %val)
10 declare <4 x float> @llvm.sqrt.v4f32(<4 x float> %val)
11 declare <8 x float> @llvm.sqrt.v8f32(<8 x float> %val)
12 declare <2 x double> @llvm.sqrt.v2f64(<2 x double> %val)
13 declare <4 x double> @llvm.sqrt.v4f64(<4 x double> %val)
17 %sqrt = call <2 x float> @llvm.sqrt.v2f32 (<2 x float> %x)
18 ret <2 x float> %sqrt
20 ; sqrt (<2 x float>) is promoted to sqrt (<4 x float>)
29 %sqrt = call <4 x float> @llvm.sqrt.v4f32 (<4 x float> %x)
[all …]
/llvm-project/llvm/test/Transforms/Attributor/
H A Dnofpclass-sqrt.ll4 declare float @llvm.sqrt.f32(float)
5 declare <2 x float> @llvm.sqrt.v2f32(<2 x float>)
6 declare float @llvm.experimental.constrained.sqrt.f32(float, metadata, metadata)
11 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(ninf nsub nnorm) float @llvm.sqrt.f32(float [[ARG0]]…
14 %call = call float @llvm.sqrt.f32(float %arg0)
21 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(inf nsub nnorm) float @llvm.sqrt.f32(float nofpclass…
24 %call = call float @llvm.sqrt.f32(float %arg0)
31 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(inf nsub nnorm) float @llvm.sqrt.f32(float nofpclass…
34 %call = call float @llvm.sqrt.f32(float %arg0)
41 ; CHECK-NEXT: [[CALL:%.*]] = call nofpclass(ninf nsub nnorm) float @llvm.sqrt.f32(float nofpclas…
[all …]
/llvm-project/clang/test/CodeGenHLSL/builtins/
H A Dsqrt.hlsl9 // NATIVE_HALF: %{{.*}} = call reassoc nnan ninf nsz arcp afn half @llvm.sqrt.f16(
12 // NO_HALF: %{{.*}} = call reassoc nnan ninf nsz arcp afn float @llvm.sqrt.f32(
14 half test_sqrt_half(half p0) { return sqrt(p0); }
16 // NATIVE_HALF: %{{.*}} = call reassoc nnan ninf nsz arcp afn <2 x half> @llvm.sqrt.v2f16
19 // NO_HALF: %{{.*}} = call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.sqrt.v2f32(
21 half2 test_sqrt_half2(half2 p0) { return sqrt(p0); }
23 // NATIVE_HALF: %{{.*}} = call reassoc nnan ninf nsz arcp afn <3 x half> @llvm.sqrt.v3f16
26 // NO_HALF: %{{.*}} = call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.sqrt.v3f32(
28 half3 test_sqrt_half3(half3 p0) { return sqrt(p0); }
30 // NATIVE_HALF: %{{.*}} = call reassoc nnan ninf nsz arcp afn <4 x half> @llvm.sqrt
[all...]
/llvm-project/polly/lib/External/isl/imath/tests/
H A Droot.tc4 sqrt:0,0:0
5 sqrt:0,=1:0
6 sqrt:1,0:1
7 sqrt:1,=1:1
8 sqrt:1,5:1
9 sqrt:256,=1:16
10 sqrt:257,=1:16
11 sqrt:-1,0:$MP_UNDEF
12 sqrt:-1,=1:$MP_UNDEF
13 sqrt:-1029384298,66883:$MP_UNDEF
[all …]
/llvm-project/llvm/test/Transforms/SLPVectorizer/X86/
H A Dsqrt.ll14 declare float @llvm.sqrt.f32(float)
15 declare double @llvm.sqrt.f64(double)
18 ; SQRT
24 ; CHECK-NEXT: [[TMP2:%.*]] = call <2 x double> @llvm.sqrt.v2f64(<2 x double> [[TMP1]])
30 %sqrt0 = call double @llvm.sqrt.f64(double %a0)
31 %sqrt1 = call double @llvm.sqrt.f64(double %a1)
40 ; SSE-NEXT: [[TMP2:%.*]] = call <2 x double> @llvm.sqrt.v2f64(<2 x double> [[TMP1]])
43 ; SSE-NEXT: [[TMP4:%.*]] = call <2 x double> @llvm.sqrt.v2f64(<2 x double> [[TMP3]])
49 ; AVX-NEXT: [[TMP2:%.*]] = call <4 x double> @llvm.sqrt.v4f64(<4 x double> [[TMP1]])
57 %sqrt0 = call double @llvm.sqrt.f64(double %a0)
[all …]
/llvm-project/llvm/test/CodeGen/ARM/
H A Dpow.75.ll12 ; CHECK-NEXT: Creating new node: [[SQRT:t[0-9]+]]: f32 = fsqrt ninf nsz afn [[X]]
13 ; CHECK-NEXT: Creating new node: [[SQRTSQRT:t[0-9]+]]: f32 = fsqrt ninf nsz afn [[SQRT]]
14 ; CHECK-NEXT: Creating new node: [[R:t[0-9]+]]: f32 = fmul ninf nsz afn [[SQRT]], [[SQRTSQRT]]
15 ; CHECK-NEXT: ... into: [[R]]: f32 = fmul ninf nsz afn [[SQRT]], [[SQRTSQRT]]
22 ; CHECK-NEXT: Creating new node: [[SQRT:t[0-9]+]]: f64 = fsqrt ninf nsz afn [[X]]
23 ; CHECK-NEXT: Creating new node: [[SQRTSQRT:t[0-9]+]]: f64 = fsqrt ninf nsz afn [[SQRT]]
24 ; CHECK-NEXT: Creating new node: [[R:t[0-9]+]]: f64 = fmul ninf nsz afn [[SQRT]], [[SQRTSQRT]]
25 ; CHECK-NEXT: ... into: [[R]]: f64 = fmul ninf nsz afn [[SQRT]], [[SQRTSQRT]]
33 ; CHECK-NEXT: Creating new node: [[SQRT:t[0-9]+]]: f32 = fsqrt nnan ninf nsz arcp contract afn reas…
34 …eating new node: [[SQRTSQRT:t[0-9]+]]: f32 = fsqrt nnan ninf nsz arcp contract afn reassoc [[SQRT]]
[all …]
/llvm-project/flang/test/Lower/
H A Dsqrt.f9012 ! CHECK: fir.call @fir.sqrt.contract.f32.f32
13 b = sqrt(a)
19 ! CHECK: fir.call @fir.sqrt.contract.f64.f64
20 b = sqrt(a)
26 ! CHECK: fir.call @fir.sqrt.contract.z32.z32
27 z = sqrt(z)
33 ! CHECK: fir.call @fir.sqrt.contract.z64.z64
34 z = sqrt(z)
37 ! CHECK-LABEL: @fir.sqrt.contract.f32.f32
38 ! CHECK: math.sqrt
[all...]

12345678910>>...53