1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 12:41:49 +01:00

[TargetLibraryInfo] Teach isValidProtoForLibFunc about tan

We would fail to validate the type of the tan function which would cause
downstream users of isValidProtoForLibFunc to assert.

This fixes PR28143.

llvm-svn: 272802
This commit is contained in:
David Majnemer 2016-06-15 16:47:23 +00:00
parent 8668b39a3e
commit 89fe9b6eda
2 changed files with 15 additions and 0 deletions

View File

@ -897,6 +897,9 @@ bool TargetLibraryInfoImpl::isValidProtoForLibFunc(const FunctionType &FTy,
case LibFunc::cos:
case LibFunc::cosf:
case LibFunc::cosl:
case LibFunc::tan:
case LibFunc::tanf:
case LibFunc::tanl:
case LibFunc::exp:
case LibFunc::expf:
case LibFunc::expl:

View File

@ -0,0 +1,12 @@
; RUN: opt -S -instcombine < %s | FileCheck %s
define void @test1() {
entry:
call void @tan()
ret void
}
; CHECK-LABEL: define void @test1(
; CHECK: call void @tan()
; CHECK-NEXT: ret void
declare void @tan()