Chris Lattner | 17819d9 | 2008-01-29 06:52:45 +0000 | [diff] [blame^] | 1 | ; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep 0.0 | count 1 |
2 | |||||
3 | declare double @abs(double) | ||||
4 | |||||
5 | define double @test(double %X) { | ||||
6 | %Y = add double %X, 0.0 ;; Should be a single add x, 0.0 | ||||
7 | %Z = add 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 = add double %Y, 0.0 | ||||
14 | ret double %Z | ||||
15 | } |