diff options
author | Tim Northover <tnorthover@apple.com> | 2014-04-02 14:39:07 +0000 |
---|---|---|
committer | Tim Northover <tnorthover@apple.com> | 2014-04-02 14:39:07 +0000 |
commit | 671c92d886c1559e1986141b6f7bb268a63c911e (patch) | |
tree | 5c8750905953900007044b21f4db0ba2074a65dc /test/CodeGen/ARM64 | |
parent | 24e78e0125dbdc0667fc261175d1148f74612783 (diff) | |
download | llvm-671c92d886c1559e1986141b6f7bb268a63c911e.tar.gz llvm-671c92d886c1559e1986141b6f7bb268a63c911e.tar.bz2 llvm-671c92d886c1559e1986141b6f7bb268a63c911e.tar.xz |
ARM64: fix lowering of fp128 fptosi/fptoui
We were creating libcall nodes that returned an MVT::f128, when these
particular operations actually return an int of some stripe.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205425 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/ARM64')
-rw-r--r-- | test/CodeGen/ARM64/illegal-float-ops.ll | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/test/CodeGen/ARM64/illegal-float-ops.ll b/test/CodeGen/ARM64/illegal-float-ops.ll index a122079744..9a35fe54d3 100644 --- a/test/CodeGen/ARM64/illegal-float-ops.ll +++ b/test/CodeGen/ARM64/illegal-float-ops.ll @@ -245,3 +245,51 @@ define void @test_fmuladd(fp128 %fp128) { ret void } + +define i32 @test_fptosi32(fp128 %a) { +; CHECK-LABEL: test_fptosi32: +; CHECK: bl __fixtfsi + %conv.i = fptosi fp128 %a to i32 + %b = add nsw i32 %conv.i, 48 + ret i32 %b +} + +define i64 @test_fptosi64(fp128 %a) { +; CHECK-LABEL: test_fptosi64: +; CHECK: bl __fixtfdi + %conv.i = fptosi fp128 %a to i64 + %b = add nsw i64 %conv.i, 48 + ret i64 %b +} + +define i128 @test_fptosi128(fp128 %a) { +; CHECK-LABEL: test_fptosi128: +; CHECK: bl __fixtfti + %conv.i = fptosi fp128 %a to i128 + %b = add nsw i128 %conv.i, 48 + ret i128 %b +} + +define i32 @test_fptoui32(fp128 %a) { +; CHECK-LABEL: test_fptoui32: +; CHECK: bl __fixunstfsi + %conv.i = fptoui fp128 %a to i32 + %b = add nsw i32 %conv.i, 48 + ret i32 %b +} + +define i64 @test_fptoui64(fp128 %a) { +; CHECK-LABEL: test_fptoui64: +; CHECK: bl __fixunstfdi + %conv.i = fptoui fp128 %a to i64 + %b = add nsw i64 %conv.i, 48 + ret i64 %b +} + +define i128 @test_fptoui128(fp128 %a) { +; CHECK-LABEL: test_fptoui128: +; CHECK: bl __fixunstfti + %conv.i = fptoui fp128 %a to i128 + %b = add nsw i128 %conv.i, 48 + ret i128 %b +} |