And a small utilities -- extract-section.py -- that helps extracting specific object file section and printing in textual format. This utility is just a workaround for tests inside `Encoding`. Hopefully in the future we can replace dependencies in those tests with existing tools (e.g. llvm-readobj). Please refer to this bug for more context: https://bugs.llvm.org/show_bug.cgi?id=49245 Note that since we don't have AsmParser for now, we are testing the MC part using MIR as input and put those tests under the `Encoding` folder. In the future when AsmParser (and disassembler) is finished, those tests will be moved to `test/MC/M68k`. Authors: myhsu, m4yers, glaubitz Differential Revision: https://reviews.llvm.org/D88392
34 lines
835 B
LLVM
34 lines
835 B
LLVM
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
|
; RUN: llc < %s -mtriple=m68k-linux -verify-machineinstrs | FileCheck %s
|
|
|
|
define i1 @t1(i64 %x) nounwind {
|
|
; CHECK-LABEL: t1:
|
|
; CHECK: ; %bb.0:
|
|
; CHECK-NEXT: move.l #31, %d1
|
|
; CHECK-NEXT: move.l (4,%sp), %d0
|
|
; CHECK-NEXT: lsr.l %d1, %d0
|
|
; CHECK-NEXT: ; kill: def $bd0 killed $bd0 killed $d0
|
|
; CHECK-NEXT: rts
|
|
%B = icmp slt i64 %x, 0
|
|
ret i1 %B
|
|
}
|
|
|
|
define i1 @t2(i64 %x) nounwind {
|
|
; CHECK-LABEL: t2:
|
|
; CHECK: ; %bb.0:
|
|
; CHECK-NEXT: cmpi.l #0, (4,%sp)
|
|
; CHECK-NEXT: seq %d0
|
|
; CHECK-NEXT: rts
|
|
%tmp = icmp ult i64 %x, 4294967296
|
|
ret i1 %tmp
|
|
}
|
|
|
|
define i1 @t3(i32 %x) nounwind {
|
|
; CHECK-LABEL: t3:
|
|
; CHECK: ; %bb.0:
|
|
; CHECK-NEXT: move.b #0, %d0
|
|
; CHECK-NEXT: rts
|
|
%tmp = icmp ugt i32 %x, -1
|
|
ret i1 %tmp
|
|
}
|