mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-26 04:32:44 +01:00
c1017f58cf
Reviewers: jmolloy, t.p.northover Reviewed By: t.p.northover Subscribers: t.p.northover, aemerson, rengolin, llvm-commits Differential Revision: https://reviews.llvm.org/D30097 llvm-svn: 295478
34 lines
737 B
LLVM
34 lines
737 B
LLVM
; RUN: llc -mtriple=thumbv6m-eabi -verify-machineinstrs < %s | FileCheck --check-prefix=CHECK --check-prefix=T1 %s
|
|
; RUN: llc -mtriple=thumbv7m-eabi -verify-machineinstrs < %s | FileCheck --check-prefix=CHECK --check-prefix=T2 %s
|
|
|
|
; CHECK-LABEL: addri1:
|
|
; T1: adds r0, r0, #3
|
|
; T1-NEXT: b{{eq|ne}}
|
|
; T2: adds r0, #3
|
|
; T2-NOT: cmp
|
|
define i32 @addri1(i32 %a, i32 %b) {
|
|
%c = add i32 %a, 3
|
|
%d = icmp eq i32 %c, 0
|
|
br i1 %d, label %true, label %false
|
|
|
|
true:
|
|
ret i32 4
|
|
false:
|
|
ret i32 5
|
|
}
|
|
|
|
; CHECK-LABEL: addri2:
|
|
; CHECK: adds r0, #254
|
|
; T1-NEXT: b{{eq|ne}}
|
|
; T2-NOT: cmp
|
|
define i32 @addri2(i32 %a, i32 %b) {
|
|
%c = add i32 %a, 254
|
|
%d = icmp eq i32 %c, 0
|
|
br i1 %d, label %true, label %false
|
|
|
|
true:
|
|
ret i32 4
|
|
false:
|
|
ret i32 5
|
|
}
|