This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: simplify_subreg aborts bad?
>
> > In setCC instruction we were speaking, you don't use conditional jump.
> > Can you try to be more specific?
>
> In the blt and slt expanders, I emit something like this:
> (set (op:[SI,CC]) (lt (op:SI) (op:SI)))
> [SI for slt, CC for blt]
>
> I later have an insn that matches that set as-is (well, one for SI and
> one for CC) and also an insn that contains this:
>
> (if_then_else (lt (op 0 "..." "r")
> (op:SI 1 "..." "i")))
>
> The 0 predicate tests for CC or SI mode but the conditional jump is
> used for both blt (CCmode eq/ne zero) and when optimized, direct
This looks incorrect to me. In case you use CCmode, you should use
the COMPARE, in case destination behave as flag.
CCmode is threaded specially and can't hold integral values.
> comparisons (SImode eq/ne const_int, but only for very small
> const_ints). I can't use SImode for everything because when I did,
> the doloop optimization wouldn't work.
BImode is probably proper answer. You can have two version of the
(if_then_else) pattern, one matching BImode predicate comparisons
and other, constructed by combine that accepts integral arguments
with small immediate field.
Honza