diff options
author | Artyom Skrobov <Artyom.Skrobov@arm.com> | 2015-12-07 14:22:39 +0000 |
---|---|---|
committer | Artyom Skrobov <Artyom.Skrobov@arm.com> | 2015-12-07 14:22:39 +0000 |
commit | e9b3fb86034fb4a444f4ad81532a0cde63ac9cb3 (patch) | |
tree | 80cf8317b846fb824271c23ceffb20a187360b79 /llvm/test/CodeGen/ARM/build-attributes-optimization-mixed.ll | |
parent | 1493e37f3485d878cd5796b28a16067cc3e1a164 (diff) | |
download | bcm5719-llvm-e9b3fb86034fb4a444f4ad81532a0cde63ac9cb3.tar.gz bcm5719-llvm-e9b3fb86034fb4a444f4ad81532a0cde63ac9cb3.zip |
[ARM] Generate ABI_optimization_goals build attribute, as described in the ARM ARM.
Summary: This reverts r254234, and adds a simple fix for the annoying case of use-after-free.
Reviewers: rengolin
Subscribers: aemerson, llvm-commits, rengolin
Differential Revision: http://reviews.llvm.org/D15236
llvm-svn: 254912
Diffstat (limited to 'llvm/test/CodeGen/ARM/build-attributes-optimization-mixed.ll')
-rw-r--r-- | llvm/test/CodeGen/ARM/build-attributes-optimization-mixed.ll | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/ARM/build-attributes-optimization-mixed.ll b/llvm/test/CodeGen/ARM/build-attributes-optimization-mixed.ll new file mode 100644 index 00000000000..8009fc6e28f --- /dev/null +++ b/llvm/test/CodeGen/ARM/build-attributes-optimization-mixed.ll @@ -0,0 +1,23 @@ +; 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 +; RUN: llc < %s -mtriple=arm-none-none-eabi -mcpu=cortex-a7 -O1 -filetype obj -o - | llvm-readobj -arm-attributes - | FileCheck %s +; RUN: llc < %s -mtriple=arm-none-none-eabi -mcpu=cortex-a7 -O3 -filetype obj -o - | llvm-readobj -arm-attributes - | FileCheck %s + +; CHECK-NOT: .eabi_attribute 30 +; CHECK-NOT: Tag_ABI_optimization_goals + +define i32 @f(i64 %z) #0 { + ret i32 0 +} + +define i32 @g(i64 %z) #1 { + ret i32 1 +} + +attributes #0 = { noinline optnone } + +attributes #1 = { minsize optsize } + |