diff options
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 +} |

