2010-02-23 19:15:24 +00:00
|
|
|
; Ensure that all immediate values that are 32-bits or less can be loaded
|
|
|
|
; using a single instruction and that immediate values 64-bits or less can
|
|
|
|
; be loaded using two instructions.
|
|
|
|
;
|
|
|
|
; RUN: llc < %s -march=mblaze | FileCheck %s
|
|
|
|
; RUN: llc < %s -march=mblaze -mattr=+fpu | FileCheck -check-prefix=FPU %s
|
|
|
|
|
|
|
|
define i8 @retimm_i8() {
|
|
|
|
; CHECK: retimm_i8:
|
2010-10-21 03:57:26 +00:00
|
|
|
; CHECK: rtsd
|
|
|
|
; CHECK-NEXT: add
|
2010-02-23 19:15:24 +00:00
|
|
|
; FPU: retimm_i8:
|
2010-10-21 03:57:26 +00:00
|
|
|
; FPU: rtsd
|
|
|
|
; FPU-NEXT: add
|
2010-02-23 19:15:24 +00:00
|
|
|
ret i8 123
|
|
|
|
}
|
|
|
|
|
|
|
|
define i16 @retimm_i16() {
|
|
|
|
; CHECK: retimm_i16:
|
2010-10-21 03:57:26 +00:00
|
|
|
; CHECK: rtsd
|
|
|
|
; CHECK-NEXT: add
|
2010-02-23 19:15:24 +00:00
|
|
|
; FPU: retimm_i16:
|
2010-10-21 03:57:26 +00:00
|
|
|
; FPU: rtsd
|
|
|
|
; FPU-NEXT: add
|
2010-12-06 21:11:01 +00:00
|
|
|
ret i16 31212
|
2010-02-23 19:15:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
define i32 @retimm_i32() {
|
|
|
|
; CHECK: retimm_i32:
|
|
|
|
; CHECK: add
|
|
|
|
; CHECK-NEXT: rtsd
|
|
|
|
; FPU: retimm_i32:
|
|
|
|
; FPU: add
|
|
|
|
; FPU-NEXT: rtsd
|
|
|
|
ret i32 2938128
|
|
|
|
}
|
|
|
|
|
|
|
|
define i64 @retimm_i64() {
|
|
|
|
; CHECK: retimm_i64:
|
|
|
|
; CHECK: add
|
2010-10-21 03:34:22 +00:00
|
|
|
; CHECK-NEXT: rtsd
|
2010-10-21 03:57:26 +00:00
|
|
|
; CHECK-NEXT: add
|
2010-02-23 19:15:24 +00:00
|
|
|
; FPU: retimm_i64:
|
|
|
|
; FPU: add
|
2010-10-21 03:34:22 +00:00
|
|
|
; FPU-NEXT: rtsd
|
2010-10-21 03:57:26 +00:00
|
|
|
; FPU-NEXT: add
|
2010-02-23 19:15:24 +00:00
|
|
|
ret i64 94581823
|
|
|
|
}
|
|
|
|
|
|
|
|
define float @retimm_float() {
|
|
|
|
; CHECK: retimm_float:
|
|
|
|
; CHECK: add
|
|
|
|
; CHECK-NEXT: rtsd
|
|
|
|
; FPU: retimm_float:
|
|
|
|
; FPU: or
|
2010-10-21 03:57:26 +00:00
|
|
|
; FPU-NEXT: rtsd
|
2010-02-23 19:15:24 +00:00
|
|
|
ret float 12.0
|
|
|
|
}
|
|
|
|
|
|
|
|
define double @retimm_double() {
|
|
|
|
; CHECK: retimm_double:
|
|
|
|
; CHECK: add
|
|
|
|
; CHECK-NEXT: add
|
|
|
|
; CHECK-NEXT: rtsd
|
|
|
|
; FPU: retimm_double:
|
|
|
|
; FPU: add
|
|
|
|
; FPU-NEXT: add
|
|
|
|
; FPU-NEXT: rtsd
|
|
|
|
ret double 598382.39283873
|
|
|
|
}
|