mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-18 12:29:21 +00:00
Add a test for constant folding of bitcast to/from floating point.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32446 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
711679e21c
commit
6a126513fc
18
test/Feature/fold-fpcast.ll
Normal file
18
test/Feature/fold-fpcast.ll
Normal file
@ -0,0 +1,18 @@
|
||||
; RUN: llvm-as < %s | 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)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user