You've already forked linux-packaging-mono
Imported Upstream version 5.18.0.167
Former-commit-id: 289509151e0fee68a1b591a20c9f109c3c789d3a
This commit is contained in:
parent
e19d552987
commit
b084638f15
@ -1,15 +0,0 @@
|
||||
; Make sure that the constant propogator doesn't divide by zero!
|
||||
;
|
||||
; RUN: opt < %s -constprop
|
||||
;
|
||||
|
||||
define i32 @test() {
|
||||
%R = sdiv i32 12, 0 ; <i32> [#uses=1]
|
||||
ret i32 %R
|
||||
}
|
||||
|
||||
define i32 @test2() {
|
||||
%R = srem i32 12, 0 ; <i32> [#uses=1]
|
||||
ret i32 %R
|
||||
}
|
||||
|
@ -1,19 +0,0 @@
|
||||
; This bug has to do with the fact that constant propagation was implemented in
|
||||
; terms of _logical_ not (! in C) instead of _bitwise_ not (~ in C). This was
|
||||
; due to a spec change.
|
||||
|
||||
; Fix #2: The unary not instruction now no longer exists. Change to xor.
|
||||
|
||||
; RUN: opt < %s -constprop -S | \
|
||||
; RUN: not grep "i32 0"
|
||||
|
||||
define i32 @test1() {
|
||||
%R = xor i32 123, -1 ; <i32> [#uses=1]
|
||||
ret i32 %R
|
||||
}
|
||||
|
||||
define i32 @test2() {
|
||||
%R = xor i32 -123, -1 ; <i32> [#uses=1]
|
||||
ret i32 %R
|
||||
}
|
||||
|
@ -1,20 +0,0 @@
|
||||
; SetCC on boolean values was not implemented!
|
||||
|
||||
; RUN: opt < %s -constprop -die -S | \
|
||||
; RUN: not grep set
|
||||
|
||||
define i1 @test1() {
|
||||
%A = icmp ule i1 true, false ; <i1> [#uses=1]
|
||||
%B = icmp uge i1 true, false ; <i1> [#uses=1]
|
||||
%C = icmp ult i1 false, true ; <i1> [#uses=1]
|
||||
%D = icmp ugt i1 true, false ; <i1> [#uses=1]
|
||||
%E = icmp eq i1 false, false ; <i1> [#uses=1]
|
||||
%F = icmp ne i1 false, true ; <i1> [#uses=1]
|
||||
%G = and i1 %A, %B ; <i1> [#uses=1]
|
||||
%H = and i1 %C, %D ; <i1> [#uses=1]
|
||||
%I = and i1 %E, %F ; <i1> [#uses=1]
|
||||
%J = and i1 %G, %H ; <i1> [#uses=1]
|
||||
%K = and i1 %I, %J ; <i1> [#uses=1]
|
||||
ret i1 %K
|
||||
}
|
||||
|
@ -1,15 +0,0 @@
|
||||
; Make sure that the constant propagator doesn't cause a sigfpe
|
||||
;
|
||||
; RUN: opt < %s -constprop
|
||||
;
|
||||
|
||||
define i32 @test() {
|
||||
%R = sdiv i32 -2147483648, -1 ; <i32> [#uses=1]
|
||||
ret i32 %R
|
||||
}
|
||||
|
||||
define i32 @test2() {
|
||||
%R = srem i32 -2147483648, -1 ; <i32> [#uses=1]
|
||||
ret i32 %R
|
||||
}
|
||||
|
@ -1,10 +0,0 @@
|
||||
; RUN: opt < %s -constprop -S | \
|
||||
; RUN: not grep "ret i1 false"
|
||||
|
||||
@b = external global [2 x { }] ; <[2 x { }]*> [#uses=2]
|
||||
|
||||
define i1 @f() {
|
||||
%tmp.2 = icmp eq { }* getelementptr ([2 x { }], [2 x { }]* @b, i32 0, i32 0), getelementptr ([2 x { }], [2 x { }]* @b, i32 0, i32 1) ; <i1> [#uses=1]
|
||||
ret i1 %tmp.2
|
||||
}
|
||||
|
@ -1,10 +0,0 @@
|
||||
; RUN: opt < %s -constprop -S | \
|
||||
; RUN: grep "i32 -1"
|
||||
; RUN: opt < %s -constprop -S | \
|
||||
; RUN: not grep zeroinitializer
|
||||
|
||||
define <4 x i32> @test() {
|
||||
%tmp40 = bitcast <2 x i64> bitcast (<4 x i32> < i32 0, i32 0, i32 -1, i32 0 > to <2 x i64>) to <4 x i32>; <<4 x i32>> [#uses=1]
|
||||
ret <4 x i32> %tmp40
|
||||
}
|
||||
|
@ -1,7 +0,0 @@
|
||||
; RUN: opt < %s -instcombine -S | \
|
||||
; RUN: grep "ret i1 false"
|
||||
define i1 @test() {
|
||||
%X = trunc i32 320 to i1 ; <i1> [#uses=1]
|
||||
ret i1 %X
|
||||
}
|
||||
|
@ -1,15 +0,0 @@
|
||||
; RUN: opt < %s -constprop -S | \
|
||||
; RUN: grep "ret i32 -1"
|
||||
; RUN: opt < %s -constprop -S | \
|
||||
; RUN: grep "ret i32 1"
|
||||
|
||||
define i32 @test1() {
|
||||
%A = sext i1 true to i32 ; <i32> [#uses=1]
|
||||
ret i32 %A
|
||||
}
|
||||
|
||||
define i32 @test2() {
|
||||
%A = zext i1 true to i32 ; <i32> [#uses=1]
|
||||
ret i32 %A
|
||||
}
|
||||
|
@ -1,7 +0,0 @@
|
||||
; RUN: opt < %s -constprop -S | grep 1065353216
|
||||
|
||||
define i32 @test() {
|
||||
%A = bitcast float 1.000000e+00 to i32 ; <i32> [#uses=1]
|
||||
ret i32 %A
|
||||
}
|
||||
|
@ -1,5 +0,0 @@
|
||||
; RUN: llvm-as < %s | llvm-dis | grep "global i32 0"
|
||||
; PR1215
|
||||
|
||||
@G = global i32 sdiv (i32 0, i32 -1)
|
||||
|
@ -1,8 +0,0 @@
|
||||
; RUN: opt < %s -constprop -S | grep "ret i13 13"
|
||||
; PR1816
|
||||
declare i13 @llvm.cttz.i13(i13, i1)
|
||||
|
||||
define i13 @test() {
|
||||
%X = call i13 @llvm.cttz.i13(i13 0, i1 false)
|
||||
ret i13 %X
|
||||
}
|
@ -1,28 +0,0 @@
|
||||
; RUN: opt < %s -constprop -disable-output
|
||||
; PR2529
|
||||
define <4 x i1> @test1(i32 %argc, i8** %argv) {
|
||||
entry:
|
||||
%foo = icmp slt <4 x i32> undef, <i32 14, i32 undef, i32 undef, i32 undef>
|
||||
ret <4 x i1> %foo
|
||||
}
|
||||
|
||||
define <4 x i1> @test2(i32 %argc, i8** %argv) {
|
||||
entry:
|
||||
%foo = icmp slt <4 x i32> <i32 undef, i32 undef, i32 undef, i32
|
||||
undef>, <i32 undef, i32 undef, i32 undef, i32 undef>
|
||||
ret <4 x i1> %foo
|
||||
}
|
||||
|
||||
|
||||
define <4 x i1> @test3() {
|
||||
%foo = fcmp ueq <4 x float> <float 0.0, float 0.0, float 0.0, float
|
||||
undef>, <float 1.0, float 1.0, float 1.0, float undef>
|
||||
ret <4 x i1> %foo
|
||||
}
|
||||
|
||||
define <4 x i1> @test4() {
|
||||
%foo = fcmp ueq <4 x float> <float 0.0, float 0.0, float 0.0, float 0.0>, <float 1.0, float 1.0, float 1.0, float 0.0>
|
||||
|
||||
ret <4 x i1> %foo
|
||||
}
|
||||
|
@ -1,11 +0,0 @@
|
||||
; RUN: llvm-as < %s | llvm-dis | not grep ptrtoint
|
||||
; PR4424
|
||||
@G = external global i32
|
||||
@test1 = constant i32 sdiv (i32 0, i32 ptrtoint (i32* @G to i32))
|
||||
@test2 = constant i32 udiv (i32 0, i32 ptrtoint (i32* @G to i32))
|
||||
@test3 = constant i32 srem (i32 0, i32 ptrtoint (i32* @G to i32))
|
||||
@test4 = constant i32 urem (i32 0, i32 ptrtoint (i32* @G to i32))
|
||||
@test5 = constant i32 lshr (i32 0, i32 ptrtoint (i32* @G to i32))
|
||||
@test6 = constant i32 ashr (i32 0, i32 ptrtoint (i32* @G to i32))
|
||||
@test7 = constant i32 shl (i32 0, i32 ptrtoint (i32* @G to i32))
|
||||
|
@ -1,24 +0,0 @@
|
||||
; RUN: opt < %s -constprop | llvm-dis
|
||||
; PR4848
|
||||
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128"
|
||||
target triple = "x86_64-unknown-linux-gnu"
|
||||
|
||||
%0 = type { %struct.anon }
|
||||
%1 = type { %0, %2, [24 x i8] }
|
||||
%2 = type <{ %3, %3 }>
|
||||
%3 = type { %struct.hrtimer_cpu_base*, i32, %struct.rb_root, %struct.rb_node*, %struct.pgprot, i64 ()*, [16 x i8] }
|
||||
%struct.anon = type { }
|
||||
%struct.hrtimer_clock_base = type { %struct.hrtimer_cpu_base*, i32, %struct.rb_root, %struct.rb_node*, %struct.pgprot, i64 ()*, %struct.pgprot, %struct.pgprot }
|
||||
%struct.hrtimer_cpu_base = type { %0, [2 x %struct.hrtimer_clock_base], %struct.pgprot, i32, i64 }
|
||||
%struct.pgprot = type { i64 }
|
||||
%struct.rb_node = type { i64, %struct.rb_node*, %struct.rb_node* }
|
||||
%struct.rb_root = type { %struct.rb_node* }
|
||||
|
||||
@per_cpu__hrtimer_bases = external global %1, align 8 ; <%1*> [#uses=1]
|
||||
|
||||
define void @init_hrtimers_cpu(i32 %cpu) nounwind noredzone section ".cpuinit.text" {
|
||||
entry:
|
||||
%tmp3 = getelementptr %struct.hrtimer_cpu_base, %struct.hrtimer_cpu_base* bitcast (%1* @per_cpu__hrtimer_bases to %struct.hrtimer_cpu_base*), i32 0, i32 0 ; <%0*> [#uses=1]
|
||||
%tmp5 = bitcast %0* %tmp3 to i8* ; <i8*> [#uses=0]
|
||||
unreachable
|
||||
}
|
@ -1,32 +0,0 @@
|
||||
; RUN: opt < %s -constprop -S | FileCheck %s
|
||||
|
||||
; CHECK-LABEL: @test1
|
||||
define i32 @test1() {
|
||||
%A = bitcast i32 2139171423 to float
|
||||
%B = insertelement <1 x float> undef, float %A, i32 0
|
||||
%C = extractelement <1 x float> %B, i32 0
|
||||
%D = bitcast float %C to i32
|
||||
ret i32 %D
|
||||
; CHECK: ret i32 2139171423
|
||||
}
|
||||
|
||||
; CHECK-LABEL: @insertelement
|
||||
define <4 x i64> @insertelement() {
|
||||
%vec1 = insertelement <4 x i64> undef, i64 -1, i32 0
|
||||
%vec2 = insertelement <4 x i64> %vec1, i64 -2, i32 1
|
||||
%vec3 = insertelement <4 x i64> %vec2, i64 -3, i32 2
|
||||
%vec4 = insertelement <4 x i64> %vec3, i64 -4, i32 3
|
||||
; CHECK: ret <4 x i64> <i64 -1, i64 -2, i64 -3, i64 -4>
|
||||
ret <4 x i64> %vec4
|
||||
}
|
||||
|
||||
; CHECK-LABEL: @insertelement_undef
|
||||
define <4 x i64> @insertelement_undef() {
|
||||
%vec1 = insertelement <4 x i64> undef, i64 -1, i32 0
|
||||
%vec2 = insertelement <4 x i64> %vec1, i64 -2, i32 1
|
||||
%vec3 = insertelement <4 x i64> %vec2, i64 -3, i32 2
|
||||
%vec4 = insertelement <4 x i64> %vec3, i64 -4, i32 3
|
||||
%vec5 = insertelement <4 x i64> %vec3, i64 -5, i32 4
|
||||
; CHECK: ret <4 x i64> undef
|
||||
ret <4 x i64> %vec5
|
||||
}
|
@ -1,53 +0,0 @@
|
||||
; RUN: opt < %s -constprop -die -S | FileCheck %s
|
||||
|
||||
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128"
|
||||
target triple = "x86_64-apple-macosx10.7.2"
|
||||
|
||||
; This is a basic sanity check for constant propagation. The add instruction
|
||||
; should be eliminated.
|
||||
define i32 @test1(i1 %B) {
|
||||
br i1 %B, label %BB1, label %BB2
|
||||
|
||||
BB1:
|
||||
%Val = add i32 0, 0
|
||||
br label %BB3
|
||||
|
||||
BB2:
|
||||
br label %BB3
|
||||
|
||||
BB3:
|
||||
; CHECK-LABEL: @test1(
|
||||
; CHECK: %Ret = phi i32 [ 0, %BB1 ], [ 1, %BB2 ]
|
||||
%Ret = phi i32 [ %Val, %BB1 ], [ 1, %BB2 ]
|
||||
ret i32 %Ret
|
||||
}
|
||||
|
||||
|
||||
; PR6197
|
||||
define i1 @test2(i8* %f) nounwind {
|
||||
entry:
|
||||
%V = icmp ne i8* blockaddress(@test2, %bb), null
|
||||
br label %bb
|
||||
bb:
|
||||
ret i1 %V
|
||||
|
||||
; CHECK-LABEL: @test2(
|
||||
; CHECK: ret i1 true
|
||||
}
|
||||
|
||||
define i1 @TNAN() {
|
||||
; CHECK-LABEL: @TNAN(
|
||||
; CHECK: ret i1 true
|
||||
%A = fcmp uno double 0x7FF8000000000000, 1.000000e+00
|
||||
%B = fcmp uno double 1.230000e+02, 1.000000e+00
|
||||
%C = or i1 %A, %B
|
||||
ret i1 %C
|
||||
}
|
||||
|
||||
define i128 @vector_to_int_cast() {
|
||||
%A = bitcast <4 x i32> <i32 1073741824, i32 1073741824, i32 1073741824, i32 1073741824> to i128
|
||||
ret i128 %A
|
||||
; CHECK-LABEL: @vector_to_int_cast(
|
||||
; CHECK: ret i128 85070591750041656499021422275829170176
|
||||
}
|
||||
|
@ -1,10 +0,0 @@
|
||||
; RUN: opt < %s -constprop -S | FileCheck %s
|
||||
; PR2165
|
||||
|
||||
define <1 x i64> @test1() {
|
||||
%A = bitcast i64 63 to <1 x i64>
|
||||
ret <1 x i64> %A
|
||||
; CHECK-LABEL: @test1(
|
||||
; CHECK: ret <1 x i64> <i64 63>
|
||||
}
|
||||
|
41
external/llvm/test/Transforms/ConstProp/bswap.ll
vendored
41
external/llvm/test/Transforms/ConstProp/bswap.ll
vendored
@ -1,41 +0,0 @@
|
||||
; bswap should be constant folded when it is passed a constant argument
|
||||
|
||||
; RUN: opt < %s -constprop -S | FileCheck %s
|
||||
|
||||
declare i16 @llvm.bswap.i16(i16)
|
||||
|
||||
declare i32 @llvm.bswap.i32(i32)
|
||||
|
||||
declare i64 @llvm.bswap.i64(i64)
|
||||
|
||||
declare i80 @llvm.bswap.i80(i80)
|
||||
|
||||
; CHECK-LABEL: define i16 @W(
|
||||
define i16 @W() {
|
||||
; CHECK: ret i16 256
|
||||
%Z = call i16 @llvm.bswap.i16( i16 1 ) ; <i16> [#uses=1]
|
||||
ret i16 %Z
|
||||
}
|
||||
|
||||
; CHECK-LABEL: define i32 @X(
|
||||
define i32 @X() {
|
||||
; CHECK: ret i32 16777216
|
||||
%Z = call i32 @llvm.bswap.i32( i32 1 ) ; <i32> [#uses=1]
|
||||
ret i32 %Z
|
||||
}
|
||||
|
||||
; CHECK-LABEL: define i64 @Y(
|
||||
define i64 @Y() {
|
||||
; CHECK: ret i64 72057594037927936
|
||||
%Z = call i64 @llvm.bswap.i64( i64 1 ) ; <i64> [#uses=1]
|
||||
ret i64 %Z
|
||||
}
|
||||
|
||||
; CHECK-LABEL: define i80 @Z(
|
||||
define i80 @Z() {
|
||||
; CHECK: ret i80 -450681596205739728166896
|
||||
; 0xA0908070605040302010
|
||||
%Z = call i80 @llvm.bswap.i80( i80 76151636403560493650080 )
|
||||
; 0x102030405060708090A0
|
||||
ret i80 %Z
|
||||
}
|
@ -1,83 +0,0 @@
|
||||
; RUN: opt < %s -constprop -S | FileCheck %s
|
||||
|
||||
; Test to verify constant folding can occur when math
|
||||
; routines are mapped to the __<func>_finite versions
|
||||
; of functions due to __FINITE_MATH_ONLY__ being
|
||||
; enabled on headers. All calls should constant
|
||||
; fold away in this test.
|
||||
|
||||
declare double @__acos_finite(double) #0
|
||||
declare float @__acosf_finite(float) #0
|
||||
declare double @__asin_finite(double) #0
|
||||
declare float @__asinf_finite(float) #0
|
||||
declare double @__atan2_finite(double, double) #0
|
||||
declare float @__atan2f_finite(float, float) #0
|
||||
declare double @__cosh_finite(double) #0
|
||||
declare float @__coshf_finite(float) #0
|
||||
declare double @__exp2_finite(double) #0
|
||||
declare float @__exp2f_finite(float) #0
|
||||
declare double @__exp_finite(double) #0
|
||||
declare float @__expf_finite(float) #0
|
||||
declare double @__log10_finite(double) #0
|
||||
declare float @__log10f_finite(float) #0
|
||||
declare double @__log_finite(double) #0
|
||||
declare float @__logf_finite(float) #0
|
||||
declare double @__pow_finite(double, double) #0
|
||||
declare float @__powf_finite(float, float) #0
|
||||
declare double @__sinh_finite(double) #0
|
||||
declare float @__sinhf_finite(float) #0
|
||||
|
||||
attributes #0 = { nounwind readnone }
|
||||
|
||||
define void @T() {
|
||||
; CHECK-LABEL: @T(
|
||||
|
||||
; CHECK-NOT: call
|
||||
; CHECK: ret
|
||||
|
||||
%slot = alloca double
|
||||
%slotf = alloca float
|
||||
|
||||
%ACOS = call fast double @__acos_finite(double 1.000000e+00)
|
||||
store double %ACOS, double* %slot
|
||||
%ASIN = call fast double @__asin_finite(double 1.000000e+00)
|
||||
store double %ASIN, double* %slot
|
||||
%ATAN2 = call fast double @__atan2_finite(double 3.000000e+00, double 4.000000e+00)
|
||||
store double %ATAN2, double* %slot
|
||||
%COSH = call fast double @__cosh_finite(double 3.000000e+00)
|
||||
store double %COSH, double* %slot
|
||||
%EXP = call fast double @__exp_finite(double 3.000000e+00)
|
||||
store double %EXP, double* %slot
|
||||
%EXP2 = call fast double @__exp2_finite(double 3.000000e+00)
|
||||
store double %EXP2, double* %slot
|
||||
%LOG = call fast double @__log_finite(double 3.000000e+00)
|
||||
store double %LOG, double* %slot
|
||||
%LOG10 = call fast double @__log10_finite(double 3.000000e+00)
|
||||
store double %LOG10, double* %slot
|
||||
%POW = call fast double @__pow_finite(double 1.000000e+00, double 4.000000e+00)
|
||||
store double %POW, double* %slot
|
||||
%SINH = call fast double @__sinh_finite(double 3.000000e+00)
|
||||
store double %SINH, double* %slot
|
||||
|
||||
%ACOSF = call fast float @__acosf_finite(float 1.000000e+00)
|
||||
store float %ACOSF, float* %slotf
|
||||
%ASINF = call fast float @__asinf_finite(float 1.000000e+00)
|
||||
store float %ASINF, float* %slotf
|
||||
%ATAN2F = call fast float @__atan2f_finite(float 3.000000e+00, float 4.000000e+00)
|
||||
store float %ATAN2F, float* %slotf
|
||||
%COSHF = call fast float @__coshf_finite(float 3.000000e+00)
|
||||
store float %COSHF, float* %slotf
|
||||
%EXPF = call fast float @__expf_finite(float 3.000000e+00)
|
||||
store float %EXPF, float* %slotf
|
||||
%EXP2F = call fast float @__exp2f_finite(float 3.000000e+00)
|
||||
store float %EXP2F, float* %slotf
|
||||
%LOGF = call fast float @__logf_finite(float 3.000000e+00)
|
||||
store float %LOGF, float* %slotf
|
||||
%LOG10F = call fast float @__log10f_finite(float 3.000000e+00)
|
||||
store float %LOG10F, float* %slotf
|
||||
%POWF = call fast float @__powf_finite(float 3.000000e+00, float 4.000000e+00)
|
||||
store float %POWF, float* %slotf
|
||||
%SINHF = call fast float @__sinhf_finite(float 3.000000e+00)
|
||||
store float %SINHF, float* %slotf
|
||||
ret void
|
||||
}
|
196
external/llvm/test/Transforms/ConstProp/calls.ll
vendored
196
external/llvm/test/Transforms/ConstProp/calls.ll
vendored
@ -1,196 +0,0 @@
|
||||
; RUN: opt < %s -constprop -S | FileCheck %s
|
||||
; RUN: opt < %s -constprop -disable-simplify-libcalls -S | FileCheck %s --check-prefix=FNOBUILTIN
|
||||
|
||||
declare double @acos(double) readnone nounwind
|
||||
declare double @asin(double) readnone nounwind
|
||||
declare double @atan(double) readnone nounwind
|
||||
declare double @atan2(double, double) readnone nounwind
|
||||
declare double @ceil(double) readnone nounwind
|
||||
declare double @cos(double) readnone nounwind
|
||||
declare double @cosh(double) readnone nounwind
|
||||
declare double @exp(double) readnone nounwind
|
||||
declare double @exp2(double) readnone nounwind
|
||||
declare double @fabs(double) readnone nounwind
|
||||
declare double @floor(double) readnone nounwind
|
||||
declare double @fmod(double, double) readnone nounwind
|
||||
declare double @log(double) readnone nounwind
|
||||
declare double @log10(double) readnone nounwind
|
||||
declare double @pow(double, double) readnone nounwind
|
||||
declare double @round(double) readnone nounwind
|
||||
declare double @sin(double) readnone nounwind
|
||||
declare double @sinh(double) readnone nounwind
|
||||
declare double @sqrt(double) readnone nounwind
|
||||
declare double @tan(double) readnone nounwind
|
||||
declare double @tanh(double) readnone nounwind
|
||||
|
||||
declare float @acosf(float) readnone nounwind
|
||||
declare float @asinf(float) readnone nounwind
|
||||
declare float @atanf(float) readnone nounwind
|
||||
declare float @atan2f(float, float) readnone nounwind
|
||||
declare float @ceilf(float) readnone nounwind
|
||||
declare float @cosf(float) readnone nounwind
|
||||
declare float @coshf(float) readnone nounwind
|
||||
declare float @expf(float) readnone nounwind
|
||||
declare float @exp2f(float) readnone nounwind
|
||||
declare float @fabsf(float) readnone nounwind
|
||||
declare float @floorf(float) readnone nounwind
|
||||
declare float @fmodf(float, float) readnone nounwind
|
||||
declare float @logf(float) readnone nounwind
|
||||
declare float @log10f(float) readnone nounwind
|
||||
declare float @powf(float, float) readnone nounwind
|
||||
declare float @roundf(float) readnone nounwind
|
||||
declare float @sinf(float) readnone nounwind
|
||||
declare float @sinhf(float) readnone nounwind
|
||||
declare float @sqrtf(float) readnone nounwind
|
||||
declare float @tanf(float) readnone nounwind
|
||||
declare float @tanhf(float) readnone nounwind
|
||||
|
||||
define double @T() {
|
||||
; CHECK-LABEL: @T(
|
||||
; FNOBUILTIN-LABEL: @T(
|
||||
|
||||
; CHECK-NOT: call
|
||||
; CHECK: ret
|
||||
%A = call double @cos(double 0.000000e+00)
|
||||
%B = call double @sin(double 0.000000e+00)
|
||||
%a = fadd double %A, %B
|
||||
%C = call double @tan(double 0.000000e+00)
|
||||
%b = fadd double %a, %C
|
||||
%D = call double @sqrt(double 4.000000e+00)
|
||||
%c = fadd double %b, %D
|
||||
|
||||
%slot = alloca double
|
||||
%slotf = alloca float
|
||||
; FNOBUILTIN: call
|
||||
%1 = call double @acos(double 1.000000e+00)
|
||||
store double %1, double* %slot
|
||||
; FNOBUILTIN: call
|
||||
%2 = call double @asin(double 1.000000e+00)
|
||||
store double %2, double* %slot
|
||||
; FNOBUILTIN: call
|
||||
%3 = call double @atan(double 3.000000e+00)
|
||||
store double %3, double* %slot
|
||||
; FNOBUILTIN: call
|
||||
%4 = call double @atan2(double 3.000000e+00, double 4.000000e+00)
|
||||
store double %4, double* %slot
|
||||
; FNOBUILTIN: call
|
||||
%5 = call double @ceil(double 3.000000e+00)
|
||||
store double %5, double* %slot
|
||||
; FNOBUILTIN: call
|
||||
%6 = call double @cosh(double 3.000000e+00)
|
||||
store double %6, double* %slot
|
||||
; FNOBUILTIN: call
|
||||
%7 = call double @exp(double 3.000000e+00)
|
||||
store double %7, double* %slot
|
||||
; FNOBUILTIN: call
|
||||
%8 = call double @exp2(double 3.000000e+00)
|
||||
store double %8, double* %slot
|
||||
; FNOBUILTIN: call
|
||||
%9 = call double @fabs(double 3.000000e+00)
|
||||
store double %9, double* %slot
|
||||
; FNOBUILTIN: call
|
||||
%10 = call double @floor(double 3.000000e+00)
|
||||
store double %10, double* %slot
|
||||
; FNOBUILTIN: call
|
||||
%11 = call double @fmod(double 3.000000e+00, double 4.000000e+00)
|
||||
store double %11, double* %slot
|
||||
; FNOBUILTIN: call
|
||||
%12 = call double @log(double 3.000000e+00)
|
||||
store double %12, double* %slot
|
||||
; FNOBUILTIN: call
|
||||
%13 = call double @log10(double 3.000000e+00)
|
||||
store double %13, double* %slot
|
||||
; FNOBUILTIN: call
|
||||
%14 = call double @pow(double 3.000000e+00, double 4.000000e+00)
|
||||
store double %14, double* %slot
|
||||
; FNOBUILTIN: call
|
||||
%round_val = call double @round(double 3.000000e+00)
|
||||
store double %round_val, double* %slot
|
||||
; FNOBUILTIN: call
|
||||
%15 = call double @sinh(double 3.000000e+00)
|
||||
store double %15, double* %slot
|
||||
; FNOBUILTIN: call
|
||||
%16 = call double @tanh(double 3.000000e+00)
|
||||
store double %16, double* %slot
|
||||
; FNOBUILTIN: call
|
||||
%17 = call float @acosf(float 1.000000e+00)
|
||||
store float %17, float* %slotf
|
||||
; FNOBUILTIN: call
|
||||
%18 = call float @asinf(float 1.000000e+00)
|
||||
store float %18, float* %slotf
|
||||
; FNOBUILTIN: call
|
||||
%19 = call float @atanf(float 3.000000e+00)
|
||||
store float %19, float* %slotf
|
||||
; FNOBUILTIN: call
|
||||
%20 = call float @atan2f(float 3.000000e+00, float 4.000000e+00)
|
||||
store float %20, float* %slotf
|
||||
; FNOBUILTIN: call
|
||||
%21 = call float @ceilf(float 3.000000e+00)
|
||||
store float %21, float* %slotf
|
||||
; FNOBUILTIN: call
|
||||
%22 = call float @cosf(float 3.000000e+00)
|
||||
store float %22, float* %slotf
|
||||
; FNOBUILTIN: call
|
||||
%23 = call float @coshf(float 3.000000e+00)
|
||||
store float %23, float* %slotf
|
||||
; FNOBUILTIN: call
|
||||
%24 = call float @expf(float 3.000000e+00)
|
||||
store float %24, float* %slotf
|
||||
; FNOBUILTIN: call
|
||||
%25 = call float @exp2f(float 3.000000e+00)
|
||||
store float %25, float* %slotf
|
||||
; FNOBUILTIN: call
|
||||
%26 = call float @fabsf(float 3.000000e+00)
|
||||
store float %26, float* %slotf
|
||||
; FNOBUILTIN: call
|
||||
%27 = call float @floorf(float 3.000000e+00)
|
||||
store float %27, float* %slotf
|
||||
; FNOBUILTIN: call
|
||||
%28 = call float @fmodf(float 3.000000e+00, float 4.000000e+00)
|
||||
store float %28, float* %slotf
|
||||
; FNOBUILTIN: call
|
||||
%29 = call float @logf(float 3.000000e+00)
|
||||
store float %29, float* %slotf
|
||||
; FNOBUILTIN: call
|
||||
%30 = call float @log10f(float 3.000000e+00)
|
||||
store float %30, float* %slotf
|
||||
; FNOBUILTIN: call
|
||||
%31 = call float @powf(float 3.000000e+00, float 4.000000e+00)
|
||||
store float %31, float* %slotf
|
||||
; FNOBUILTIN: call
|
||||
%roundf_val = call float @roundf(float 3.000000e+00)
|
||||
store float %roundf_val, float* %slotf
|
||||
; FNOBUILTIN: call
|
||||
%32 = call float @sinf(float 3.000000e+00)
|
||||
store float %32, float* %slotf
|
||||
; FNOBUILTIN: call
|
||||
%33 = call float @sinhf(float 3.000000e+00)
|
||||
store float %33, float* %slotf
|
||||
; FNOBUILTIN: call
|
||||
%34 = call float @sqrtf(float 3.000000e+00)
|
||||
store float %34, float* %slotf
|
||||
; FNOBUILTIN: call
|
||||
%35 = call float @tanf(float 3.000000e+00)
|
||||
store float %35, float* %slotf
|
||||
; FNOBUILTIN: call
|
||||
%36 = call float @tanhf(float 3.000000e+00)
|
||||
store float %36, float* %slotf
|
||||
|
||||
; FNOBUILTIN: ret
|
||||
|
||||
; PR9315
|
||||
%E = call double @exp2(double 4.0)
|
||||
%d = fadd double %c, %E
|
||||
ret double %d
|
||||
}
|
||||
|
||||
define double @test_intrinsic_pow() nounwind uwtable ssp {
|
||||
entry:
|
||||
; CHECK-LABEL: @test_intrinsic_pow(
|
||||
; CHECK-NOT: call
|
||||
; CHECK: ret
|
||||
%0 = call double @llvm.pow.f64(double 1.500000e+00, double 3.000000e+00)
|
||||
ret double %0
|
||||
}
|
||||
|
||||
declare double @llvm.pow.f64(double, double) nounwind readonly
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user