brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.5 KiB · 1e8cdb2 Raw
46 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals2; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal  -attributor-annotate-decl-cs  -S < %s | FileCheck %s --check-prefixes=CHECK,TUNIT3; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal  -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC4 5; Don't promote paramaters of/arguments to naked functions6 7@g = common global i32 0, align 48 9;.10; CHECK: @g = common global i32 0, align 411;.12define i32 @bar() {13; CHECK-LABEL: define {{[^@]+}}@bar() {14; CHECK-NEXT:  entry:15; CHECK-NEXT:    [[CALL:%.*]] = call i32 @foo(ptr noundef nonnull align 4 dereferenceable(4) @g)16; CHECK-NEXT:    ret i32 [[CALL]]17;18entry:19  %call = call i32 @foo(ptr @g)20  ret i32 %call21}22 23define internal i32 @foo(ptr) #0 {24; CHECK: Function Attrs: naked25; CHECK-LABEL: define {{[^@]+}}@foo26; CHECK-SAME: (ptr [[TMP0:%.*]]) #[[ATTR0:[0-9]+]] {27; CHECK-NEXT:  entry:28; CHECK-NEXT:    [[RETVAL:%.*]] = alloca i32, align 429; CHECK-NEXT:    call void asm sideeffect "ldr r0, [r0] \0Abx lr \0A", ""()30; CHECK-NEXT:    unreachable31;32entry:33  %retval = alloca i32, align 434  call void asm sideeffect "ldr r0, [r0] \0Abx lr        \0A", ""()35  unreachable36}37 38 39attributes #0 = { naked }40;.41; CHECK: attributes #[[ATTR0]] = { naked }42;.43;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line:44; CGSCC: {{.*}}45; TUNIT: {{.*}}46