On 09/08/2015 01:19 AM, Peter Maydell wrote:
> The tcg common code isn't smart enough to notice it only
> needs to calculate not(t1) once ?

Correct, we do no value numbering or cse.

> In the overwhelmingly common case (x86 tcg backend)
> we would save an insn every time, right?

Yes.  It all depends on what value is used for NZCV, of course.

Thankfully we *do* do dead code elimination, which is why I unconditionally
compute both T1 and T2, and let them be deleted should they be unused.

> I wouldn't bother to make the front-end generate different
> code for the backend does/doesn't have andc situations,
> certainly.

I'll mock it up and see how much duplication there is.  And also check it out
on a Haswell host, which does have andc.


r~

Reply via email to