[LLVM][IR] Use splat syntax when printing ConstantExpr based splats. (#116856)
[llvm-project.git] / clang / test / CodeGen / msp430-builtins.c
blob7465ec1c1d4e9f51a47852e238ec374595b73445
1 // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
2 // RUN: %clang_cc1 -triple msp430-unknown-unknown -O3 -emit-llvm -o- %s | FileCheck %s
3 // REQUIRES: msp430-registered-target
5 _Static_assert(sizeof(int) == 2, "Assumption failed");
6 _Static_assert(sizeof(long) == 4, "Assumption failed");
7 _Static_assert(sizeof(long long) == 8, "Assumption failed");
8 _Static_assert(sizeof(float) == 4, "Assumption failed");
9 _Static_assert(sizeof(double) == 8, "Assumption failed");
10 _Static_assert(sizeof(long double) == 8, "Assumption failed");
12 // CHECK-LABEL: @powif(
13 // CHECK-NEXT: entry:
14 // CHECK-NEXT: [[TMP0:%.*]] = tail call float @llvm.powi.f32.i16(float [[X:%.*]], i16 [[Y:%.*]])
15 // CHECK-NEXT: ret float [[TMP0]]
17 float powif(float x, int y) {
18 return __builtin_powif(x, y);
21 // CHECK-LABEL: @powi(
22 // CHECK-NEXT: entry:
23 // CHECK-NEXT: [[TMP0:%.*]] = tail call double @llvm.powi.f64.i16(double [[X:%.*]], i16 [[Y:%.*]])
24 // CHECK-NEXT: ret double [[TMP0]]
26 double powi(double x, int y) {
27 return __builtin_powi(x, y);
30 // CHECK-LABEL: @powil(
31 // CHECK-NEXT: entry:
32 // CHECK-NEXT: [[TMP0:%.*]] = tail call double @llvm.powi.f64.i16(double [[X:%.*]], i16 [[Y:%.*]])
33 // CHECK-NEXT: ret double [[TMP0]]
35 long double powil(long double x, int y) {
36 return __builtin_powil(x, y);