[InstCombine] Fold IntToPtr and PtrToInt into preceding loads.
[oota-llvm.git] / test / Transforms / InstCombine / zero-point-zero-add.ll
1 ; RUN: opt < %s -instcombine -S | grep 0.0 | count 1
2
3 declare double @abs(double)
4
5 define double @test(double %X) {
6   %Y = fadd double %X, 0.0          ;; Should be a single add x, 0.0
7   %Z = fadd double %Y, 0.0
8   ret double %Z
9 }
10
11 define double @test1(double %X) {
12   %Y = call double @abs(double %X)
13   %Z = fadd double %Y, 0.0
14   ret double %Z
15 }