mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-24 22:32:47 +00:00
ad5c880892
We turned off the CMN instruction because it had semantics which we weren't getting correct. If we are comparing with an immediate, then it's okay to use the CMN instruction. <rdar://problem/7569620> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158302 91177308-0d34-0410-b5e6-96231b3b80d8
23 lines
445 B
LLVM
23 lines
445 B
LLVM
; RUN: llc < %s -mtriple thumbv7-apple-ios | FileCheck %s
|
|
; <rdar://problem/7569620>
|
|
|
|
define i32 @compare_i_gt(i32 %a) {
|
|
entry:
|
|
; CHECK: compare_i_gt
|
|
; CHECK-NOT: mvn
|
|
; CHECK: cmn
|
|
%cmp = icmp sgt i32 %a, -78
|
|
%. = zext i1 %cmp to i32
|
|
ret i32 %.
|
|
}
|
|
|
|
define i32 @compare_r_eq(i32 %a, i32 %b) {
|
|
entry:
|
|
; CHECK: compare_r_eq
|
|
; CHECK: cmn
|
|
%sub = sub nsw i32 0, %b
|
|
%cmp = icmp eq i32 %a, %sub
|
|
%. = zext i1 %cmp to i32
|
|
ret i32 %.
|
|
}
|