Mercurial > hg > CbC > CbC_llvm
comparison test/CodeGen/AArch64/sdivpow2.ll @ 83:60c9769439b8 LLVM3.7
LLVM 3.7
author | Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 18 Feb 2015 14:55:36 +0900 |
parents | 54457678186b |
children | c2174574ed3a |
comparison
equal
deleted
inserted
replaced
78:af83660cff7b | 83:60c9769439b8 |
---|---|
1 ; RUN: llc -mtriple=arm64-linux-gnu -o - %s | FileCheck %s | 1 ; RUN: llc -mtriple=arm64-linux-gnu -fast-isel=0 -verify-machineinstrs < %s | FileCheck %s |
2 ; RUN: llc -mtriple=arm64-linux-gnu -fast-isel=1 -verify-machineinstrs < %s | FileCheck %s | |
2 | 3 |
3 define i32 @test1(i32 %x) { | 4 define i32 @test1(i32 %x) { |
4 ; CHECK-LABEL: test1 | 5 ; CHECK-LABEL: test1 |
5 ; CHECK: add w8, w0, #7 | 6 ; CHECK: add w8, w0, #7 |
6 ; CHECK: cmp w0, #0 | 7 ; CHECK: cmp w0, #0 |
57 ; CHECK: csel x8, x8, x0, lt | 58 ; CHECK: csel x8, x8, x0, lt |
58 ; CHECK: asr x0, x8, #6 | 59 ; CHECK: asr x0, x8, #6 |
59 %div = sdiv i64 %x, 64 | 60 %div = sdiv i64 %x, 64 |
60 ret i64 %div | 61 ret i64 %div |
61 } | 62 } |
63 | |
64 define i64 @test7(i64 %x) { | |
65 ; CHECK-LABEL: test7 | |
66 ; CHECK: orr [[REG:x[0-9]+]], xzr, #0xffffffffffff | |
67 ; CHECK: add x8, x0, [[REG]] | |
68 ; CHECK: cmp x0, #0 | |
69 ; CHECK: csel x8, x8, x0, lt | |
70 ; CHECK: asr x0, x8, #48 | |
71 %div = sdiv i64 %x, 281474976710656 | |
72 ret i64 %div | |
73 } | |
74 |