summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorNAKAMURA Takumi <geek4civic@gmail.com>2012-02-25 03:37:25 +0000
committerNAKAMURA Takumi <geek4civic@gmail.com>2012-02-25 03:37:25 +0000
commit9a68fdc7f8211a9330537d44e3406d79fc5562af (patch)
tree7399a309b349680e8390519aac2780cbfa085e30 /test
parentdfba3ad88276b0aad3d515320bb4a50480c364d9 (diff)
downloadllvm-9a68fdc7f8211a9330537d44e3406d79fc5562af.tar.gz
llvm-9a68fdc7f8211a9330537d44e3406d79fc5562af.tar.bz2
llvm-9a68fdc7f8211a9330537d44e3406d79fc5562af.tar.xz
Target/X86: Fix assertion failures and warnings caused by r151382 _ftol2 lowering for i386-*-win32 targets. Patch by Joe Groff.
[Joe Groff] Hi everyone. My previous patch applied as r151382 had a few problems: Clang raised a warning, and X86 LowerOperation would assert out for fptoui f64 to i32 because it improperly lowered to an illegal BUILD_PAIR. Here's a patch that addresses these issues. Let me know if any other changes are necessary. Thanks. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151432 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/CodeGen/X86/win_ftol2.ll14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/CodeGen/X86/win_ftol2.ll b/test/CodeGen/X86/win_ftol2.ll
index 90d8a312eb..596b4262e6 100644
--- a/test/CodeGen/X86/win_ftol2.ll
+++ b/test/CodeGen/X86/win_ftol2.ll
@@ -128,3 +128,17 @@ define {double, i64} @double_ui64_4(double %x, double %y) nounwind {
%5 = insertvalue {double, i64} %4, i64 %3, 1
ret {double, i64} %5
}
+
+define i32 @double_ui32_5(double %X) {
+; FTOL: @double_ui32_5
+; FTOL: calll __ftol2
+ %tmp.1 = fptoui double %X to i32
+ ret i32 %tmp.1
+}
+
+define i64 @double_ui64_5(double %X) {
+; FTOL: @double_ui64_5
+; FTOL: calll __ftol2
+ %tmp.1 = fptoui double %X to i64
+ ret i64 %tmp.1
+}