Commit d7685183 by Michael Meissner Committed by Michael Meissner

re PR target/53487 (Unrecognizable insn for conditional move)

[gcc]
2012-06-04  Michael Meissner  <meissner@linux.vnet.ibm.com>

	PR target/53487
	* config/rs6000/rs6000.c (rs6000_generate_compare): If we are
	doing an unsigned compare, make sure the second argument is not a
	negative constant.
	(rs6000_emit_cmove): Don't allow floating point comparisons when
	generating ISEL moves.

[gcc/testsuite]
2012-06-04  Michael Meissner  <meissner@linux.vnet.ibm.com>

	* gcc.target/powerpc/pr53487.c: New test.

From-SVN: r188248
parent 951c68fa
2012-06-05 Michael Meissner <meissner@linux.vnet.ibm.com>
PR target/53487
* config/rs6000/rs6000.c (rs6000_generate_compare): If we are
doing an unsigned compare, make sure the second argument is not a
negative constant.
(rs6000_emit_cmove): Don't allow floating point comparisons when
generating ISEL moves.
2012-06-05 Edmar Wienskoski <edmar@freescale.com>
* config/rs6000/e5500.md: New file.
......
......@@ -15419,6 +15419,16 @@ rs6000_generate_compare (rtx cmp, enum machine_mode mode)
else
comp_mode = CCmode;
/* If we have an unsigned compare, make sure we don't have a signed value as
an immediate. */
if (comp_mode == CCUNSmode && GET_CODE (op1) == CONST_INT
&& INTVAL (op1) < 0)
{
op0 = copy_rtx_if_shared (op0);
op1 = force_reg (GET_MODE (op0), op1);
cmp = gen_rtx_fmt_ee (code, GET_MODE (cmp), op0, op1);
}
/* First, the compare. */
compare_result = gen_reg_rtx (comp_mode);
......@@ -16172,6 +16182,11 @@ rs6000_emit_cmove (rtx dest, rtx op, rtx true_cond, rtx false_cond)
if (GET_MODE (false_cond) != result_mode)
return 0;
/* Don't allow using floating point comparisons for integer results for
now. */
if (FLOAT_MODE_P (compare_mode) && !FLOAT_MODE_P (result_mode))
return 0;
/* First, work out if the hardware can do this at all, or
if it's too slow.... */
if (!FLOAT_MODE_P (compare_mode))
......
2012-06-05 Michael Meissner <meissner@linux.vnet.ibm.com>
* gcc.target/powerpc/pr53487.c: New test.
2012-06-05 Pat Haugen <pthaugen@us.ibm.com>
* gcc.target/powerpc/lhs-1.c: Use parm instead of stack space.
......
/* { dg-do compile { target { powerpc*-*-* } } } */
/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
/* { dg-require-effective-target powerpc_vsx_ok } */
/* { dg-options "-O3 -mcpu=power7 -misel -ffast-math" } */
struct phylo_s {
int left;
};
int Cluster(float **dmx, int N, struct phylo_s *tree)
{
float **mx;
int *coord;
int i;
int Np;
int row, col;
float min;
for (col = 0; col < N; Np--)
{
for (row = 0; row < Np; row++)
for (col = row+1; col < Np; col++)
if (mx[row][col] < min)
i = row;
tree[Np-2].left = coord[i];
}
Free2DArray((void **) mx, N);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment