summaryrefslogtreecommitdiff
path: root/test/CodeGen/X86/bitcast.ll
blob: d0d3bd4bcb3ae4ff37b1fa92fd7f5d6cb9e78436 (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
; RUN: llvm-as < %s | llc &&
; RUN: llvm-as < %s | llc -march=x86 &&
; RUN: llvm-as < %s | llc -march=x86-64
; PR1033

long %test1(double %t) {
  %u = bitcast double %t to long
  ret long %u
}

double %test2(long %t) {
  %u = bitcast long %t to double
  ret double %u
}

int %test3(float %t) {
  %u = bitcast float %t to int
  ret int %u
}

float %test4(int %t) {
  %u = bitcast int %t to float
  ret float %u
}