brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.4 KiB · 2889f38 Raw
37 lines · c
1// REQUIRES: powerpc-registered-target2// RUN: %clang_cc1 -triple powerpc64le-unknown-linux-gnu \3// RUN:   -emit-llvm %s -target-cpu pwr8 -o - | FileCheck %s4// RUN: %clang_cc1 -triple powerpc-unknown-aix \5// RUN:   -emit-llvm %s -target-cpu pwr8 -o - | FileCheck %s6// RUN: %clang_cc1 -triple powerpc64-unknown-linux-gnu \7// RUN:   -emit-llvm %s -target-cpu pwr7 -o - | FileCheck %s8// RUN: %clang_cc1 -triple powerpc64-unknown-aix \9// RUN:   -emit-llvm %s -target-cpu pwr7 -o - | FileCheck %s10// RUN: %clang_cc1 -triple powerpc64-unknown-linux-gnu \11// RUN:   -emit-llvm %s -target-cpu pwr6 -o - | FileCheck %s12// RUN: %clang_cc1 -triple powerpc64le-unknown-linux-gnu \13// RUN:   -emit-llvm %s -target-cpu pwr6 -o - | FileCheck %s14// RUN: %clang_cc1 -triple powerpc64-unknown-aix \15// RUN:   -emit-llvm %s -target-cpu pwr6 -o - | FileCheck %s16// RUN: %clang_cc1 -triple powerpc-unknown-aix \17// RUN:   -emit-llvm %s -target-cpu pwr6 -o - | FileCheck %s18 19extern float f;20extern double d;21 22// CHECK-LABEL: @test_fnabs(23// CHECK:       [[TMP0:%.*]] = load double, ptr @d24// CHECK-NEXT:  [[TMP1:%.*]] = call double @llvm.ppc.fnabs(double [[TMP0]])25// CHECK-NEXT:  ret double [[TMP1]]26double test_fnabs() {27  return __fnabs (d);28}29 30// CHECK-LABEL: @test_fnabss(31// CHECK:       [[TMP0:%.*]] = load float, ptr @f32// CHECK-NEXT:  [[TMP1:%.*]] = call float @llvm.ppc.fnabss(float [[TMP0]])33// CHECK-NEXT:  ret float [[TMP1]]34float test_fnabss() {35  return __fnabss (f);36}37