- To: Aurelien Buhrig <aurelien.buhrig.gcc@xxxxxxxxx>
- Subject: Re: Question about compare rtl
- From: Ian Lance Taylor <iant@xxxxxxxxxx>
- Date: Fri, 22 Jun 2012 10:41:44 -0700
- Cc: gcc-help@xxxxxxxxxxx
- Comment: DKIM? See http://www.dkim.org
- Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys
- In-reply-to: <4FE49CA3.5030204@gmail.com> (Aurelien Buhrig's message of "Fri, 22 Jun 2012 18:26:11 +0200")
- User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)
Aurelien Buhrig <aurelien.buhrig.gcc@xxxxxxxxx> writes:
> What I mean is I do not have any define_insn that matches a cbranch, but
> the cbranch named pattern is expanded during expand pass using a
> define_expand into:
> (set (reg:CC CC_REGNO) (compare:CC op0 op1))
> (set (pc) (if_then_else (match_operator 1 "xxx"
> [(reg:CC CC_REGNO)(const_int 0)]) (label_ref ()) (pc)))
>
> Then the first insn can be combined with such a sub pattern:
> [(set (reg:CC CC_REGNO) (compare:CC op1 op2))
> (set op0 (minus (match_dup 1) (match_dup 2))]
>
> And my question was about the correctness of the previous pattern
> compared with the following when an overflow occurs (and the comparison
> operator is lt).
> [(set (reg:CC CC_REGNO) (compare:CC (minus (op1 op2)) (const_int 0)))
> (set op0 (minus (match_dup 1) (match_dup 2))]
>
> You helped me (thanks!) come to the conclusion that both are valid, and
> that the N xor V test is enough for the two, right?
Sounds right.
Ian
[Linux C Programming]
[Linux Kernel]
[eCos]
[Fedora Development]
[Fedora Announce]
[Autoconf]
[The DWARVES Debugging Tools]
[Yosemite Campsites]
[Yosemite News]
[Linux GCC]