~ubuntu-branches/ubuntu/trusty/llvm-toolchain-snapshot/trusty-201310232150

« back to all changes in this revision

Viewing changes to test/CodeGen/SystemZ/fp-conv-09.ll

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2013-05-27 15:01:57 UTC
  • mfrom: (0.10.1) (0.9.1) (0.8.1) (0.7.1) (0.6.1) (0.5.2)
  • Revision ID: package-import@ubuntu.com-20130527150157-tdkrsjpuvht7v0qx
Tags: 1:3.4~svn182733-1~exp1
* New snapshot release (3.4 release)
* Add a symlink of libLLVM-3.4.so.1 to usr/lib/llvm-3.4/lib/libLLVM-3.4.so
    to fix make the llvm-config-3.4 --libdir work (Closes: #708677)
  * Various packages rename to allow co installations:
    * libclang1 => libclang1-3.4
    * libclang1-dbg => libclang1-3.4-dbg
    * libclang-dev => libclang-3.4-dev
    * libclang-common-dev => libclang-common-3.4-dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
; Test conversion of floating-point values to signed i32s.
 
2
;
 
3
; RUN: llc < %s -mtriple=s390x-linux-gnu | FileCheck %s
 
4
 
 
5
; Test f32->i32.
 
6
define i32 @f1(float %f) {
 
7
; CHECK: f1:
 
8
; CHECK: cfebr %r2, 5, %f0
 
9
; CHECK: br %r14
 
10
  %conv = fptosi float %f to i32
 
11
  ret i32 %conv
 
12
}
 
13
 
 
14
; Test f64->i32.
 
15
define i32 @f2(double %f) {
 
16
; CHECK: f2:
 
17
; CHECK: cfdbr %r2, 5, %f0
 
18
; CHECK: br %r14
 
19
  %conv = fptosi double %f to i32
 
20
  ret i32 %conv
 
21
}
 
22
 
 
23
; Test f128->i32.
 
24
define i32 @f3(fp128 *%src) {
 
25
; CHECK: f3:
 
26
; CHECK: ld %f0, 0(%r2)
 
27
; CHECK: ld %f2, 8(%r2)
 
28
; CHECK: cfxbr %r2, 5, %f0
 
29
; CHECK: br %r14
 
30
  %f = load fp128 *%src
 
31
  %conv = fptosi fp128 %f to i32
 
32
  ret i32 %conv
 
33
}