]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/Transforms/InstCombine/fold-calls.ll
Vendor import of llvm release_34 branch r197841 (effectively, 3.4 RC3):
[FreeBSD/FreeBSD.git] / test / Transforms / InstCombine / fold-calls.ll
1 ; RUN: opt -instcombine -S < %s | FileCheck %s
2
3 ; This shouldn't fold, because sin(inf) is invalid.
4 ; CHECK-LABEL: @foo(
5 ; CHECK:   %t = call double @sin(double 0x7FF0000000000000)
6 define double @foo() {
7   %t = call double @sin(double 0x7FF0000000000000)
8   ret double %t
9 }
10
11 ; This should fold.
12 ; CHECK-LABEL: @bar(
13 ; CHECK:   ret double 0.0
14 define double @bar() {
15   %t = call double @sin(double 0.0)
16   ret double %t
17 }
18
19 declare double @sin(double)