[PATCH][AArch64] Improve bit-test-branch pattern to avoid unnecessary register clobber
Richard Henderson
rth@redhat.com
Wed Jan 14 23:52:00 GMT 2015
On 12/15/2014 07:36 AM, Jiong Wang wrote:
> + char buf[64];
> + uint64_t val = ((uint64_t) 1) << UINTVAL (operands[1]);
> + sprintf (buf, "tst\t%%<w>0, %"PRId64, val);
> + output_asm_insn (buf, operands);
> + return "<bcond>\t%l2";
Better to simply modify the operand, as in
operands[1] = GEN_INT (HOST_WIDE_INT_1U << UINTVAL (operands[1]));
return "tst\t%<w>0, %1\;<bcond>\t%l2";
r~
More information about the Gcc-patches
mailing list