• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc -O3 -mtriple=powerpc-unknown-linux-gnu -mcpu=e500 -mattr=spe < %s | FileCheck %s
2
3; PowerPC SPE is a rare in-tree target that has the FP_TO_SINT node marked
4; as Legal.
5
6; Verify that fptosi(42.1) isn't simplified when the rounding mode is
7; unknown.
8; Verify that no gross errors happen.
9; CHECK-LABEL: @f20
10; COMMON: cfdctsiz
11define i32 @f20(double %a) strictfp {
12entry:
13  %result = call i32 @llvm.experimental.constrained.fptosi.i32.f64(double 42.1,
14                                               metadata !"fpexcept.strict")
15                                               strictfp
16  ret i32 %result
17}
18
19@llvm.fp.env = thread_local global i8 zeroinitializer, section "llvm.metadata"
20declare i32 @llvm.experimental.constrained.fptosi.i32.f64(double, metadata)
21