diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2006-12-14 13:31:27 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2006-12-14 13:31:27 +0000 |
commit | 15f17a7c4746b8533aabf7c78bde82503ad9fc9f (patch) | |
tree | 1495b7007f884fa413bcee1e1e3c81c18540f7e6 /test/CodeGen/ARM/addSubConstant.ll | |
parent | 7a0d51c8e3d6cdc6d961f6525f97f8926fb76c83 (diff) |
Avoid creating invalid sub/add instructions on the prolog/epilog
patch by Lauro
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32577 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/ARM/addSubConstant.ll')
-rw-r--r-- | test/CodeGen/ARM/addSubConstant.ll | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/CodeGen/ARM/addSubConstant.ll b/test/CodeGen/ARM/addSubConstant.ll new file mode 100644 index 0000000000..1cb8844c03 --- /dev/null +++ b/test/CodeGen/ARM/addSubConstant.ll @@ -0,0 +1,19 @@ +; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm && +; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | not grep "805306384" + + +int %main() { +entry: + %retval = alloca int, align 4 ; <int*> [#uses=2] + %tmp = alloca int, align 4 ; <int*> [#uses=2] + %a = alloca [805306369 x sbyte], align 16 ; <[805306369 x sbyte]*> [#uses=0] + "alloca point" = bitcast int 0 to int ; <int> [#uses=0] + store int 0, int* %tmp + %tmp = load int* %tmp ; <int> [#uses=1] + store int %tmp, int* %retval + br label %return + +return: ; preds = %entry + %retval = load int* %retval ; <int> [#uses=1] + ret int %retval +} |