diff options
author | Evan Cheng <evan.cheng@apple.com> | 2008-11-04 19:57:48 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2008-11-04 19:57:48 +0000 |
commit | c7c77297e28189c3c3bccd6e261a84970704b760 (patch) | |
tree | e175f24c2d7f9bf100ca69d50e8bdbb65f0b485e /test | |
parent | a7ec706e9d63029deb80c7051b586428af137647 (diff) | |
download | external_llvm-c7c77297e28189c3c3bccd6e261a84970704b760.zip external_llvm-c7c77297e28189c3c3bccd6e261a84970704b760.tar.gz external_llvm-c7c77297e28189c3c3bccd6e261a84970704b760.tar.bz2 |
Custom lower bit_convert i64 -> f64 into FMDRR. This is now happening with legalizetypes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58714 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/CodeGen/ARM/fixunsdfdi.ll | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/test/CodeGen/ARM/fixunsdfdi.ll b/test/CodeGen/ARM/fixunsdfdi.ll new file mode 100644 index 0000000..d3038b9 --- /dev/null +++ b/test/CodeGen/ARM/fixunsdfdi.ll @@ -0,0 +1,29 @@ +; RUN: llvm-as < %s | llc -march=arm -mattr=+vfp2 +; RUN: llvm-as < %s | llc -march=arm -mattr=vfp2 | not grep fstd + +define hidden i64 @__fixunsdfdi(double %x) nounwind readnone { +entry: + %x14 = bitcast double %x to i64 ; <i64> [#uses=1] + br i1 true, label %bb3, label %bb10 + +bb3: ; preds = %entry + br i1 true, label %bb5, label %bb7 + +bb5: ; preds = %bb3 + %u.in.mask = and i64 %x14, -4294967296 ; <i64> [#uses=1] + %.ins = or i64 0, %u.in.mask ; <i64> [#uses=1] + %0 = bitcast i64 %.ins to double ; <double> [#uses=1] + %1 = sub double %x, %0 ; <double> [#uses=1] + %2 = fptosi double %1 to i32 ; <i32> [#uses=1] + %3 = add i32 %2, 0 ; <i32> [#uses=1] + %4 = zext i32 %3 to i64 ; <i64> [#uses=1] + %5 = shl i64 %4, 32 ; <i64> [#uses=1] + %6 = or i64 %5, 0 ; <i64> [#uses=1] + ret i64 %6 + +bb7: ; preds = %bb3 + ret i64 0 + +bb10: ; preds = %entry + ret i64 0 +} |