brintos

brintos / llvm-project-archived public Read only

0
0
Text · 667 B · 997418e Raw
25 lines · plain
1; NOTE: Assertions have been autogenerated by update_test_checks.py2; RUN: opt < %s -passes=instcombine -S | FileCheck %s3 4declare double @fabs(double) readonly5 6define double @test(double %X) {7; CHECK-LABEL: @test(8; CHECK-NEXT:    [[Y:%.*]] = fadd double %X, 0.000000e+009; CHECK-NEXT:    ret double [[Y]]10;11  %Y = fadd double %X, 0.0          ;; Should be a single add x, 0.012  %Z = fadd double %Y, 0.013  ret double %Z14}15 16define double @test1(double %X) {17; CHECK-LABEL: @test1(18; CHECK-NEXT:    [[Y:%.*]] = call double @llvm.fabs.f64(double %X)19; CHECK-NEXT:    ret double [[Y]]20;21  %Y = call double @fabs(double %X)22  %Z = fadd double %Y, 0.023  ret double %Z24}25