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 | 44d5618b02667e8b939453d1e87cea7374b8cef1 (patch) | |
tree | 47a0754f5dce4a163edde1c582039c80f6cc7f3c /test/CodeGen/ARM/build-attributes-optimization.ll | |
parent | 67e4e5d0d5eb072f746afc0231267e074de571ef (diff) |
[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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254201 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/ARM/build-attributes-optimization.ll')
-rw-r--r-- | test/CodeGen/ARM/build-attributes-optimization.ll | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/CodeGen/ARM/build-attributes-optimization.ll b/test/CodeGen/ARM/build-attributes-optimization.ll new file mode 100644 index 00000000000..21b7b3c3ab0 --- /dev/null +++ b/test/CodeGen/ARM/build-attributes-optimization.ll @@ -0,0 +1,23 @@ +; RUN: llc < %s -mtriple=arm-none-none-eabi -mcpu=cortex-a7 -O0 | FileCheck %s --check-prefix=NONE +; RUN: llc < %s -mtriple=arm-none-none-eabi -mcpu=cortex-a7 -O1 | FileCheck %s --check-prefix=SPEED +; RUN: llc < %s -mtriple=arm-none-none-eabi -mcpu=cortex-a7 -O3 | FileCheck %s --check-prefix=MAXSPEED + +; RUN: llc < %s -mtriple=arm-none-none-eabi -mcpu=cortex-a7 -O0 -filetype obj -o - | llvm-readobj -arm-attributes - | FileCheck %s --check-prefix=NONE-OBJ +; RUN: llc < %s -mtriple=arm-none-none-eabi -mcpu=cortex-a7 -O1 -filetype obj -o - | llvm-readobj -arm-attributes - | FileCheck %s --check-prefix=SPEED-OBJ +; RUN: llc < %s -mtriple=arm-none-none-eabi -mcpu=cortex-a7 -O3 -filetype obj -o - | llvm-readobj -arm-attributes - | FileCheck %s --check-prefix=MAXSPEED-OBJ + +; NONE: .eabi_attribute 30, 5 @ Tag_ABI_optimization_goals +; SPEED: .eabi_attribute 30, 1 @ Tag_ABI_optimization_goals +; MAXSPEED: .eabi_attribute 30, 2 @ Tag_ABI_optimization_goals + +; NONE-OBJ: TagName: ABI_optimization_goals +; NONE-OBJ-NEXT: Description: Debugging +; SPEED-OBJ: TagName: ABI_optimization_goals +; SPEED-OBJ-NEXT: Description: Speed +; MAXSPEED-OBJ: TagName: ABI_optimization_goals +; MAXSPEED-OBJ-NEXT: Description: Aggressive Speed + +define i32 @f(i64 %z) { + ret i32 0 +} + |