comparison test/CodeGen/Thumb/iabs.ll @ 0:95c75e76d11b LLVM3.4

LLVM 3.4
author Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
date Thu, 12 Dec 2013 13:56:28 +0900
parents
children 60c9769439b8
comparison
equal deleted inserted replaced
-1:000000000000 0:95c75e76d11b
1 ; RUN: llc < %s -mtriple=thumb-unknown-unknown -filetype=obj -o %t.o
2 ; RUN: llvm-objdump -disassemble -arch=thumb %t.o | FileCheck %s
3
4 define i32 @test(i32 %a) {
5 %tmp1neg = sub i32 0, %a
6 %b = icmp sgt i32 %a, -1
7 %abs = select i1 %b, i32 %a, i32 %tmp1neg
8 ret i32 %abs
9
10 ; This test just checks that 4 instructions were emitted
11
12 ; CHECK: {{text}}
13 ; CHECK: 0:
14 ; CHECK-NEXT: 2:
15 ; CHECK-NEXT: 4:
16 ; CHECK-NEXT: 6:
17
18 ; CHECK-NOT: 8:
19 }
20