diff options
author | Jun Bum Lim <junbuml@codeaurora.org> | 2015-12-18 18:08:30 +0000 |
---|---|---|
committer | Jun Bum Lim <junbuml@codeaurora.org> | 2015-12-18 18:08:30 +0000 |
commit | 3509d64c24163b17add750a2c59d9feb4d3a17bd (patch) | |
tree | 63868b3e8e2564eb8f2936a0afc4a0656d4e0ad2 /llvm/test/CodeGen/AArch64/arm64-alloca-frame-pointer-offset.ll | |
parent | 0e7c82cb69972c75978ec6c5077cc91879836122 (diff) | |
download | bcm5719-llvm-3509d64c24163b17add750a2c59d9feb4d3a17bd.tar.gz bcm5719-llvm-3509d64c24163b17add750a2c59d9feb4d3a17bd.zip |
[AArch64] Promote loads from stores
This change promotes load instructions which directly read from stores by
replacing them with mov instructions. If the store is wider than the load,
the load will be replaced with a bitfield extract.
For example :
STRWui %W1, %X0, 1
%W0 = LDRHHui %X0, 3
becomes
STRWui %W1, %X0, 1
%W0 = UBFMWri %W1, 16, 31
llvm-svn: 256004
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.ll | 6 |
1 files changed, 3 insertions, 3 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 eb0cd3547bd..36424506bee 100644 --- a/llvm/test/CodeGen/AArch64/arm64-alloca-frame-pointer-offset.ll +++ b/llvm/test/CodeGen/AArch64/arm64-alloca-frame-pointer-offset.ll @@ -1,9 +1,9 @@ ; RUN: llc -march=arm64 -mcpu=cyclone < %s | FileCheck %s ; CHECK: foo -; CHECK: ldr w[[REG:[0-9]+]], [x19, #264] -; CHECK: str w[[REG]], [x19, #132] -; CHECK: ldr w{{[0-9]+}}, [x19, #264] +; CHECK: str w[[REG0:[0-9]+]], [x19, #264] +; CHECK: mov w[[REG1:[0-9]+]], w[[REG0]] +; CHECK: str w[[REG1]], [x19, #132] define i32 @foo(i32 %a) nounwind { %retval = alloca i32, align 4 |