summaryrefslogtreecommitdiff
path: root/test/CodeGen/X86/bitcast2.ll
blob: 71ecedf8f1ed4c6dec9d6409d1be02f7d4fc6609 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
; RUN: llc < %s -march=x86-64 | FileCheck %s
; RUN: llc < %s -march=x86-64 | not grep rsp

define i64 @test1(double %A) {
; CHECK: test1
; CHECK: movq
   %B = bitcast double %A to i64
   ret i64 %B
}

define double @test2(i64 %A) {
; CHECK: test2
; CHECK: movq
   %B = bitcast i64 %A to double
   ret double %B
}

define i32 @test3(float %A) {
; CHECK: test3
; CHECK: movd
   %B = bitcast float %A to i32
   ret i32 %B
}

define float @test4(i32 %A) {
; CHECK: test4
; CHECK: movd
   %B = bitcast i32 %A to float
   ret float %B
}