diff options
author | Akira Hatanaka <ahatanak@gmail.com> | 2011-03-31 18:26:17 +0000 |
---|---|---|
committer | Akira Hatanaka <ahatanak@gmail.com> | 2011-03-31 18:26:17 +0000 |
commit | 1d6b38d9d37d5de471f5954b23b46dac58136fec (patch) | |
tree | e1a99e3d67f2d9fdd6e7450c67b3c2295055be0e /test/CodeGen/Mips/fpcmp.ll | |
parent | 5bb3eced658dfbbca60e183155017481f6159923 (diff) | |
download | external_llvm-1d6b38d9d37d5de471f5954b23b46dac58136fec.zip external_llvm-1d6b38d9d37d5de471f5954b23b46dac58136fec.tar.gz external_llvm-1d6b38d9d37d5de471f5954b23b46dac58136fec.tar.bz2 |
Added support for FP conditional move instructions and fixed bugs in handling of FP comparisons.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128650 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/Mips/fpcmp.ll')
-rw-r--r-- | test/CodeGen/Mips/fpcmp.ll | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/CodeGen/Mips/fpcmp.ll b/test/CodeGen/Mips/fpcmp.ll new file mode 100644 index 0000000..51d55f0 --- /dev/null +++ b/test/CodeGen/Mips/fpcmp.ll @@ -0,0 +1,23 @@ +; RUN: llc < %s -march=mipsel -mcpu=4ke | FileCheck %s -check-prefix=CHECK-MIPS32R2 +; RUN: llc < %s -march=mipsel | FileCheck %s -check-prefix=CHECK-MIPS1 + +@g1 = external global i32 + +define i32 @f(float %f0, float %f1) nounwind { +entry: +; CHECK-MIPS32R2: c.olt.s +; CHECK-MIPS32R2: movt +; CHECK-MIPS32R2: c.olt.s +; CHECK-MIPS32R2: movt +; CHECK-MIPS1: c.olt.s +; CHECK-MIPS1: bc1f +; CHECK-MIPS1: c.olt.s +; CHECK-MIPS1: bc1f + %cmp = fcmp olt float %f0, %f1 + %conv = zext i1 %cmp to i32 + %tmp2 = load i32* @g1, align 4 + %add = add nsw i32 %tmp2, %conv + store i32 %add, i32* @g1, align 4 + %cond = select i1 %cmp, i32 10, i32 20 + ret i32 %cond +} |