brintos

brintos / llvm-project-archived public Read only

0
0
Text · 919 B · 3975873 Raw
25 lines · plain
1; Test to ensure that the LTO pipelines add pass to build the TargetLibraryInfo2; using the specified target triple.3 4; Check with regular LTO5; RUN: llvm-as < %s >%t16; RUN: llvm-lto -exported-symbol=_main  -o %t2 %t17; RUN: llvm-nm %t2 | FileCheck %s8; Check with ThinLTO. Use llvm-lto2 since this adds earlier passes requiring9; the TargetLibraryInfo with ThinLTO (WholeProgramDevirt).10; RUN: opt -module-summary -o %t1 %s11; RUN: llvm-lto2 run -r %t1,_pow, -r %t1,_main,plx -o %t2 %t112; RUN: llvm-nm %t2.1 | FileCheck %s13 14target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"15target triple = "x86_64-apple-macosx10.9"16 17declare double @pow(double, double)18 19define double @main(double %x) {20; We check that LTO will be aware of target triple and apply pow to __exp10 transformation.21; CHECK: U ___exp1022  %retval = call double @pow(double 10.0, double %x)23  ret double %retval24}25