+2013-08-09 Zhenqiang Chen <zhenqiang.chen@linaro.org>
+
+ * config/arm/neon.md (vcond): Fix floating-point vector
+ comparisons against 0.
+
2013-08-08 Vladimir Makarov <vmakarov@redhat.com>
* lra-constraints.c (emit_spill_move): Remove assert.
? 3 : 1;
rtx magic_rtx = GEN_INT (magic_word);
int inverse = 0;
+ int use_zero_form = 0;
int swap_bsl_operands = 0;
rtx mask = gen_reg_rtx (<V_cmp_result>mode);
rtx tmp = gen_reg_rtx (<V_cmp_result>mode);
switch (GET_CODE (operands[3]))
{
case GE:
+ case GT:
case LE:
+ case LT:
case EQ:
- if (!REG_P (operands[5])
- && (operands[5] != CONST0_RTX (<MODE>mode)))
- operands[5] = force_reg (<MODE>mode, operands[5]);
- break;
+ if (operands[5] == CONST0_RTX (<MODE>mode))
+ {
+ use_zero_form = 1;
+ break;
+ }
+ /* Fall through. */
default:
if (!REG_P (operands[5]))
operands[5] = force_reg (<MODE>mode, operands[5]);
a GT b -> a GT b
a LE b -> b GE a
a LT b -> b GT a
- a EQ b -> a EQ b */
+ a EQ b -> a EQ b
+ Note that there also exist direct comparison against 0 forms,
+ so catch those as a special case. */
+ if (use_zero_form)
+ {
+ inverse = 0;
+ switch (GET_CODE (operands[3]))
+ {
+ case LT:
+ base_comparison = gen_neon_vclt<mode>;
+ break;
+ case LE:
+ base_comparison = gen_neon_vcle<mode>;
+ break;
+ default:
+ /* Do nothing, other zero form cases already have the correct
+ base_comparison. */
+ break;
+ }
+ }
if (!inverse)
emit_insn (base_comparison (mask, operands[4], operands[5], magic_rtx));
+2013-08-09 Zhenqiang Chen <zhenqiang.chen@linaro.org>
+
+ * gcc.target/arm/lp1189445.c: New testcase.
+
2013-08-08 Richard Sandiford <rdsandiford@googlemail.com>
* gcc.dg/torture/pr58079.c: New test.
--- /dev/null
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_neon } */
+/* { dg-add-options arm_neon } */
+/* { dg-options "-O3" } */
+
+int id;
+int
+test (const long int *data)
+{
+ int i, retval;
+ retval = id;
+ for (i = 0; i < id; i++)
+ {
+ retval &= (data[i] <= 0);
+ }
+
+ return (retval);
+}