diff options
author | NAKAMURA Takumi <geek4civic@gmail.com> | 2012-02-25 03:37:25 +0000 |
---|---|---|
committer | NAKAMURA Takumi <geek4civic@gmail.com> | 2012-02-25 03:37:25 +0000 |
commit | bdf94879dfbf32446a8144783b6c2643e83ea8d0 (patch) | |
tree | b7f804b5241cf24cedc0982da6f668f64c4484e8 /llvm/test | |
parent | 50e0b81ea9f57c1451343e9b1caeae5440c75217 (diff) | |
download | bcm5719-llvm-bdf94879dfbf32446a8144783b6c2643e83ea8d0.tar.gz bcm5719-llvm-bdf94879dfbf32446a8144783b6c2643e83ea8d0.zip |
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.
llvm-svn: 151432
Diffstat (limited to 'llvm/test')
-rw-r--r-- | llvm/test/CodeGen/X86/win_ftol2.ll | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/win_ftol2.ll b/llvm/test/CodeGen/X86/win_ftol2.ll index 90d8a312eb6..596b4262e6b 100644 --- a/llvm/test/CodeGen/X86/win_ftol2.ll +++ b/llvm/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 +} |