2010-09-17 01:38:06 +00:00
|
|
|
; RUN: opt -instcombine -S < %s | FileCheck %s
|
|
|
|
|
|
|
|
; This shouldn't fold, because sin(inf) is invalid.
|
2013-07-14 01:42:54 +00:00
|
|
|
; CHECK-LABEL: @foo(
|
2010-09-17 01:38:06 +00:00
|
|
|
; CHECK: %t = call double @sin(double 0x7FF0000000000000)
|
|
|
|
define double @foo() {
|
|
|
|
%t = call double @sin(double 0x7FF0000000000000)
|
|
|
|
ret double %t
|
|
|
|
}
|
|
|
|
|
|
|
|
; This should fold.
|
2013-07-14 01:42:54 +00:00
|
|
|
; CHECK-LABEL: @bar(
|
2010-09-17 20:15:53 +00:00
|
|
|
; CHECK: ret double 0.0
|
2010-09-17 01:38:06 +00:00
|
|
|
define double @bar() {
|
2010-09-17 20:15:53 +00:00
|
|
|
%t = call double @sin(double 0.0)
|
2010-09-17 01:38:06 +00:00
|
|
|
ret double %t
|
|
|
|
}
|
|
|
|
|
|
|
|
declare double @sin(double)
|