2017-08-02 08:28:10 +08:00
|
|
|
; RUN: llc < %s -mattr=+sse4.1,-avx | FileCheck %s --check-prefix=CHECK-HARD-FLOAT
|
|
|
|
; RUN: llc < %s -mattr=+sse4.1,-avx,+soft-float | FileCheck %s --check-prefix=CHECK-SOFT-FLOAT
|
2013-07-26 21:28:29 +08:00
|
|
|
|
|
|
|
target triple = "x86_64-unknown-linux-gnu"
|
|
|
|
|
|
|
|
declare float @llvm.floor.f32(float)
|
|
|
|
|
|
|
|
; CHECK-SOFT-FLOAT: callq floorf
|
2015-09-22 19:43:17 +08:00
|
|
|
; CHECK-HARD-FLOAT: roundss $9, %xmm0, %xmm0
|
2013-07-26 21:28:29 +08:00
|
|
|
define float @myfloor(float %a) {
|
|
|
|
%val = tail call float @llvm.floor.f32(float %a)
|
|
|
|
ret float %val
|
|
|
|
}
|