Home | History | Annotate | Download | only in X86
      1 ; Test to ensure that the LTO pipelines add pass to build the TargetLibraryInfo
      2 ; using the specified target triple.
      3 
      4 ; Check with regular LTO
      5 ; RUN: llvm-as < %s >%t1
      6 ; RUN: llvm-lto -exported-symbol=_main  -o %t2 %t1
      7 ; RUN: llvm-nm %t2 | FileCheck %s
      8 ; Check with ThinLTO. Use llvm-lto2 since this adds earlier passes requiring
      9 ; the TargetLibraryInfo with ThinLTO (WholeProgramDevirt).
     10 ; RUN: opt -module-summary -o %t1 %s
     11 ; RUN: llvm-lto2 run -r %t1,_pow, -r %t1,_main,plx -o %t2 %t1
     12 ; RUN: llvm-nm %t2.1 | FileCheck %s
     13 
     14 target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
     15 target triple = "x86_64-apple-macosx10.9"
     16 
     17 declare double @pow(double, double)
     18 
     19 define double @main(double %x) {
     20 ; We check that LTO will be aware of target triple and apply pow to __exp10 transformation.
     21 ; CHECK: U ___exp10
     22   %retval = call double @pow(double 10.0, double %x)
     23   ret double %retval
     24 }
     25