mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-09-07 01:54:50 +00:00
flags (ARMISD::CMPNZ) and comparisons that use all flags (ARMISD::CMP). - Defines the instructions: TST, TEQ (ARM) and TST (Thumb). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35573 91177308-0d34-0410-b5e6-96231b3b80d8
22 lines
620 B
LLVM
22 lines
620 B
LLVM
; RUN: llvm-as < %s | llc -march=arm &&
|
|
; RUN: llvm-as < %s | llc -march=thumb &&
|
|
; RUN: llvm-as < %s | llc -march=arm | grep "tst" &&
|
|
; RUN: llvm-as < %s | llc -march=arm | grep "teq" &&
|
|
; RUN: llvm-as < %s | llc -march=thumb | grep "tst"
|
|
|
|
define i32 @f(i32 %a) {
|
|
entry:
|
|
%tmp2 = and i32 %a, 255 ; <i32> [#uses=1]
|
|
icmp eq i32 %tmp2, 0 ; <i1>:0 [#uses=1]
|
|
%retval = select i1 %0, i32 20, i32 10 ; <i32> [#uses=1]
|
|
ret i32 %retval
|
|
}
|
|
|
|
define i32 @g(i32 %a) {
|
|
entry:
|
|
%tmp2 = xor i32 %a, 255
|
|
icmp eq i32 %tmp2, 0 ; <i1>:0 [#uses=1]
|
|
%retval = select i1 %0, i32 20, i32 10 ; <i32> [#uses=1]
|
|
ret i32 %retval
|
|
}
|