From ee187be5cac70bace7da8624c93adcce26dc92bb Mon Sep 17 00:00:00 2001 From: Zhou Sheng Date: Fri, 19 Jan 2007 14:30:59 +0000 Subject: [PATCH] Cover non-byte-width BATs situation. llvm-svn: 33356 --- llvm/test/Integer/fold-fpcast_bt.ll | 15 +++++++++++++++ llvm/test/Integer/undefined_bt.ll | 12 ++++++------ 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/llvm/test/Integer/fold-fpcast_bt.ll b/llvm/test/Integer/fold-fpcast_bt.ll index 71823ab14614..d1453c4ec7a4 100644 --- a/llvm/test/Integer/fold-fpcast_bt.ll +++ b/llvm/test/Integer/fold-fpcast_bt.ll @@ -16,3 +16,18 @@ define double %test4() { ret double bitcast (i64 42 to double) } +define i30 %test5() { + ret i30 fptoui(float 3.7 to i30) +} + +define float %test6() { + ret float uitofp(i30 17 to float) +} + +define i6 %test7() { + ret i6 bitcast (double 3.1415926 to i6) +} + +define double %test8() { + ret double bitcast (i9 42 to double) +} diff --git a/llvm/test/Integer/undefined_bt.ll b/llvm/test/Integer/undefined_bt.ll index 3a413d409f57..94f51905cda1 100644 --- a/llvm/test/Integer/undefined_bt.ll +++ b/llvm/test/Integer/undefined_bt.ll @@ -3,17 +3,17 @@ ; RUN: diff %t1.ll %t2.ll -%X = global i32 undef +%X = global i31 undef implementation declare i32 "atoi"(i8 *) -define i32 %test() { - ret i32 undef +define i63 %test() { + ret i63 undef } -define i32 %test2() { - %X = add i32 undef, 1 - ret i32 %X +define i31 %test2() { + %X = add i31 undef, 1 + ret i31 %X }