On 08/04/2017 06:59 AM, Prathamesh Kulkarni wrote:
Hi,
I was having a look at PR78809.
For the test-case:
int t1(const char *s) { return __builtin_strcmp (s, "a"); }
for aarch64, trunk with -O2 generates:
t1:
adrpx1, .LANCHOR0
add x1, x1, :lo12:.LANCHOR0
b s
On Fri, 2017-08-04 at 17:30 -0500, Segher Boessenkool wrote:
> On Fri, Aug 04, 2017 at 08:38:11PM +, Wilco Dijkstra wrote:
> > Richard Henderson wrote:
> > > On 08/04/2017 05:59 AM, Prathamesh Kulkarni wrote:
> > > > For i386, it seems strcmp is expanded inline via cmpstr optab
> > > > by
On Fri, Aug 04, 2017 at 08:38:11PM +, Wilco Dijkstra wrote:
> Richard Henderson wrote:
> > On 08/04/2017 05:59 AM, Prathamesh Kulkarni wrote:
>
> > > For i386, it seems strcmp is expanded inline via cmpstr optab by
> > > expand_builtin_strcmp if one of the strings is constant. Could we
>
On 08/04/2017 01:38 PM, Wilco Dijkstra wrote:
>> For constant strings of small length (upto 3?), I was wondering if it'd be a
>> good idea to manually unroll strcmp loop, similar to __strcmp_* macros in
>> bits/string.h?>
>> For eg in gimple-fold, transform
>> x = __builtin_strcmp(s, "ab")
>> to
>>
Richard Henderson wrote:
> On 08/04/2017 05:59 AM, Prathamesh Kulkarni wrote:
> > For i386, it seems strcmp is expanded inline via cmpstr optab by
> > expand_builtin_strcmp if one of the strings is constant. Could we similarly
> > define cmpstr pattern for AArch64?
>
> Certainly that's possi
On 08/04/2017 05:59 AM, Prathamesh Kulkarni wrote:
> Hi,
> I was having a look at PR78809.
> For the test-case:
> int t1(const char *s) { return __builtin_strcmp (s, "a"); }
>
> for aarch64, trunk with -O2 generates:
> t1:
> adrpx1, .LANCHOR0
> add x1, x1, :lo12:.LANCHOR0
>
Hi,
I was having a look at PR78809.
For the test-case:
int t1(const char *s) { return __builtin_strcmp (s, "a"); }
for aarch64, trunk with -O2 generates:
t1:
adrpx1, .LANCHOR0
add x1, x1, :lo12:.LANCHOR0
b strcmp
For i386, it seems strcmp is expanded inline v