Does neon_vset_lane<mode> expand wrong code when BYTES_BIG_ENDIAN?
Xinyu Qi
xyqi@marvell.com
Thu Jan 5 07:16:00 GMT 2012
Hi,
In neon.md, the define_expand "neon_vset_lane<mode>" has extra code to deal with the imm operand when BYTE_BIG_ENDIAN,
unsigned int elt = INTVAL (operands[3]);
if (BYTES_BIG_ENDIAN)
{
unsigned int reg_nelts
= 64 / GET_MODE_BITSIZE (GET_MODE_INNER (<MODE>mode));
elt ^= reg_nelts - 1;
}
Then,
emit_insn (gen_vec_set<mode>_internal (operands[0], operands[1],
GEN_INT (1 << elt), operands[2]));
While the define_insn "vec_set<mode>_internal" has the extra code as well,
int elt = ffs ((int) INTVAL (operands[2])) - 1;
if (BYTES_BIG_ENDIAN)
elt = GET_MODE_NUNITS (<MODE>mode) - 1 - elt;
operands[2] = GEN_INT (elt);
It seems these two parts of the code dealing with BYTE_BIG_ENDIAN will cancel each other,
and result in the original imm op unchanged.
Is there something wrong with these code?
Thanks,
Xinyu
More information about the Gcc
mailing list