diff options
| author | Chad Rosier <mcrosier@codeaurora.org> | 2016-06-03 20:05:49 +0000 |
|---|---|---|
| committer | Chad Rosier <mcrosier@codeaurora.org> | 2016-06-03 20:05:49 +0000 |
| commit | be879ea751bf04d80aa3940c49193396ff0b85c0 (patch) | |
| tree | 6c67021076e854790ba086f7f5e82219a0a14b20 /llvm/test/CodeGen/AArch64 | |
| parent | 6e8511527204b2d8546393b041422ef0076977d8 (diff) | |
| download | bcm5719-llvm-be879ea751bf04d80aa3940c49193396ff0b85c0.tar.gz bcm5719-llvm-be879ea751bf04d80aa3940c49193396ff0b85c0.zip | |
[AArch64] Spot SBFX-compatible code expressed with sign_extend.
This is very similar to r271677, but for extracts from i32 with the SIGN_EXTEND
acting on a arithmetic shift.
llvm-svn: 271717
Diffstat (limited to 'llvm/test/CodeGen/AArch64')
| -rw-r--r-- | llvm/test/CodeGen/AArch64/bitfield-extract.ll | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/AArch64/bitfield-extract.ll b/llvm/test/CodeGen/AArch64/bitfield-extract.ll new file mode 100644 index 00000000000..e9b3175e6de --- /dev/null +++ b/llvm/test/CodeGen/AArch64/bitfield-extract.ll @@ -0,0 +1,10 @@ +; RUN: llc -mtriple=aarch64-none-linux-gnu < %s | FileCheck %s + +; CHECK-LABEL: @test1 +; CHECK: sbfx {{x[0-9]+}}, x0, #23, #9 +define i64 @test1(i32 %a) { + %tmp = ashr i32 %a, 23 + %ext = sext i32 %tmp to i64 + %res = add i64 %ext, 1 + ret i64 %res +} |

