summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/AArch64/arm64-alloca-frame-pointer-offset.ll
diff options
context:
space:
mode:
authorNirav Dave <niravd@google.com>2017-07-10 15:39:41 +0000
committerNirav Dave <niravd@google.com>2017-07-10 15:39:41 +0000
commit163e1ad9dcfe6113ddf0cc8d73976dfc5db17ebe (patch)
tree25f67898c4cbac749b00a0485aca16cb5f5658d4 /llvm/test/CodeGen/AArch64/arm64-alloca-frame-pointer-offset.ll
parent7cd7c1a7b50abcc729ddffa0e5654c343e7b03f7 (diff)
downloadbcm5719-llvm-163e1ad9dcfe6113ddf0cc8d73976dfc5db17ebe.tar.gz
bcm5719-llvm-163e1ad9dcfe6113ddf0cc8d73976dfc5db17ebe.zip
[DAG] Improve Aliasing of operations to static alloca
Memory accesses offset from frame indices may alias, e.g., we may merge write from function arguments passed on the stack when they are contiguous. As a result, when checking aliasing, we consider the underlying frame index's offset from the stack pointer. Static allocs are realized as stack objects in SelectionDAG, but its offset is not set until post-DAG causing DAGCombiner's alias check to consider access to static allocas to frequently alias. Modify isAlias to consider access between static allocas and access from other frame objects to be considered aliasing. Many test changes are included here. Most are fixes for tests which indirectly relied on our aliasing ability and needed to be modified to preserve their original intent. The remaining tests have minor improvements due to relaxed ordering. The exception is CodeGen/X86/2011-10-19-widen_vselect.ll which has a minor degradation dispite though the pre-legalized DAG is improved. Reviewers: rnk, mkuper, jonpa, hfinkel, uweigand Reviewed By: rnk Subscribers: sdardis, nemanjai, javed.absar, llvm-commits Differential Revision: https://reviews.llvm.org/D33345 llvm-svn: 307546
Diffstat (limited to 'llvm/test/CodeGen/AArch64/arm64-alloca-frame-pointer-offset.ll')
-rw-r--r--llvm/test/CodeGen/AArch64/arm64-alloca-frame-pointer-offset.ll6
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/test/CodeGen/AArch64/arm64-alloca-frame-pointer-offset.ll b/llvm/test/CodeGen/AArch64/arm64-alloca-frame-pointer-offset.ll
index a3b740df9b4..fdb37987104 100644
--- a/llvm/test/CodeGen/AArch64/arm64-alloca-frame-pointer-offset.ll
+++ b/llvm/test/CodeGen/AArch64/arm64-alloca-frame-pointer-offset.ll
@@ -1,10 +1,8 @@
; RUN: llc -mtriple=arm64-eabi -mcpu=cyclone < %s | FileCheck %s
; CHECK: foo
-; CHECK: str w[[REG0:[0-9]+]], [x19, #264]
-; CHECK: mov w[[REG1:[0-9]+]], w[[REG0]]
-; CHECK: str w[[REG1]], [x19, #132]
-
+; CHECK-DAG: str w[[REG0:[0-9]+]], [x19, #132]
+; CHECK-DAG: str w[[REG0]], [x19, #264]
define i32 @foo(i32 %a) nounwind {
%retval = alloca i32, align 4
%a.addr = alloca i32, align 4
OpenPOWER on IntegriCloud