mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-16 11:30:51 +00:00
26d628d6ce
Summary: Currently fast-isel-abort will only abort for regular instructions, and just warn for function calls, terminators, function arguments. There is already fast-isel-abort-args but nothing for calls and terminators. This change turns the fast-isel-abort options into an integer option, so that multiple levels of strictness can be defined. This will help no being surprised when the "abort" option indeed does not abort, and enables the possibility to write test that verifies that no intrinsics are forgotten by fast-isel. Reviewers: resistor, echristo Subscribers: jfb, llvm-commits Differential Revision: http://reviews.llvm.org/D7941 From: Mehdi Amini <mehdi.amini@apple.com> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230775 91177308-0d34-0410-b5e6-96231b3b80d8
179 lines
3.2 KiB
LLVM
179 lines
3.2 KiB
LLVM
; FIXME: FastISel currently returns false if it hits code that uses VSX
|
|
; registers and with -fast-isel-abort=1 turned on the test case will then fail.
|
|
; When fastisel better supports VSX fix up this test case.
|
|
;
|
|
; RUN: llc < %s -O0 -verify-machineinstrs -fast-isel-abort=1 -mtriple=powerpc64-unknown-linux-gnu -mcpu=pwr7 -mattr=-vsx | FileCheck %s --check-prefix=ELF64
|
|
|
|
define zeroext i1 @rettrue() nounwind uwtable ssp {
|
|
entry:
|
|
; ELF64-LABEL: rettrue
|
|
; ELF64: li 3, 1
|
|
; ELF64: blr
|
|
ret i1 true
|
|
}
|
|
|
|
define zeroext i1 @retfalse() nounwind uwtable ssp {
|
|
entry:
|
|
; ELF64-LABEL: retfalse
|
|
; ELF64: li 3, 0
|
|
; ELF64: blr
|
|
ret i1 false
|
|
}
|
|
|
|
define signext i1 @retstrue() nounwind uwtable ssp {
|
|
entry:
|
|
; ELF64-LABEL: retstrue
|
|
; ELF64: li 3, -1
|
|
; ELF64: blr
|
|
ret i1 true
|
|
}
|
|
|
|
define signext i1 @retsfalse() nounwind uwtable ssp {
|
|
entry:
|
|
; ELF64-LABEL: retsfalse
|
|
; ELF64: li 3, 0
|
|
; ELF64: blr
|
|
ret i1 false
|
|
}
|
|
|
|
define signext i8 @ret2(i8 signext %a) nounwind uwtable ssp {
|
|
entry:
|
|
; ELF64-LABEL: ret2
|
|
; ELF64: extsb
|
|
; ELF64: blr
|
|
ret i8 %a
|
|
}
|
|
|
|
define zeroext i8 @ret3(i8 signext %a) nounwind uwtable ssp {
|
|
entry:
|
|
; ELF64-LABEL: ret3
|
|
; ELF64: rldicl {{[0-9]+}}, {{[0-9]+}}, 0, 56
|
|
; ELF64: blr
|
|
ret i8 %a
|
|
}
|
|
|
|
define signext i16 @ret4(i16 signext %a) nounwind uwtable ssp {
|
|
entry:
|
|
; ELF64-LABEL: ret4
|
|
; ELF64: extsh
|
|
; ELF64: blr
|
|
ret i16 %a
|
|
}
|
|
|
|
define zeroext i16 @ret5(i16 signext %a) nounwind uwtable ssp {
|
|
entry:
|
|
; ELF64-LABEL: ret5
|
|
; ELF64: rldicl {{[0-9]+}}, {{[0-9]+}}, 0, 48
|
|
; ELF64: blr
|
|
ret i16 %a
|
|
}
|
|
|
|
define i16 @ret6(i16 %a) nounwind uwtable ssp {
|
|
entry:
|
|
; ELF64-LABEL: ret6
|
|
; ELF64: rldicl {{[0-9]+}}, {{[0-9]+}}, 0, 48
|
|
; ELF64: blr
|
|
ret i16 %a
|
|
}
|
|
|
|
define signext i32 @ret7(i32 signext %a) nounwind uwtable ssp {
|
|
entry:
|
|
; ELF64-LABEL: ret7
|
|
; ELF64: extsw
|
|
; ELF64: blr
|
|
ret i32 %a
|
|
}
|
|
|
|
define zeroext i32 @ret8(i32 signext %a) nounwind uwtable ssp {
|
|
entry:
|
|
; ELF64-LABEL: ret8
|
|
; ELF64: rldicl {{[0-9]+}}, {{[0-9]+}}, 0, 32
|
|
; ELF64: blr
|
|
ret i32 %a
|
|
}
|
|
|
|
define i32 @ret9(i32 %a) nounwind uwtable ssp {
|
|
entry:
|
|
; ELF64-LABEL: ret9
|
|
; ELF64: rldicl {{[0-9]+}}, {{[0-9]+}}, 0, 32
|
|
; ELF64: blr
|
|
ret i32 %a
|
|
}
|
|
|
|
define i64 @ret10(i64 %a) nounwind uwtable ssp {
|
|
entry:
|
|
; ELF64-LABEL: ret10
|
|
; ELF64-NOT: exts
|
|
; ELF64-NOT: rldicl
|
|
; ELF64: blr
|
|
ret i64 %a
|
|
}
|
|
|
|
define float @ret11(float %a) nounwind uwtable ssp {
|
|
entry:
|
|
; ELF64-LABEL: ret11
|
|
; ELF64: blr
|
|
ret float %a
|
|
}
|
|
|
|
define double @ret12(double %a) nounwind uwtable ssp {
|
|
entry:
|
|
; ELF64-LABEL: ret12
|
|
; ELF64: blr
|
|
ret double %a
|
|
}
|
|
|
|
define i8 @ret13() nounwind uwtable ssp {
|
|
entry:
|
|
; ELF64-LABEL: ret13
|
|
; ELF64: li
|
|
; ELF64: blr
|
|
ret i8 15;
|
|
}
|
|
|
|
define i16 @ret14() nounwind uwtable ssp {
|
|
entry:
|
|
; ELF64-LABEL: ret14
|
|
; ELF64: li
|
|
; ELF64: blr
|
|
ret i16 -225;
|
|
}
|
|
|
|
define i32 @ret15() nounwind uwtable ssp {
|
|
entry:
|
|
; ELF64-LABEL: ret15
|
|
; ELF64: lis
|
|
; ELF64: ori
|
|
; ELF64: blr
|
|
ret i32 278135;
|
|
}
|
|
|
|
define i64 @ret16() nounwind uwtable ssp {
|
|
entry:
|
|
; ELF64-LABEL: ret16
|
|
; ELF64: li
|
|
; ELF64: sldi
|
|
; ELF64: oris
|
|
; ELF64: ori
|
|
; ELF64: blr
|
|
ret i64 27813515225;
|
|
}
|
|
|
|
define float @ret17() nounwind uwtable ssp {
|
|
entry:
|
|
; ELF64-LABEL: ret17
|
|
; ELF64: addis
|
|
; ELF64: lfs
|
|
; ELF64: blr
|
|
ret float 2.5;
|
|
}
|
|
|
|
define double @ret18() nounwind uwtable ssp {
|
|
entry:
|
|
; ELF64-LABEL: ret18
|
|
; ELF64: addis
|
|
; ELF64: lfd
|
|
; ELF64: blr
|
|
ret double 2.5e-33;
|
|
}
|