* Claudiu Zissulescu [2016-11-17 13:23:44
+]:
>
> > > Note on tests: It will be nice to add a test where the added
> > > peephole kicks in. If you consider to add this test to the current
> > > patch, please resubmit it.
> >
> > There were cmem-bit-{1,2,3,4}.c added in that patch. All of
> > Note on tests: It will be nice to add a test where the added
> > peephole kicks in. If you consider to add this test to the current
> > patch, please resubmit it.
>
> There were cmem-bit-{1,2,3,4}.c added in that patch. All of which
> fail for me without the peephole, and work with the peeph
* Claudiu Zissulescu [2016-11-17 13:02:02
+]:
> Hi Andrew,
>
> Approved, please apply, but ...
>
> > +(define_peephole2
> > + [(set (match_operand:SI 0 "register_operand" "")
> > +(sign_extend:SI
> > + (match_operand:QI 1 "any_mem_operand" "")))
> > + (set (reg:CC_ZN CC
Hi Andrew,
Approved, please apply, but ...
> +(define_peephole2
> + [(set (match_operand:SI 0 "register_operand" "")
> +(sign_extend:SI
> + (match_operand:QI 1 "any_mem_operand" "")))
> + (set (reg:CC_ZN CC_REG)
> + (compare:CC_ZN (match_dup 0)
> + (c
In the case where we access a single bit from a value and use this in a
EQ/NE comparison, GCC will convert this into a sign-extend and GE/LT
comparison.
Normally this would be fine, however, if the value is in CMEM memory,
then we don't have a sign-extending load available (using the special
short