diff options
-rw-r--r-- | test/Feature/fold-fpcast.ll | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/Feature/fold-fpcast.ll b/test/Feature/fold-fpcast.ll new file mode 100644 index 0000000000..cb93ef8c82 --- /dev/null +++ b/test/Feature/fold-fpcast.ll @@ -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) +} + |