diff options
author | Yvan Roux <yvan.roux@linaro.org> | 2014-05-13 13:39:05 +0000 |
---|---|---|
committer | Yvan Roux <yvan.roux@linaro.org> | 2014-05-13 13:39:05 +0000 |
commit | dd636267ecd574bf8e15b6ce0b285c2effe68c7b (patch) | |
tree | 73635b1cca4233d60a0ea6169b463cbc1fbc6a90 | |
parent | fbd7475f01994ff89805c0a2ac4844de31ff1b46 (diff) |
gcc/
2014-05-13 Yvan Roux <yvan.roux@linaro.org>
Backport from trunk r209889.
2014-04-29 Zhenqiang Chen <zhenqiang.chen@linaro.org>
* config/aarch64/aarch64.md (mov<mode>cc): New for GPF.
gcc/testsuite/
2014-05-13 Yvan Roux <yvan.roux@linaro.org>
Backport from trunk r209889.
2014-04-29 Zhenqiang Chen <zhenqiang.chen@linaro.org>
* gcc.target/aarch64/fcsel_1.c: New test case.
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/linaro/gcc-4_9-branch@210376 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog.linaro | 7 | ||||
-rw-r--r-- | gcc/config/aarch64/aarch64.md | 19 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog.linaro | 7 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/aarch64/fcsel_1.c | 22 |
4 files changed, 55 insertions, 0 deletions
diff --git a/gcc/ChangeLog.linaro b/gcc/ChangeLog.linaro index 3ded15b2d0a..9f0d6a23d77 100644 --- a/gcc/ChangeLog.linaro +++ b/gcc/ChangeLog.linaro @@ -1,5 +1,12 @@ 2014-05-13 Yvan Roux <yvan.roux@linaro.org> + Backport from trunk r209889. + 2014-04-29 Zhenqiang Chen <zhenqiang.chen@linaro.org> + + * config/aarch64/aarch64.md (mov<mode>cc): New for GPF. + +2014-05-13 Yvan Roux <yvan.roux@linaro.org> + Backport from trunk r209556. 2014-04-22 Zhenqiang Chen <zhenqiang.chen@linaro.org> diff --git a/gcc/config/aarch64/aarch64.md b/gcc/config/aarch64/aarch64.md index c86a29d8e7f..11fd0280aef 100644 --- a/gcc/config/aarch64/aarch64.md +++ b/gcc/config/aarch64/aarch64.md @@ -2345,6 +2345,25 @@ } ) +(define_expand "mov<mode>cc" + [(set (match_operand:GPF 0 "register_operand" "") + (if_then_else:GPF (match_operand 1 "aarch64_comparison_operator" "") + (match_operand:GPF 2 "register_operand" "") + (match_operand:GPF 3 "register_operand" "")))] + "" + { + rtx ccreg; + enum rtx_code code = GET_CODE (operands[1]); + + if (code == UNEQ || code == LTGT) + FAIL; + + ccreg = aarch64_gen_compare_reg (code, XEXP (operands[1], 0), + XEXP (operands[1], 1)); + operands[1] = gen_rtx_fmt_ee (code, VOIDmode, ccreg, const0_rtx); + } +) + (define_insn "*csinc2<mode>_insn" [(set (match_operand:GPI 0 "register_operand" "=r") (plus:GPI (match_operator:GPI 2 "aarch64_comparison_operator" diff --git a/gcc/testsuite/ChangeLog.linaro b/gcc/testsuite/ChangeLog.linaro index 8891ac4f3ee..7c318e1da7d 100644 --- a/gcc/testsuite/ChangeLog.linaro +++ b/gcc/testsuite/ChangeLog.linaro @@ -1,3 +1,10 @@ +2014-05-13 Yvan Roux <yvan.roux@linaro.org> + + Backport from trunk r209889. + 2014-04-29 Zhenqiang Chen <zhenqiang.chen@linaro.org> + + * gcc.target/aarch64/fcsel_1.c: New test case. + 2014-04-22 Yvan Roux <yvan.roux@linaro.org> GCC Linaro 4.9-2014.04 released. diff --git a/gcc/testsuite/gcc.target/aarch64/fcsel_1.c b/gcc/testsuite/gcc.target/aarch64/fcsel_1.c new file mode 100644 index 00000000000..2704ee0ede7 --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/fcsel_1.c @@ -0,0 +1,22 @@ +/* { dg-do compile } */ +/* { dg-options " -O2 " } */ + +float +f_1 (float a, float b, float c, float d) +{ + if (a > 0.0) + return c; + else + return 2.0; +} + +double +f_2 (double a, double b, double c, double d) +{ + if (a > b) + return c; + else + return d; +} + +/* { dg-final { scan-assembler-times "\tfcsel" 2 } } */ |