[llvm-commits] CVS: llvm/test/Feature/fold-fpcast.ll

Reid Spencer reid at x10sys.com
Mon Dec 11 13:25:24 PST 2006



Changes in directory llvm/test/Feature:

fold-fpcast.ll added (r1.1)
---
Log message:

Add a test for constant folding of bitcast to/from floating point.


---
Diffs of the changes:  (+18 -0)

 fold-fpcast.ll |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+)


Index: llvm/test/Feature/fold-fpcast.ll
diff -c /dev/null llvm/test/Feature/fold-fpcast.ll:1.1
*** /dev/null	Mon Dec 11 15:25:20 2006
--- llvm/test/Feature/fold-fpcast.ll	Mon Dec 11 15:25:10 2006
***************
*** 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)
+ }
+ 






More information about the llvm-commits mailing list