[Bug middle-end/71304] missing strlen optimizations after string truncation by assigning NUL

2018-01-25 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71304

Martin Sebor  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
  Known to work||8.0
 Resolution|--- |FIXED

--- Comment #5 from Martin Sebor  ---
Bisection points to r249880 as the commit that enabled this optimization.

[Bug middle-end/71304] missing strlen optimizations after string truncation by assigning NUL

2018-01-22 Thread lesliezhai at llvm dot org.cn
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71304

Leslie Zhai  changed:

   What|Removed |Added

 CC||lesliezhai at llvm dot org.cn

--- Comment #4 from Leslie Zhai  ---
(In reply to Martin Sebor from comment #3)
> Not working on the patch anymore.

GCC 8.x works:
$ /opt/mips-gnu-git/bin/mips64-linux-gnu-gcc -O2 -S -Wall -Wextra
-fdump-tree-optimized=/dev/stdout -o/dev/stdout t.c   
.file   1 "t.c"
.section .mdebug.abi64
.previous
.nanlegacy
.module fp=64
.module oddspreg
.abicalls
.text

;; Function f (f, funcdef_no=0, decl_uid=1582, cgraph_uid=0, symbol_order=0)

f ()
{
   [local count: 1073741825]:
  return 1;

}


.align  2
.align  3
.globl  f
.setnomips16
.setnomicromips
.entf
.type   f, @function
f:
.frame  $sp,0,$31   # vars= 0, regs= 0/0, args= 0, gp= 0
.mask   0x,0
.fmask  0x,0
.setnoreorder
.setnomacro
jr  $31
li  $2,1# 0x1

.setmacro
.setreorder
.endf
.size   f, .-f

;; Function g (g, funcdef_no=1, decl_uid=1586, cgraph_uid=1, symbol_order=1)

g ()
{
   [local count: 1073741825]:
  return 1;

}


.align  2
.align  3
.globl  g
.setnomips16
.setnomicromips
.entg
.type   g, @function
g:
.frame  $sp,0,$31   # vars= 0, regs= 0/0, args= 0, gp= 0
.mask   0x,0
.fmask  0x,0
.setnoreorder
.setnomacro
jr  $31
li  $2,1# 0x1

.setmacro
.setreorder
.endg
.size   g, .-g
.ident  "GCC: (GNU) 8.0.1 20180123 (experimental)"


Could you tell me which commit fix the issue please? thanks a lot!

Regards,
Leslie Zhai

[Bug middle-end/71304] missing strlen optimizations after string truncation by assigning NUL

2017-01-25 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71304

Martin Sebor  changed:

   What|Removed |Added

 Status|ASSIGNED|NEW

--- Comment #3 from Martin Sebor  ---
Not working on the patch anymore.

[Bug middle-end/71304] missing strlen optimizations after string truncation by assigning NUL

2016-05-26 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71304

Martin Sebor  changed:

   What|Removed |Added

   Keywords||missed-optimization
 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2016-05-27
   Assignee|unassigned at gcc dot gnu.org  |msebor at gcc dot 
gnu.org
 Ever confirmed|0   |1
  Known to fail||4.8.5, 4.9.3, 5.3.0, 6.1.0,
   ||7.0

--- Comment #2 from Martin Sebor  ---
Working on a patch.

[Bug middle-end/71304] missing strlen optimizations after string truncation by assigning NUL

2016-05-26 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71304

--- Comment #1 from Martin Sebor  ---
*** Bug 71305 has been marked as a duplicate of this bug. ***