diff options
author | Artyom Skrobov <Artyom.Skrobov@arm.com> | 2015-11-27 15:30:51 +0000 |
---|---|---|
committer | Artyom Skrobov <Artyom.Skrobov@arm.com> | 2015-11-27 15:30:51 +0000 |
commit | b955b90509d7c36e7c3c4a424d9beeeeb880098a (patch) | |
tree | 7d52a9b4131e5d58522f4f9d9de2227c005a797d /llvm/test/CodeGen/ARM/build-attributes-optimization-optnone.ll | |
parent | abadc2217225d0cfe09a8960ba8cd0722c5104e3 (diff) | |
download | bcm5719-llvm-b955b90509d7c36e7c3c4a424d9beeeeb880098a.tar.gz bcm5719-llvm-b955b90509d7c36e7c3c4a424d9beeeeb880098a.zip |
[ARM] Generate ABI_optimization_goals build attribute, as described in the ARM ARM.
Summary:
Since this build attribute corresponds to a whole module, and
different functions in a module may differ in the optimizations
enabled for them, this attribute is emitted after all functions,
and only in the case that the optimization goals for all
functions match.
Reviewers: logan, hans
Subscribers: aemerson, rengolin, llvm-commits
Differential Revision: http://reviews.llvm.org/D14934
llvm-svn: 254201
Diffstat (limited to 'llvm/test/CodeGen/ARM/build-attributes-optimization-optnone.ll')
-rw-r--r-- | llvm/test/CodeGen/ARM/build-attributes-optimization-optnone.ll | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/ARM/build-attributes-optimization-optnone.ll b/llvm/test/CodeGen/ARM/build-attributes-optimization-optnone.ll new file mode 100644 index 00000000000..cbdb915045c --- /dev/null +++ b/llvm/test/CodeGen/ARM/build-attributes-optimization-optnone.ll @@ -0,0 +1,18 @@ +; RUN: llc < %s -mtriple=arm-none-none-eabi -mcpu=cortex-a7 -O0 | FileCheck %s +; RUN: llc < %s -mtriple=arm-none-none-eabi -mcpu=cortex-a7 -O1 | FileCheck %s +; RUN: llc < %s -mtriple=arm-none-none-eabi -mcpu=cortex-a7 -O3 | FileCheck %s + +; RUN: llc < %s -mtriple=arm-none-none-eabi -mcpu=cortex-a7 -O0 -filetype obj -o - | llvm-readobj -arm-attributes - | FileCheck %s --check-prefix=CHECK-OBJ +; RUN: llc < %s -mtriple=arm-none-none-eabi -mcpu=cortex-a7 -O1 -filetype obj -o - | llvm-readobj -arm-attributes - | FileCheck %s --check-prefix=CHECK-OBJ +; RUN: llc < %s -mtriple=arm-none-none-eabi -mcpu=cortex-a7 -O3 -filetype obj -o - | llvm-readobj -arm-attributes - | FileCheck %s --check-prefix=CHECK-OBJ + +; CHECK: .eabi_attribute 30, 6 @ Tag_ABI_optimization_goals +; CHECK-OBJ: TagName: ABI_optimization_goals +; CHECK-OBJ-NEXT: Description: Best Debugging + +define i32 @f(i64 %z) #0 { + ret i32 0 +} + +attributes #0 = { noinline optnone } + |