mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-15 20:29:48 +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
57 lines
1.3 KiB
LLVM
57 lines
1.3 KiB
LLVM
; RUN: llc -mcpu=pwr7 -mattr=-vsx -fast-isel -fast-isel-abort=1 < %s | FileCheck %s
|
|
target datalayout = "E-m:e-i64:64-n32:64"
|
|
target triple = "powerpc64-unknown-linux-gnu"
|
|
|
|
define fastcc i64 @g1(i64 %g1, double %f1, i64 %g2, double %f2, i64 %g3, double %f3, i64 %g4, double %f4) #0 {
|
|
ret i64 %g1
|
|
|
|
; CHECK-LABEL: @g1
|
|
; CHECK-NOT: mr 3,
|
|
; CHECK: blr
|
|
}
|
|
|
|
define fastcc i64 @g2(i64 %g1, double %f1, i64 %g2, double %f2, i64 %g3, double %f3, i64 %g4, double %f4) #0 {
|
|
ret i64 %g2
|
|
|
|
; CHECK-LABEL: @g2
|
|
; CHECK: mr 3, 4
|
|
; CHECK-NEXT: blr
|
|
}
|
|
|
|
define fastcc i64 @g3(i64 %g1, double %f1, i64 %g2, double %f2, i64 %g3, double %f3, i64 %g4, double %f4) #0 {
|
|
ret i64 %g3
|
|
|
|
; CHECK-LABEL: @g3
|
|
; CHECK: mr 3, 5
|
|
; CHECK-NEXT: blr
|
|
}
|
|
|
|
define fastcc double @f2(i64 %g1, double %f1, i64 %g2, double %f2, i64 %g3, double %f3, i64 %g4, double %f4) #0 {
|
|
ret double %f2
|
|
|
|
; CHECK-LABEL: @f2
|
|
; CHECK: fmr 1, 2
|
|
; CHECK-NEXT: blr
|
|
}
|
|
|
|
define void @cg2(i64 %v) #0 {
|
|
tail call fastcc i64 @g1(i64 0, double 0.0, i64 %v, double 0.0, i64 0, double 0.0, i64 0, double 0.0)
|
|
ret void
|
|
|
|
; CHECK-LABEL: @cg2
|
|
; CHECK: mr 4, 3
|
|
; CHECK: blr
|
|
}
|
|
|
|
define void @cf2(double %v) #0 {
|
|
tail call fastcc i64 @g1(i64 0, double 0.0, i64 0, double %v, i64 0, double 0.0, i64 0, double 0.0)
|
|
ret void
|
|
|
|
; CHECK-LABEL: @cf2
|
|
; CHECK: mr 2, 1
|
|
; CHECK: blr
|
|
}
|
|
|
|
attributes #0 = { nounwind }
|
|
|