blob: 504f874beaebf134e414bba2f5f8821350c9b1d6 [file] [log] [blame]
Dan Gohman18fa17c2010-09-17 01:38:06 +00001; RUN: opt -instcombine -S < %s | FileCheck %s
2
3; This shouldn't fold, because sin(inf) is invalid.
4; CHECK: @foo
5; CHECK: %t = call double @sin(double 0x7FF0000000000000)
6define double @foo() {
7 %t = call double @sin(double 0x7FF0000000000000)
8 ret double %t
9}
10
11; This should fold.
12; CHECK: @bar
Dan Gohman69531262010-09-17 20:15:53 +000013; CHECK: ret double 0.0
Dan Gohman18fa17c2010-09-17 01:38:06 +000014define double @bar() {
Dan Gohman69531262010-09-17 20:15:53 +000015 %t = call double @sin(double 0.0)
Dan Gohman18fa17c2010-09-17 01:38:06 +000016 ret double %t
17}
18
19declare double @sin(double)