YouCompleteMe/cpp/llvm/test/Transforms/InstCombine/fold-calls.ll
2012-07-05 17:51:06 -07:00

20 lines
433 B
LLVM

; RUN: opt -instcombine -S < %s | FileCheck %s
; This shouldn't fold, because sin(inf) is invalid.
; CHECK: @foo
; CHECK: %t = call double @sin(double 0x7FF0000000000000)
define double @foo() {
%t = call double @sin(double 0x7FF0000000000000)
ret double %t
}
; This should fold.
; CHECK: @bar
; CHECK: ret double 0.0
define double @bar() {
%t = call double @sin(double 0.0)
ret double %t
}
declare double @sin(double)