• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc < %s -mtriple=thumb-unknown-unknown -filetype=obj -o %t.o
2; RUN: llvm-objdump -disassemble -arch-name=thumb %t.o | FileCheck %s
3
4define 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
21