aboutsummaryrefslogtreecommitdiffstats
path: root/test/Feature/fold-fpcast.ll
blob: fc90a66b45308a859a3af8d20db16ebf42e29758 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
; RUN: llvm-upgrade < %s | llvm-as | llvm-dis -o /dev/null -f &&
; RUN: llvm-upgrade < %s | llvm-as | llvm-dis | not grep bitcast

int %test1() {
   ret int bitcast(float 3.7 to int)
}

float %test2() {
  ret float bitcast(int 17 to float)
}

long %test3() {
  ret long bitcast (double 3.1415926 to long)
}

double %test4() {
  ret double bitcast (long 42 to double)
}