brintos

brintos / llvm-project-archived public Read only

0
0
Text · 821 B · febea31 Raw
30 lines · c
1// RUN: %clang_cc1 -triple arm64-none-linux-gnu -emit-llvm %s -o - | FileCheck %s2 3typedef float f16a __attribute((mode(HF)));4typedef double f16b __attribute((mode(HF)));5typedef float f32a __attribute((mode(SF)));6typedef double f32b __attribute((mode(SF)));7typedef float f64a __attribute((mode(DF)));8typedef double f64b __attribute((mode(DF)));9f16b tmp;10 11// CHECK: define{{.*}} ptr @f16_test(ptr noundef {{.*}})12// CHECK:   store half {{.*}}, ptr @tmp, align 213// CHECK:   ret ptr @tmp14f16b *f16_test(f16a *x) {15  tmp = *x + *x;16  return &tmp;17}18 19// CHECK: define{{.*}} float @f32_test(float noundef {{.*}})20// CHECK:   ret float {{.*}}21f32b f32_test(f32a x) {22  return x + x;23}24 25// CHECK: define{{.*}} double @f64_test(double noundef {{.*}})26// CHECK:   ret double {{.*}}27f64b f64_test(f64a x) {28  return x + x;29}30