[LLVM][IR] Use splat syntax when printing ConstantExpr based splats. (#116856)
[llvm-project.git] / clang / test / CodeGen / exceptions-strictfp.c
blobfa0ca32509185bbbe2c0e2935268fa05adec2499
1 // RUN: %clang_cc1 -triple armv7-apple-unknown -Wno-strict-prototypes -ffp-exception-behavior=strict -fexperimental-strict-floating-point -emit-llvm -o - %s -fexceptions -exception-model=sjlj -fblocks | FileCheck %s
3 // Verify strictfp attributes on invoke calls (and therefore also on
4 // function definitions).
6 void test1(void) {
7 extern void test1_helper(void (^)(int));
9 // CHECK: define{{.*}} arm_aapcscc void @test1() [[STRICTFP0:#[0-9]+]] personality ptr @__gcc_personality_sj0
11 __block int x = 10;
13 // CHECK: invoke arm_aapcscc void @test1_helper({{.*}}) [[STRICTFP1:#[0-9]+]]
14 test1_helper(^(int v) { x = v; });
16 // CHECK: landingpad { ptr, i32 }
17 // CHECK-NEXT: cleanup
20 void test2_helper();
21 void test2(void) {
22 // CHECK: define{{.*}} arm_aapcscc void @test2() [[STRICTFP0]] personality ptr @__gcc_personality_sj0 {
23 __block int x = 10;
24 ^{ (void)x; };
26 // CHECK: invoke arm_aapcscc void @test2_helper({{.*}}) [[STRICTFP1:#[0-9]+]]
27 test2_helper(5, 6, 7);
29 // CHECK: landingpad { ptr, i32 }
30 // CHECK-NEXT: cleanup
32 void test2_helper(int x, int y) {
35 // CHECK: attributes [[STRICTFP0]] = { {{.*}}strictfp{{.*}} }
36 // CHECK: attributes [[STRICTFP1]] = { strictfp }